According to matroska specification, TrackType is a mandatory element without a
default value [1]. But we have been producing invalid matroska files when
TrackType is never specified because we write 0 by default.
This patch will reject writing a track without specifying the TrackType value.
Specifically, this path will be triggered when Segment::AddTrack() is called
but there is no subsequent call to Track::set_type().
[1] http://www.matroska.org/technical/specs/index.html#TrackType
Fixes issue #769: https://code.google.com/p/webm/issues/detail?id=769
Change-Id: I4d75d169fd96c7e1fad278561f0e7a3e1135989c
Adding AddLastFrame function to the Segment muxer so that the duration
of the Segment can be accurately calculated given the last Block's duration.
We now provide an AddLastFrame function which will take duration of that block
as a parameter. When this function is used to add the last frame, the duration
of it is taken into account when computing the Segment's duration.
Change-Id: I3e1456299fefa1a4dd6d845c47292951d1ce3ad0
Files created with Segment::CopyAndMoveCuesBeforeClusters can't be parsed by
libwebm because the Segment size was not updated to account for the change
in Cue size. Fixing that.
Change-Id: I993f63e5c279f131cd39c54bee40163da00b8cbd
A whole new approach to repositioning Cues before Clusters. This
patchset adds a new function CopyAndMoveCuesBeforeClusters to the
Segment class. This function should be called after
Segment::Finalize() to obtain a copy of the same output file with
Cues positioned before the Clusters.
Removing everything else that was added to accomplish the same in
the previous few commits.
Also, adding std:: qualifier to one of the variables in
sample_muxer_metadata which was missed accidentally in the previous
commit.
Change-Id: I2810d06a6251325add2f5e54d32d1da6e2fe143f
Changing the IMkvReadableWriter interface to IMkvWriteEOFReader.
Also changing the default implementation.
Change-Id: Id37ffd7ef0af2ff7a392fb4fb0b1b134664ab20f
Adding support for placing Cues element before the Cluster element. We
recompute the new offsets using a recursive algorithm and update the Cues and
Seek Heads with the updates offsets.
Change-Id: I038f1a403b1defa853b9026bd3e48f4ad1006866
Adding elements and functions to support muxing of BlockAdditional element.
This is required for supporting muxing of streams with Alpha Channel (where the
Alpha data goes into BlockAdditional). Detailed design doc of Alpha Channel can
be found here: http://goo.gl/wCP1y
Change-Id: Idac144d9588de16685734850585ab7115ddd08a4
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
- libwebm was writing the BlockNumber of the next Block instead
of the Block that was just written.
Change-Id: I344800fcea919a82d7f0a04a54cf510be3851ec6
- 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
- Fixed a bug with the muxer where it would generate a entry in
the SeekHead for a Cues element with OutputCues set to false.
- Fixed a bug with the muxer where it would generate an empty
Cues element with OutputCues set to false.
- Issue:http://code.google.com/p/webm/issues/detail?id=383
Change-Id: I99cc404a7e8ad61759dbb57ab769625dd724240c
- There was a bug where the calculation for the audio and video
track size where the code would calculate the size of the track
elements minus the size of the audio or video elements. If the
coded size of the track elements was one byte smaller than with
the audio or video elements then the muxer would return an
error.
- Fixed another issue that the track's virtual Size function was
calling the Track's PayloadSize function where it should have
been calling the virtual PayloadSize function.
Change-Id: Ie6d66d6d720334180a11e06926a3bd8c7788a1f1
There was a potential bug with calculating the size of a master
element. The size was being calculated with a straight unsigned
integer when it should have been calculated with a coded
integer.
Change-Id: I68422ecdb7818af51ded2953a8914fcdc8858f7a
Fixes reliability issue with IMkvWriter::ElementStartNotify: the
cluster and segment IDs were being written with SerializeInt instead
of WriteID.
Also:
- Remove completed TODO.
- Fix method declaration order in MkvWriter.
Change-Id: Ie37e141169af6e0ca7d931cc39f001722e7b9078
Segment::AddFrame will now return false (fail) when a non-monotonically
increasing timestamp value is passed to the method.
Change-Id: Icfac093e6bddf18e3ef252df79e35c33dbe1e134