FFmpeg
Functions | Variables
webvttenc.c File Reference
#include "avformat.h"
#include "internal.h"
#include "mux.h"

Go to the source code of this file.

Functions

static void webvtt_write_time (AVIOContext *pb, int64_t millisec)
 
static int webvtt_write_header (AVFormatContext *ctx)
 
static int webvtt_write_packet (AVFormatContext *ctx, AVPacket *pkt)
 

Variables

const FFOutputFormat ff_webvtt_muxer
 

Detailed Description

WebVTT subtitle muxer

See also
http://dev.w3.org/html5/webvtt/

Definition in file webvttenc.c.

Function Documentation

◆ webvtt_write_time()

static void webvtt_write_time ( AVIOContext pb,
int64_t  millisec 
)
static

Definition at line 31 of file webvttenc.c.

Referenced by webvtt_write_packet().

◆ webvtt_write_header()

static int webvtt_write_header ( AVFormatContext ctx)
static

Definition at line 47 of file webvttenc.c.

◆ webvtt_write_packet()

static int webvtt_write_packet ( AVFormatContext ctx,
AVPacket pkt 
)
static

Definition at line 59 of file webvttenc.c.

Variable Documentation

◆ ff_webvtt_muxer

const FFOutputFormat ff_webvtt_muxer
Initial value:
= {
.p.name = "webvtt",
.p.long_name = NULL_IF_CONFIG_SMALL("WebVTT subtitle"),
.p.extensions = "vtt",
.p.mime_type = "text/vtt",
.p.video_codec = AV_CODEC_ID_NONE,
.p.audio_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_WEBVTT,
.write_header = webvtt_write_header,
.write_packet = webvtt_write_packet,
.flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
}

Definition at line 100 of file webvttenc.c.

AVFMT_VARIABLE_FPS
#define AVFMT_VARIABLE_FPS
Format allows variable fps.
Definition: avformat.h:482
webvtt_write_header
static int webvtt_write_header(AVFormatContext *ctx)
Definition: webvttenc.c:47
FF_OFMT_FLAG_ONLY_DEFAULT_CODECS
#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
webvtt_write_packet
static int webvtt_write_packet(AVFormatContext *ctx, AVPacket *pkt)
Definition: webvttenc.c:59
AV_CODEC_ID_WEBVTT
@ AV_CODEC_ID_WEBVTT
Definition: codec_id.h:567
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:106
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50
FF_OFMT_FLAG_MAX_ONE_OF_EACH
#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
AVFMT_TS_NONSTRICT
#define AVFMT_TS_NONSTRICT
Format does not require strictly increasing timestamps, but they must still be monotonic.
Definition: avformat.h:491