FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
webvttdec.c File Reference

WebVTT subtitle demuxer. More...

#include "avformat.h"
#include "internal.h"
#include "subtitles.h"
#include "libavutil/bprint.h"
#include "libavutil/intreadwrite.h"

Go to the source code of this file.

Data Structures

struct  WebVTTContext
 

Macros

#define SET_SIDE_DATA(name, type)
 

Functions

static int webvtt_probe (AVProbeData *p)
 
static int64_t read_ts (const char *s)
 
static int webvtt_read_header (AVFormatContext *s)
 
static int webvtt_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static int webvtt_read_seek (AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
 
static int webvtt_read_close (AVFormatContext *s)
 

Variables

AVInputFormat ff_webvtt_demuxer
 

Detailed Description

WebVTT subtitle demuxer.

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

Definition in file webvttdec.c.

Macro Definition Documentation

#define SET_SIDE_DATA (   name,
  type 
)
Value:
do { \
if (name##_len) { \
uint8_t *buf = av_packet_new_side_data(sub, type, name##_len); \
if (!buf) { \
res = AVERROR(ENOMEM); \
goto end; \
} \
memcpy(buf, name, name##_len); \
} \
} while (0)

Referenced by webvtt_read_header().

Function Documentation

static int webvtt_probe ( AVProbeData p)
static

Definition at line 37 of file webvttdec.c.

static int64_t read_ts ( const char *  s)
static

Definition at line 49 of file webvttdec.c.

Referenced by webvtt_read_header().

static int webvtt_read_header ( AVFormatContext s)
static

Definition at line 57 of file webvttdec.c.

static int webvtt_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 168 of file webvttdec.c.

static int webvtt_read_seek ( AVFormatContext s,
int  stream_index,
int64_t  min_ts,
int64_t  ts,
int64_t  max_ts,
int  flags 
)
static

Definition at line 174 of file webvttdec.c.

static int webvtt_read_close ( AVFormatContext s)
static

Definition at line 182 of file webvttdec.c.

Variable Documentation

AVInputFormat ff_webvtt_demuxer
Initial value:
= {
.name = "webvtt",
.long_name = NULL_IF_CONFIG_SMALL("WebVTT subtitle"),
.priv_data_size = sizeof(WebVTTContext),
.read_seek2 = webvtt_read_seek,
.extensions = "vtt",
}

Definition at line 189 of file webvttdec.c.