Refactor muxer to remove a lot of duplicate code. This CL strives
to not change the API as much as possible. Although, there is one
minor public API change (constructor of the Cluster class). Other
than that, all the functions should work exactly the same way as
before.
Following up on this CL, we are going to make AddGenericFrame the
preferred way of adding frames to a segment and deprecate (and
eventually remove) all the other specific AddFrame* functions.
Change-Id: Ie410f1a64a981e1545ade53ce476bbe8b3610c4f
Rename variable "frame" to "data" in all the AddFrame* functions.
This is in prepararation for a follow-up CL.
Change-Id: Ifd0d96cfbeca85c12be23d854bc87e085436984d
The third parameter of the MoveCuesBeforeClustersHelper recursive function
should always be the size of the cues element without the master element's size
(i.e.) it should be the sum of size of all Cue Points. This way, the changes in
the Length of the master element itself will be computed correctly.
Change-Id: I05ff1606fb74168f80ffed81fd3c0de3f237c579
WriteEbmlHeader function was updated on
a321704b4c. It is a public function that
is exposed outside of the library. Overload it with an old signature
to maintain compatibility. The overloaded function writes the
doc_type_version as 2 by default (thereby retaining the old behavior).
Change-Id: If887a1bfa3e81e7e639c986a922aa5155faab2cf
Adding set_uid function to the Chapter class. It can be used to
achieve deterministic output from the muxer. For example, for files
with only one segment, track number or track id can be used for
chapter uid.
Change-Id: I2e94c6150e32cb9019a6623af7919acc099aa20d
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
Allow users of libwebm's MKV muxer to control the Track UID. This,
for example, allows creation of tests that rely on checksum comparisons
to verify output from the library.
Change-Id: I8b052e6dd5af734d76122b2a1b6b16382ffba214
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
- 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
- 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
Just before the first byte of an element identifier is written
the muxer calls IMkvWriter::ElementStartNotify to report the
position of the element in the WebM stream.
Change-Id: Iac40090587bd9496b05f41203aace00902f5606e
Remove asserts on the MkvWriter pointer in each constructor,
and assign the pointer in each Init method. Update Segment::Init
usage site in sample_muxer.
Change-Id: Id940f76b50dc15603742e76afc04cdffe0ec4990