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 65 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.subtitle_codec = AV_CODEC_ID_WEBVTT,
.write_header = webvtt_write_header,
.write_packet = webvtt_write_packet,
}

Definition at line 106 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
webvtt_write_packet
static int webvtt_write_packet(AVFormatContext *ctx, AVPacket *pkt)
Definition: webvttenc.c:65
AV_CODEC_ID_WEBVTT
@ AV_CODEC_ID_WEBVTT
Definition: codec_id.h:562
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:115
AVFMT_TS_NONSTRICT
#define AVFMT_TS_NONSTRICT
Format does not require strictly increasing timestamps, but they must still be monotonic.
Definition: avformat.h:489