Track::GetDefaultDuration is implemented as an alternative
to VideoTrack::GetFrameRate which seems to be deprecated.
Change-Id: I2c7a6d56a232125b8632d87eab75b9600c5451e1
To support seek in generic tracks with subtitles the audio track
implementation of seek is made generic and inherited by audio track.
Change-Id: Ic88d2e859d077a1054b2af7d7680cfddfba8a589
Track::GetLanguageAsUTF8 is implemented to allow the user to
choose between available audio and subtitle tracks.
Change-Id: I5ec9b1c1c00182da759681ba486cbace46e9b63f
Normally, if a sub-element of a cluster reports a size
that lies beyond the end of its enclosing cluster, we
would treat this as a malformed stream and immediately
terminate the parse.
However, if the sub-element is not a simple block or block
group, we would ignore the (sub)element anyway, so there
doesn't appear to be any harm in just concontinuing to
ignore the (sub)element, and treating this case as if
we had reached the end-of-cluster in the normal way.
Change-Id: I16c0a44f7458823ed579612d917b09ee08a8d90a
ParseTrackEntry handled MKVs with 0-sized EBML elements
as malformed. Relaxing this and allow empty elements to allow
parsing such MKV content.
Change-Id: I7e430e9b2d177df7fe1e656546f63ee8673e784e
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
Formerly, it was only possible to create instances of
the Track subclasses, VideoTrack and AudioTrack. However,
we now populate WebM files with WebVTT metadata blocks,
so we must allow for a third kind of track object.
We now enable instances of type Track to be created,
by providing a new factory function, Track::Create, and
making all Track methods non-pure and with a generic
implementation.
Change-Id: I7d4c965eb566b9fc2f5ceefe1d43723cf8c1e5f0
- Segment::CreateInstance was treating the available data as EOF
and returning errors.
- Added a check for potential underflow if the segment was not the
first element after the EBML header.
Change-Id: I481bf0eea71eeb3def3bf54ec251be0b2ae13536
- Added ContentEncAESSettings, AESSettingsCipherMode,
AESSettingsCipherInitData elements to the parser and muxer.
- Changed ParseContentEncodingsEntry, ParseContentEncodingEntry,
and ParseEncryptionEntry to use PasreElementHeader.
- Added ParseContentEncAESSettingsEntry function.
- PS6 removed AESSettingsCipherInitData.
- PS9 Addressed comments, Fixed some LINT issues, and converted
mkvwriter.h/.cpp to Unix line endings.
- PS10 Addressed comments.
Change-Id: I9d96a0c194f74a6c9bf0001aa0286196e410f07e
In several cases, the parser would parse a header
(say, a track header, or the segment info header)
in the constructor for the type. The parser had
assumed (incorrectly) that the file was well-formed,
but this turned out to be an incorrect assumption.
The parse errors triggered some assertion failures,
but this is not acceptable in a production system.
The parser solved that problem by separating the
construction of the header object from the parsing
of the file. There is now a separate parse method
to be called after construction of the object,
which returns a status whether the parse was
successful.
This change fixes the bugs from the following
tracker issues:
http://code.google.com/p/webm/issues/detail?id=399http://code.google.com/p/webm/issues/detail?id=400
Change-Id: Idb09154ae7008429d8613ce3b3e8294f5a12de86
Previously, parsing of a Block element was done inside its
constructor. Parsing errors were handled via assertion checks,
but this only works in practice if there are no actual errors
in the file.
We did come across a file, however, that used EMBL-style lacing,
but the lacing was done incorrectly and so the parse asserted.
This isn't acceptable for a production system, and more a graceful
handling of parse errors was needed.
The code was restructured such that the Block object's ctor does
only trivial initialization of member variables. A separate Parse
method was added, that is called after the object is constructed.
If the parse succeeds all is well, otherwise the object is destroyed
and the error is reported to the caller.
This commit fixes bug tracker issue #398, described here:
http://code.google.com/p/webm/issues/detail?id=398
Change-Id: Ib95ca95d0eec08cf670b308c461e42ed8345e890
Added support for the ContentEncoding element to be added to a
Track element for muxing. Currently only one ContentEncoding may
be added. The ContentEncoding must be encryption of the whole
frame with AES.
Added support for parsing the ConentEncoding elements. Currently
the parser does not parse any ContentCompression elements.
Change-Id: Ie199116a1bcc18a0c2b5eea3dba6622887c108c8
This commit addresses three types of warnings:
* constructor initialization order inconsistencies
* statements with no effect
* possible use of uninitialized fields
Change-Id: I572ccdc6813d8cfeff3e9e06d7acf6a8ab5ac7b1