FFmpeg
Loading...
Searching...
No Matches
apngdec.c File Reference

APNG demuxer. More...

#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)
 
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

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 )
static

Definition at line 238 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 308 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 },
}
#define DEFAULT_APNG_FPS
Definition apngdec.c:41
#define NULL
Definition coverity.c:32
#define AV_OPT_FLAG_DECODING_PARAM
A generic parameter which can be set by the user for demuxing or decoding.
Definition opt.h:355
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
Definition opt.h:326

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,
}
const char * av_default_item_name(void *ptr)
Return the context name.
Definition log.c:241
#define LIBAVUTIL_VERSION_INT
Definition version.h:85
@ AV_CLASS_CATEGORY_DEMUXER
Definition log.h:33

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),
}
static int apng_read_header(AVFormatContext *s)
Definition apngdec.c:149
static int apng_probe(const AVProbeData *p)
Definition apngdec.c:71
static const AVClass demuxer_class
Definition apngdec.c:418
static int apng_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition apngdec.c:308
#define AVFMT_GENERIC_INDEX
Use generic index building code.
Definition avformat.h:499
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
static int read_probe(const AVProbeData *p)
Definition cdg.c:30
static int read_header(FFV1Context *f, RangeCoder *c)
Definition ffv1dec.c:578
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:88

Definition at line 426 of file apngdec.c.