Per matroska semantics, all metadata blocks should be considered
key frames. Set it to true in AddMetadata functions.
Change-Id: Ibc26845dc6cc72ccbf90ae8d4dcc27c948e8a375
Use Segment::AddGenericFrame to add frames to the output file. The
other AddFrame* functions will soon be deprecated and this will be
the preferred way of adding frames.
Change-Id: I3ed862543a1e0199617dc613a1760ff5f233ce7d
Malformed files would cause the parser to assert.
Instead now it stops parsing and skips the segment.
Change-Id: I07e3baf5c9eb6feb115e155f226d8abc2c37698e
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
If a malformed webm file contains invalid information on the Cues
the segment, the parser would assert.
Instead, now it ignores the Cues and skips the segment.
Change-Id: I9270f6a0935ce9e9a3765a5f324ae542c1ade1c7
The existing CMakeLists.txt ends up generating a static library
with name "liblibwebm.a" rather than "libwebm.a". This patch fixes
it.
Change-Id: I4dabac5158530714a38045b8af29e75ade0a939e
- These files facilitate project/makefile generation.
- Remove old Visual Studio projects.
- Rename Makefile to Makefile.unix.
Change-Id: If786edd75d44c462538526c286eccc5cbf15d828
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
previously only empty clusters of known size were accepted; with
clusters of unknown size the cluster has been successfully parsed and a
working copy of the file position updated, so parsing can continue.
clusters of this type are discarded as clusters of known size currently
are.
Change-Id: I3ef848768519ab7f1887a11629c50af72249cead
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
the element length was being read twice; the second attempt would
consume a portion of the discard padding field often failing due to
limitations in GetUIntLength.
Change-Id: Ibbe3f082e2d05460734a0e1f7d23f3c665e3f24b
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
mkvparser::UnserializeUInt() assumes that unsigned values never have
their high bit set. This is too limiting for UUIDs. In addition, the
Chapters::Atom::Parse() method would truncate a "negative" 64-bit UUID
value to 32 bits and return the truncated value as a status code.
This value then might or might not be treated as an error by the caller
depending on whether the truncated value was itself negative.
Change-Id: I15624ac62d0b02691a1405ee6a5f7eb441b3bc48
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