OpenFFmpeg
Classes | Macros | 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"
#include "libavutil/opt.h"

Classes

struct  WebVTTContext
 

Macros

#define SET_SIDE_DATA(name, type)
 
#define OFFSET(x)   offsetof(WebVTTContext, x)
 
#define KIND_FLAGS   AV_OPT_FLAG_SUBTITLE_PARAM
 

Variables

AVInputFormat ff_webvtt_demuxer
 

Detailed Description

WebVTT subtitle demuxer.

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

Macro Definition Documentation

§ SET_SIDE_DATA

#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)
uint8_t * av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int size)
Allocate new information of a packet.
Definition: avpacket.c:329

Variable Documentation

§ ff_webvtt_demuxer

AVInputFormat ff_webvtt_demuxer
Initial value:
= {
.name = "webvtt",
.long_name = NULL_IF_CONFIG_SMALL("WebVTT subtitle"),
.priv_data_size = sizeof(WebVTTContext),
.read_probe = webvtt_probe,
.read_header = webvtt_read_header,
.read_packet = webvtt_read_packet,
.read_seek2 = webvtt_read_seek,
.read_close = webvtt_read_close,
.extensions = "vtt",
.priv_class = &webvtt_demuxer_class,
}
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
Definition: webvttenc.c:31