aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
authorMatthew Heaney <matthewjheaney@google.com>2013-05-31 16:27:32 -0700
committerClément Bœsch <ubitux@gmail.com>2013-06-01 15:12:49 +0200
commit8f75ba9926c6b1377aa746ab4ee53831a395fe41 (patch)
treef3053ea04c03b23ea305852636e10c8fa69e4371 /libavcodec/avcodec.h
parent151b4947e5d21c418d5316a6d93b5b03f4be4b86 (diff)
downloadffmpeg-8f75ba9926c6b1377aa746ab4ee53831a395fe41.tar.gz
lavf/webvttdec: save cue id and settings as side data
Currently the WebVTT demuxer parses the cues but throws away the cue id (the optional first line of the cue) and cue settings (the optional rendering instructions that follow the timestamp). However, in order to write inband text tracks (to WebM files), the entire cue payload from the WebVTT source must be preserved. This commit makes no change to the data part of the output buffer packet (where the actual cue text is stored), but does add the cue id and settings as a side data items, if they're present in the cue. Existing code that cares only about the data part of the packet can continue to ignore the side data. There are two new packet data type flags, AV_PKT_DATA_WEBVTT_IDENTIFIER and AV_PKT_DATA_WEBVTT_SETTINGS.
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 93d63e8873..5ece48ce29 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1008,6 +1008,17 @@ enum AVPacketSideDataType {
* by data.
*/
AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL,
+
+ /**
+ * The optional first identifier line of a WebVTT cue.
+ */
+ AV_PKT_DATA_WEBVTT_IDENTIFIER,
+
+ /**
+ * The optional settings (rendering instructions) that immediately
+ * follow the timestamp specifier of a WebVTT cue.
+ */
+ AV_PKT_DATA_WEBVTT_SETTINGS,
};
/**