FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
gif.c File Reference
#include "avformat.h"
#include "internal.h"
#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"

Go to the source code of this file.

Data Structures

struct  GIFContext
 

Macros

#define OFFSET(x)   offsetof(GIFContext, x)
 
#define ENC   AV_OPT_FLAG_ENCODING_PARAM
 

Functions

static int gif_image_write_header (AVIOContext *pb, int width, int height, int loop_count, uint32_t *palette)
 
static int gif_write_header (AVFormatContext *s)
 
static int flush_packet (AVFormatContext *s, AVPacket *new)
 
static int gif_write_packet (AVFormatContext *s, AVPacket *pkt)
 
static int gif_write_trailer (AVFormatContext *s)
 

Variables

static const AVOption options []
 
static const AVClass gif_muxer_class
 
AVOutputFormat ff_gif_muxer
 

Macro Definition Documentation

#define OFFSET (   x)    offsetof(GIFContext, x)

Definition at line 192 of file gif.c.

#define ENC   AV_OPT_FLAG_ENCODING_PARAM

Definition at line 193 of file gif.c.

Function Documentation

static int gif_image_write_header ( AVIOContext pb,
int  width,
int  height,
int  loop_count,
uint32_t *  palette 
)
static

Definition at line 31 of file gif.c.

Referenced by gif_write_header().

static int gif_write_header ( AVFormatContext s)
static

Definition at line 79 of file gif.c.

static int flush_packet ( AVFormatContext s,
AVPacket new 
)
static

Definition at line 111 of file gif.c.

Referenced by gif_write_packet(), and gif_write_trailer().

static int gif_write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 167 of file gif.c.

static int gif_write_trailer ( AVFormatContext s)
static

Definition at line 180 of file gif.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{ "loop", "Number of times to loop the output: -1 - no loop, 0 - infinite loop", OFFSET(loop),
AV_OPT_TYPE_INT, { .i64 = 0 }, -1, 65535, ENC },
{ "final_delay", "Force delay (in centiseconds) after the last frame", OFFSET(last_delay),
AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 65535, ENC },
{ NULL },
}

Definition at line 194 of file gif.c.

const AVClass gif_muxer_class
static
Initial value:
= {
.class_name = "GIF muxer",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 202 of file gif.c.

AVOutputFormat ff_gif_muxer
Initial value:
= {
.name = "gif",
.long_name = NULL_IF_CONFIG_SMALL("GIF Animation"),
.mime_type = "image/gif",
.extensions = "gif",
.priv_data_size = sizeof(GIFContext),
.audio_codec = AV_CODEC_ID_NONE,
.video_codec = AV_CODEC_ID_GIF,
.priv_class = &gif_muxer_class,
}

Definition at line 209 of file gif.c.