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"
#include "libavcodec/bytestream.h"
#include "libavcodec/gif.h"

Go to the source code of this file.

Data Structures

struct  GIFContext


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


static int gif_write_header (AVFormatContext *s)
static int gif_parse_packet (AVFormatContext *s, uint8_t *data, int size)
static int gif_get_delay (GIFContext *gif, AVPacket *prev, AVPacket *new)
static int gif_write_packet (AVFormatContext *s, AVPacket *new_pkt)
static int gif_write_trailer (AVFormatContext *s)


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 189 of file gif.c.


Definition at line 190 of file gif.c.

Function Documentation

static int gif_write_header ( AVFormatContext s)

Definition at line 43 of file gif.c.

static int gif_parse_packet ( AVFormatContext s,
uint8_t data,
int  size 

Definition at line 58 of file gif.c.

Referenced by gif_write_packet().

static int gif_get_delay ( GIFContext gif,
AVPacket prev,
AVPacket new 

Definition at line 85 of file gif.c.

Referenced by gif_write_packet().

static int gif_write_packet ( AVFormatContext s,
AVPacket new_pkt 

Definition at line 95 of file gif.c.

Referenced by gif_write_trailer().

static int gif_write_trailer ( AVFormatContext s)

Definition at line 172 of file gif.c.

Variable Documentation

const AVOption options[]
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 },
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: gif.c:189
#define ENC
Definition: gif.c:190
static int loop
Definition: ffplay.c:341

Definition at line 191 of file gif.c.

const AVClass gif_muxer_class
Initial value:
= {
.class_name = "GIF muxer",
.item_name = av_default_item_name,
.option = options,
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235
static const AVOption options[]
Definition: gif.c:191

Definition at line 199 of file gif.c.

AVOutputFormat ff_gif_muxer
Initial value:
= {
.name = "gif",
.long_name = NULL_IF_CONFIG_SMALL("CompuServe Graphics Interchange Format (GIF)"),
.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 void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue)
Definition: ffmpeg.c:729
static int gif_write_header(AVFormatContext *s)
Definition: gif.c:43
static const AVClass gif_muxer_class
Definition: gif.c:199
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:117
Definition: gif.c:46
static int write_trailer(AVFormatContext *s1)
Definition: v4l2enc.c:98
static int gif_write_trailer(AVFormatContext *s)
Definition: gif.c:172
#define flags(name, subs,...)
Definition: cbs_av1.c:561
Format allows variable fps.
Definition: avformat.h:465
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:346
static int gif_write_packet(AVFormatContext *s, AVPacket *new_pkt)
Definition: gif.c:95

Definition at line 206 of file gif.c.