FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
apngenc.c File Reference
#include "avformat.h"
#include "internal.h"
#include "libavutil/avassert.h"
#include "libavutil/crc.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavcodec/png.h"
#include "libavcodec/apng.h"

Go to the source code of this file.

Data Structures

struct  APNGMuxContext
 

Macros

#define OFFSET(x)   offsetof(APNGMuxContext, x)
 
#define ENC   AV_OPT_FLAG_ENCODING_PARAM
 

Functions

static uint8_tapng_find_chunk (uint32_t tag, uint8_t *buf, size_t length)
 
static void apng_write_chunk (AVIOContext *io_context, uint32_t tag, uint8_t *buf, size_t length)
 
static int apng_write_header (AVFormatContext *format_context)
 
static void flush_packet (AVFormatContext *format_context, AVPacket *packet)
 
static int apng_write_packet (AVFormatContext *format_context, AVPacket *packet)
 
static int apng_write_trailer (AVFormatContext *format_context)
 

Variables

static const AVOption options []
 
static const AVClass apng_muxer_class
 
AVOutputFormat ff_apng_muxer
 

Macro Definition Documentation

#define OFFSET (   x)    offsetof(APNGMuxContext, x)

Definition at line 241 of file apngenc.c.

#define ENC   AV_OPT_FLAG_ENCODING_PARAM

Definition at line 242 of file apngenc.c.

Function Documentation

static uint8_t* apng_find_chunk ( uint32_t  tag,
uint8_t buf,
size_t  length 
)
static

Definition at line 49 of file apngenc.c.

Referenced by flush_packet().

static void apng_write_chunk ( AVIOContext io_context,
uint32_t  tag,
uint8_t buf,
size_t  length 
)
static

Definition at line 58 of file apngenc.c.

Referenced by apng_write_trailer(), and flush_packet().

static int apng_write_header ( AVFormatContext format_context)
static

Definition at line 78 of file apngenc.c.

static void flush_packet ( AVFormatContext format_context,
AVPacket packet 
)
static

Definition at line 104 of file apngenc.c.

Referenced by apng_write_packet(), and apng_write_trailer().

static int apng_write_packet ( AVFormatContext format_context,
AVPacket packet 
)
static

Definition at line 200 of file apngenc.c.

static int apng_write_trailer ( AVFormatContext format_context)
static

Definition at line 217 of file apngenc.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{ "plays", "Number of times to play the output: 0 - infinite loop, 1 - no loop", OFFSET(plays),
AV_OPT_TYPE_INT, { .i64 = 1 }, 0, UINT_MAX, ENC },
{ "final_delay", "Force delay after the last frame", OFFSET(last_delay),
AV_OPT_TYPE_RATIONAL, { .dbl = 0 }, 0, USHRT_MAX, ENC },
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define ENC
Definition: apngenc.c:242
#define OFFSET(x)
Definition: apngenc.c:241

Definition at line 243 of file apngenc.c.

const AVClass apng_muxer_class
static
Initial value:
= {
.class_name = "APNG muxer",
.item_name = av_default_item_name,
.option = options,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:62
av_default_item_name
static const AVOption options[]
Definition: apngenc.c:243

Definition at line 251 of file apngenc.c.

AVOutputFormat ff_apng_muxer
Initial value:
= {
.name = "apng",
.long_name = NULL_IF_CONFIG_SMALL("Animated Portable Network Graphics"),
.mime_type = "image/png",
.extensions = "apng",
.priv_data_size = sizeof(APNGMuxContext),
.audio_codec = AV_CODEC_ID_NONE,
.video_codec = AV_CODEC_ID_APNG,
.priv_class = &apng_muxer_class,
}
static int apng_write_trailer(AVFormatContext *format_context)
Definition: apngenc.c:217
static const AVClass apng_muxer_class
Definition: apngenc.c:251
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:175
static int write_trailer(AVFormatContext *s1)
Definition: v4l2enc.c:94
static int apng_write_packet(AVFormatContext *format_context, AVPacket *packet)
Definition: apngenc.c:200
static int flags
Definition: cpu.c:47
#define AVFMT_VARIABLE_FPS
Format allows variable fps.
Definition: avformat.h:475
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:493
static int write_packet(AVFormatContext *s1, AVPacket *pkt)
Definition: v4l2enc.c:86
static int apng_write_header(AVFormatContext *format_context)
Definition: apngenc.c:78

Definition at line 258 of file apngenc.c.