libavformat/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"
Include dependency graph for libavformat/gif.c:

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 ENC   AV_OPT_FLAG_ENCODING_PARAM

Definition at line 190 of file libavformat/gif.c.

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

Definition at line 189 of file libavformat/gif.c.

Function Documentation

static int flush_packet ( AVFormatContext s,
AVPacket new 
)
static

Definition at line 108 of file libavformat/gif.c.

Referenced by gif_write_packet(), and gif_write_trailer().

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 libavformat/gif.c.

Referenced by gif_write_header().

static int gif_write_header ( AVFormatContext s)
static

Definition at line 76 of file libavformat/gif.c.

static int gif_write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 164 of file libavformat/gif.c.

static int gif_write_trailer ( AVFormatContext s)
static

Definition at line 177 of file libavformat/gif.c.

Variable Documentation

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,
}
static int write_packet(AVFormatContext *s, AVPacket *pkt)
static int gif_write_header(AVFormatContext *s)
static const AVClass gif_muxer_class
static int write_trailer(AVFormatContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static int gif_write_trailer(AVFormatContext *s)
static int flags
Definition: cpu.c:23
#define AVFMT_VARIABLE_FPS
Format allows variable fps.
Definition: avformat.h:355
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:470
static int gif_write_packet(AVFormatContext *s, AVPacket *pkt)

Definition at line 206 of file libavformat/gif.c.

const AVClass gif_muxer_class
static
Initial value:
= {
.class_name = "GIF muxer",
.item_name = av_default_item_name,
.option = options,
}
av_default_item_name
LIBAVUTIL_VERSION_INT
Definition: eval.c:55
static const AVOption options[]

Definition at line 199 of file libavformat/gif.c.

const AVOption options[]
static
Initial value:
= {
{ "loop", "Number of times to loop the output.", OFFSET(loop),
AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 65535, ENC },
{ "final_delay", "Force delay (in ms) after the last frame", OFFSET(last_delay),
AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 65535, ENC },
{ NULL },
}
#define OFFSET(x)
#define ENC
NULL
Definition: eval.c:55
static int loop
Definition: ffplay.c:305

Definition at line 191 of file libavformat/gif.c.