Add support for WebVTT cue identifier line

Modified the mkvmuxer to write the ChapterStringUID
sub-element of the Chapter Atom element.

Modified the mkvparser to read the ChapterStringUID
sub-element of the chapter atom.

Modified the vttdemux app to write the Cue Identifier
line of the WebVTT cue.

Change-Id: I06fe386f44897ada3fe10cbf89096df104dcf779
This commit is contained in:
Matthew Heaney
2012-11-13 12:44:06 -08:00
parent 0fcf5e5a40
commit 28222b4927
5 changed files with 58 additions and 5 deletions

View File

@@ -1126,7 +1126,7 @@ bool Chapter::ExpandDisplaysArray() {
uint64 Chapter::WriteAtom(IMkvWriter* writer) const {
uint64 payload_size =
// TODO(matthewjheaney): resolve ID issue
EbmlElementSize(kMkvChapterStringUID, id_) +
EbmlElementSize(kMkvChapterUID, uid_) +
EbmlElementSize(kMkvChapterTimeStart, start_timecode_) +
EbmlElementSize(kMkvChapterTimeEnd, end_timecode_);
@@ -1148,6 +1148,9 @@ uint64 Chapter::WriteAtom(IMkvWriter* writer) const {
if (!WriteEbmlMasterElement(writer, kMkvChapterAtom, payload_size))
return 0;
if (!WriteEbmlElement(writer, kMkvChapterStringUID, id_))
return 0;
if (!WriteEbmlElement(writer, kMkvChapterUID, uid_))
return 0;