FFmpeg
Data Structures | Macros | Functions | Variables
webpenc.c File Reference
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "avformat.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  WebpContext
 

Macros

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

Functions

static int webp_init (AVFormatContext *s)
 
static int is_animated_webp_packet (AVPacket *pkt)
 
static int flush (AVFormatContext *s, int trailer, int64_t pts)
 
static int webp_write_packet (AVFormatContext *s, AVPacket *pkt)
 
static int webp_write_trailer (AVFormatContext *s)
 

Variables

static const AVOption options []
 
static const AVClass webp_muxer_class
 
const AVOutputFormat ff_webp_muxer
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 197 of file webpenc.c.

◆ ENC

#define ENC   AV_OPT_FLAG_ENCODING_PARAM

Definition at line 198 of file webpenc.c.

Function Documentation

◆ webp_init()

static int webp_init ( AVFormatContext s)
static

Definition at line 36 of file webpenc.c.

◆ is_animated_webp_packet()

static int is_animated_webp_packet ( AVPacket pkt)
static

Definition at line 57 of file webpenc.c.

Referenced by webp_write_packet().

◆ flush()

static int flush ( AVFormatContext s,
int  trailer,
int64_t  pts 
)
static

Definition at line 78 of file webpenc.c.

Referenced by webp_write_packet(), and webp_write_trailer().

◆ webp_write_packet()

static int webp_write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 146 of file webpenc.c.

◆ webp_write_trailer()

static int webp_write_trailer ( AVFormatContext s)
static

Definition at line 172 of file webpenc.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "loop", "Number of times to loop the output: 0 - infinite loop", OFFSET(loop),
AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 65535, ENC },
{ NULL },
}

Definition at line 199 of file webpenc.c.

◆ webp_muxer_class

const AVClass webp_muxer_class
static
Initial value:
= {
.class_name = "WebP muxer",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 205 of file webpenc.c.

◆ ff_webp_muxer

const AVOutputFormat ff_webp_muxer
Initial value:
= {
.name = "webp",
.long_name = NULL_IF_CONFIG_SMALL("WebP"),
.extensions = "webp",
.priv_data_size = sizeof(WebpContext),
.video_codec = AV_CODEC_ID_WEBP,
.priv_class = &webp_muxer_class,
}

Definition at line 211 of file webpenc.c.

ENC
#define ENC
Definition: webpenc.c:198
AVFMT_VARIABLE_FPS
#define AVFMT_VARIABLE_FPS
Format allows variable fps.
Definition: avformat.h:478
init
static int init
Definition: av_tx.c:47
loop
static int loop
Definition: ffplay.c:339
options
static const AVOption options[]
Definition: webpenc.c:199
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
write_trailer
static int write_trailer(AVFormatContext *s1)
Definition: v4l2enc.c:98
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235
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:117
webp_muxer_class
static const AVClass webp_muxer_class
Definition: webpenc.c:205
write_packet
static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue)
Definition: ffmpeg.c:727
webp_write_packet
static int webp_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: webpenc.c:146
AV_CODEC_ID_WEBP
@ AV_CODEC_ID_WEBP
Definition: codec_id.h:222
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:224
webp_init
static int webp_init(AVFormatContext *s)
Definition: webpenc.c:36
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561
WebpContext
Definition: webpenc.c:27
OFFSET
#define OFFSET(x)
Definition: webpenc.c:197
webp_write_trailer
static int webp_write_trailer(AVFormatContext *s)
Definition: webpenc.c:172