FFmpeg
Loading...
Searching...
No Matches
webpenc.c File Reference
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "libavcodec/bytestream.h"
#include "avformat.h"
#include "internal.h"
#include "mux.h"

Go to the source code of this file.

Data Structures

struct  WebpContext
 

Macros

#define OFFSET(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)
 Returns 1 if it has written a RIFF header with a correct length field.
 
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 FFOutputFormat ff_webp_muxer
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 203 of file webpenc.c.

◆ ENC

#define ENC   AV_OPT_FLAG_ENCODING_PARAM

Definition at line 204 of file webpenc.c.

Function Documentation

◆ webp_init()

static int webp_init ( AVFormatContext * s)
static

Definition at line 38 of file webpenc.c.

◆ is_animated_webp_packet()

static int is_animated_webp_packet ( AVPacket * pkt)
static

Definition at line 50 of file webpenc.c.

Referenced by webp_write_packet().

◆ flush()

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

Returns 1 if it has written a RIFF header with a correct length field.

Definition at line 74 of file webpenc.c.

◆ webp_write_packet()

static int webp_write_packet ( AVFormatContext * s,
AVPacket * pkt )
static

Definition at line 150 of file webpenc.c.

◆ webp_write_trailer()

static int webp_write_trailer ( AVFormatContext * s)
static

Definition at line 175 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 },
}
#define ENC
Definition caca.c:198
#define NULL
Definition coverity.c:32
#define OFFSET(x)
static int loop
Definition ffplay.c:338
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258

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

Definition at line 211 of file webpenc.c.

◆ ff_webp_muxer

const FFOutputFormat ff_webp_muxer
Initial value:
= {
.p.name = "webp",
.p.long_name = NULL_IF_CONFIG_SMALL("WebP"),
.p.extensions = "webp",
.priv_data_size = sizeof(WebpContext),
.p.video_codec = AV_CODEC_ID_WEBP,
.p.audio_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
.init = webp_init,
.write_packet = webp_write_packet,
.write_trailer = webp_write_trailer,
.p.priv_class = &webp_muxer_class,
.p.flags = AVFMT_VARIABLE_FPS,
.flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
}
#define AVFMT_VARIABLE_FPS
Format allows variable fps.
Definition avformat.h:501
@ AV_CODEC_ID_NONE
Definition codec_id.h:48
@ AV_CODEC_ID_WEBP
Definition codec_id.h:221
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:88
#define FF_OFMT_FLAG_MAX_ONE_OF_EACH
If this flag is set, it indicates that for each codec type whose corresponding default codec (i....
Definition mux.h:50
#define FF_OFMT_FLAG_ONLY_DEFAULT_CODECS
If this flag is set, then the only permitted audio/video/subtitle codec ids are AVOutputFormat....
Definition mux.h:59
static int webp_write_trailer(AVFormatContext *s)
Definition webpenc.c:175
static int webp_init(AVFormatContext *s)
Definition webpenc.c:38
static const AVClass webp_muxer_class
Definition webpenc.c:211
static int webp_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition webpenc.c:150

Definition at line 217 of file webpenc.c.