FFmpeg
Data Structures | Macros | Functions | Variables
apngdec.c File Reference
#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
 
const 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

◆ DEFAULT_APNG_FPS

#define DEFAULT_APNG_FPS   15

Definition at line 39 of file apngdec.c.

Function Documentation

◆ apng_probe()

static int apng_probe ( const AVProbeData p)
static

Definition at line 69 of file apngdec.c.

◆ append_extradata()

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

Definition at line 124 of file apngdec.c.

Referenced by apng_read_header().

◆ apng_read_header()

static int apng_read_header ( AVFormatContext s)
static

Definition at line 147 of file apngdec.c.

◆ decode_fctl_chunk()

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

Definition at line 239 of file apngdec.c.

Referenced by apng_read_packet().

◆ apng_read_packet()

static int apng_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 309 of file apngdec.c.

Variable Documentation

◆ options

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,
{ NULL },
}

Definition at line 406 of file apngdec.c.

◆ demuxer_class

const AVClass demuxer_class
static
Initial value:
= {
.class_name = "APNG demuxer",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 416 of file apngdec.c.

◆ ff_apng_demuxer

const 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,
}

Definition at line 424 of file apngdec.c.

apng_read_header
static int apng_read_header(AVFormatContext *s)
Definition: apngdec.c:147
AVFMT_GENERIC_INDEX
#define AVFMT_GENERIC_INDEX
Use generic index building code.
Definition: avformat.h:481
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_read_callback.c:41
AV_CLASS_CATEGORY_DEMUXER
@ AV_CLASS_CATEGORY_DEMUXER
Definition: log.h:33
apng_read_packet
static int apng_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: apngdec.c:309
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:550
NULL
#define NULL
Definition: coverity.c:32
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
DEFAULT_APNG_FPS
#define DEFAULT_APNG_FPS
Definition: apngdec.c:39
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:106
options
static const AVOption options[]
Definition: apngdec.c:406
AV_OPT_FLAG_DECODING_PARAM
#define AV_OPT_FLAG_DECODING_PARAM
a generic parameter which can be set by the user for demuxing or decoding
Definition: opt.h:282
apng_probe
static int apng_probe(const AVProbeData *p)
Definition: apngdec.c:69
APNGDemuxContext
Definition: apngdec.c:41
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
read_probe
static int read_probe(const AVProbeData *p)
Definition: cdg.c:29
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Definition: opt.h:244
demuxer_class
static const AVClass demuxer_class
Definition: apngdec.c:416
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:474