libavformat/gifdec.c File Reference

GIF demuxer. More...

#include "avformat.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "internal.h"
#include "libavcodec/gif.h"
Include dependency graph for libavformat/gifdec.c:

Go to the source code of this file.

Data Structures

struct  GIFDemuxContext
 

Macros

#define GIF_DEFAULT_DELAY   10
 Major web browsers display gifs at ~10-15fps when rate is not explicitly set or have too low values. More...
 
#define GIF_MIN_DELAY   2
 By default delay values less than this threshold considered to be invalid. More...
 

Typedefs

typedef struct GIFDemuxContext GIFDemuxContext
 

Functions

static int gif_probe (AVProbeData *p)
 
static int resync (AVIOContext *pb)
 
static int gif_read_header (AVFormatContext *s)
 
static int gif_skip_subblocks (AVIOContext *pb)
 
static int gif_read_ext (AVFormatContext *s)
 
static int gif_read_packet (AVFormatContext *s, AVPacket *pkt)
 

Variables

static const AVOption options []
 
static const AVClass demuxer_class
 
AVInputFormat ff_gif_demuxer
 

Detailed Description

GIF demuxer.

Definition in file libavformat/gifdec.c.

Macro Definition Documentation

#define GIF_DEFAULT_DELAY   10

Major web browsers display gifs at ~10-15fps when rate is not explicitly set or have too low values.

We assume default rate to be 10. Default delay = 100hundredths of second / 10fps = 10hos per frame.

Definition at line 61 of file libavformat/gifdec.c.

#define GIF_MIN_DELAY   2

By default delay values less than this threshold considered to be invalid.

Definition at line 65 of file libavformat/gifdec.c.

Typedef Documentation

Function Documentation

static int gif_probe ( AVProbeData p)
static

Definition at line 67 of file libavformat/gifdec.c.

static int gif_read_ext ( AVFormatContext s)
static

Definition at line 141 of file libavformat/gifdec.c.

Referenced by gif_read_packet().

static int gif_read_header ( AVFormatContext s)
static

Definition at line 93 of file libavformat/gifdec.c.

static int gif_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 185 of file libavformat/gifdec.c.

static int gif_skip_subblocks ( AVIOContext pb)
static

Definition at line 129 of file libavformat/gifdec.c.

Referenced by gif_read_ext(), and gif_read_packet().

static int resync ( AVIOContext pb)
static

Variable Documentation

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

Definition at line 307 of file libavformat/gifdec.c.

AVInputFormat ff_gif_demuxer
Initial value:
= {
.name = "gif",
.long_name = NULL_IF_CONFIG_SMALL("CompuServe Graphics Interchange Format (GIF)"),
.priv_data_size = sizeof(GIFDemuxContext),
.priv_class = &demuxer_class,
}
static int gif_read_header(AVFormatContext *s)
struct GIFDemuxContext GIFDemuxContext
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static const AVClass demuxer_class
static int read_probe(AVProbeData *pd)
static int gif_probe(AVProbeData *p)
static int gif_read_packet(AVFormatContext *s, AVPacket *pkt)
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:517
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
Definition: libcdio.c:114
#define AVFMT_GENERIC_INDEX
Use generic index building code.
Definition: avformat.h:353
static int flags
Definition: cpu.c:23

Definition at line 315 of file libavformat/gifdec.c.

const AVOption options[]
static
Initial value:
= {
{ "min_delay" , "minimum valid delay between frames (in hundredths of second)", offsetof(GIFDemuxContext, min_delay) , AV_OPT_TYPE_INT, {.i64 = GIF_MIN_DELAY} , 0, 100 * 60, AV_OPT_FLAG_DECODING_PARAM },
{ "default_delay", "default delay between frames (in hundredths of second)" , offsetof(GIFDemuxContext, default_delay), AV_OPT_TYPE_INT, {.i64 = GIF_DEFAULT_DELAY}, 0, 100 * 60, AV_OPT_FLAG_DECODING_PARAM },
{ "ignore_loop" , "ignore loop setting (netscape extension)" , offsetof(GIFDemuxContext, ignore_loop) , AV_OPT_TYPE_INT, {.i64 = 1} , 0, 1, AV_OPT_FLAG_DECODING_PARAM },
{ NULL },
}
NULL
Definition: eval.c:55
#define AV_OPT_FLAG_DECODING_PARAM
a generic parameter which can be set by the user for demuxing or decoding
Definition: opt.h:282
#define GIF_DEFAULT_DELAY
Major web browsers display gifs at ~10-15fps when rate is not explicitly set or have too low values...
#define GIF_MIN_DELAY
By default delay values less than this threshold considered to be invalid.

Definition at line 300 of file libavformat/gifdec.c.