Re-run clang-format to pick up some missed changes over the past
few CLs. Also update the .clang-format file to break after ternary
operator.
Change-Id: Ia4ba4e58362c2dbe36aeb33894f0411af33ef17d
Per matroska semantics, all metadata blocks should be considered
key frames. Set it to true in AddMetadata functions.
Change-Id: Ibc26845dc6cc72ccbf90ae8d4dcc27c948e8a375
this is unused as the size of dates is fixed:
Date - signed 8 octets integer in nanoseconds with 0 indicating the
precise beginning of the millennium (at 2001-01-01T00:00:00,000000000
UTC)
Change-Id: I7d44c92a6b746e92e4041238b110115b56e38a93
previously IsValidTrackNumber() expected a track_number > 0
this also fixes a warning:
'comparison of unsigned expression < 0 is always false'
Change-Id: I839863986ff776aae59e38ee7e4a1a710081303a
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
DiscardPadding is a signed int.
this change fixes 2 things:
- allows negative values for discard padding
- fixes cases where an unsigned value would be written such that on read
the sign would be flipped
Change-Id: I9418da7a22c09768e02d5b61da8d01c2bccb5dee
Change acf788 added Crop* elements support, but they were not
added when calculating size of Video element.
Change-Id: I64495cc35406a28b86b40d915dbc291f45aa1263
Reject frames if an invalid track number is passed. Also change sample_muxer
to reject files which have Block elements with invalid track numbers.
Fixes Issue #659: https://code.google.com/p/webm/issues/detail?id=659
Change-Id: Ie6cf39a409b68bb4d2261f308409ee0c36d5dd8e
codec_id element for a Track is mandatory and it does not have a default.
Rejecting the file if that happens.
Change-Id: I4fb0dfcd4c09eeabf22634db7fdf6ca818c93917
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