FFmpeg
Data Structures | Macros | Functions | Variables
apngdec.c File Reference
#include "avformat.h"
#include "avio_internal.h"
#include "demux.h"
#include "internal.h"
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.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 FFInputFormat 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 41 of file apngdec.c.

Function Documentation

◆ apng_probe()

static int apng_probe ( const AVProbeData p)
static

Definition at line 71 of file apngdec.c.

◆ append_extradata()

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

Definition at line 126 of file apngdec.c.

Referenced by apng_read_header().

◆ apng_read_header()

static int apng_read_header ( AVFormatContext s)
static

Definition at line 149 of file apngdec.c.

◆ decode_fctl_chunk()

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

Definition at line 241 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 311 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 408 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 418 of file apngdec.c.

◆ ff_apng_demuxer

const FFInputFormat ff_apng_demuxer
Initial value:
= {
.p.name = "apng",
.p.long_name = NULL_IF_CONFIG_SMALL("Animated Portable Network Graphics"),
.p.flags = AVFMT_GENERIC_INDEX,
.p.priv_class = &demuxer_class,
.priv_data_size = sizeof(APNGDemuxContext),
}

Definition at line 426 of file apngdec.c.

apng_read_header
static int apng_read_header(AVFormatContext *s)
Definition: apngdec.c:149
AVFMT_GENERIC_INDEX
#define AVFMT_GENERIC_INDEX
Use generic index building code.
Definition: avformat.h:480
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_read_callback.c:42
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:311
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:41
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:94
options
static const AVOption options[]
Definition: apngdec.c:408
apng_probe
static int apng_probe(const AVProbeData *p)
Definition: apngdec.c:71
APNGDemuxContext
Definition: apngdec.c:43
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:235
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:273
read_probe
static int read_probe(const AVProbeData *p)
Definition: cdg.c:30
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Definition: opt.h:251
demuxer_class
static const AVClass demuxer_class
Definition: apngdec.c:418