FFmpeg
Data Structures | Macros | Functions | Variables
apngdec.c File Reference

APNG demuxer. More...

#include "avformat.h"
#include "avio_internal.h"
#include "internal.h"
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "libavcodec/apng.h"
#include "libavcodec/png.h"
#include "libavcodec/bytestream.h"

Go to the source code of this file.

Data Structures

struct  APNGDemuxContext
 

Macros

#define DEFAULT_APNG_FPS   15
 

Functions

static int apng_probe (const AVProbeData *p)
 
static int append_extradata (AVCodecParameters *par, AVIOContext *pb, int len)
 
static int apng_read_header (AVFormatContext *s)
 
static int decode_fctl_chunk (AVFormatContext *s, APNGDemuxContext *ctx, AVPacket *pkt)
 
static int apng_read_packet (AVFormatContext *s, AVPacket *pkt)
 

Variables

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

Detailed Description

APNG demuxer.

See also
https://wiki.mozilla.org/APNG_Specification
http://www.w3.org/TR/PNG

Definition in file apngdec.c.

Macro Definition Documentation

#define DEFAULT_APNG_FPS   15

Definition at line 39 of file apngdec.c.

Function Documentation

static int apng_probe ( const AVProbeData p)
static

Definition at line 69 of file apngdec.c.

static int append_extradata ( AVCodecParameters par,
AVIOContext pb,
int  len 
)
static

Definition at line 124 of file apngdec.c.

Referenced by apng_read_header().

static int apng_read_header ( AVFormatContext s)
static

Definition at line 146 of file apngdec.c.

static int decode_fctl_chunk ( AVFormatContext s,
APNGDemuxContext ctx,
AVPacket pkt 
)
static

Definition at line 251 of file apngdec.c.

Referenced by apng_read_packet().

static int apng_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 321 of file apngdec.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{ "ignore_loop", "ignore loop setting" , 0x42,
AV_OPT_TYPE_BOOL, { .i64 = 1 } , 0, 1 , AV_OPT_FLAG_DECODING_PARAM },
{ "max_fps" , "maximum framerate (0 is no limit)" , 0x42,
AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
{ "default_fps", "default framerate (0 is as fast as possible)", 0x42,
AV_OPT_TYPE_INT, { .i64 = DEFAULT_APNG_FPS }, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define DEFAULT_APNG_FPS
Definition: apngdec.c:39
#define AV_OPT_FLAG_DECODING_PARAM
a generic parameter which can be set by the user for demuxing or decoding
Definition: opt.h:277

Definition at line 418 of file apngdec.c.

const AVClass demuxer_class
static
Initial value:
= {
.class_name = "APNG demuxer",
.item_name = av_default_item_name,
.option = options,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
static const AVOption options[]
Definition: apngdec.c:418

Definition at line 428 of file apngdec.c.

AVInputFormat ff_apng_demuxer
Initial value:
= {
.name = "apng",
.long_name = NULL_IF_CONFIG_SMALL("Animated Portable Network Graphics"),
.priv_data_size = sizeof(APNGDemuxContext),
.priv_class = &demuxer_class,
}
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static int apng_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: apngdec.c:321
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:530
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_reading.c:42
#define AVFMT_GENERIC_INDEX
Use generic index building code.
Definition: avformat.h:468
static const AVClass demuxer_class
Definition: apngdec.c:428
#define flags(name, subs,...)
Definition: cbs_av1.c:561
static int read_probe(const AVProbeData *pd)
Definition: jvdec.c:55
static int apng_probe(const AVProbeData *p)
Definition: apngdec.c:69
static int apng_read_header(AVFormatContext *s)
Definition: apngdec.c:146

Definition at line 436 of file apngdec.c.