matthewjheaney
9a561ab4dd
libwebm: handle negative time for a block
...
Change-Id: Iafa0254fb1554621b42635cb99d40b2c0177468f
2012-05-11 11:53:23 -04:00
matthewjheaney
041a5c5811
Parse headers outside of constructor
...
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=399
http://code.google.com/p/webm/issues/detail?id=400
Change-Id: Idb09154ae7008429d8613ce3b3e8294f5a12de86
2012-03-13 14:40:17 -04:00
matthewjheaney
6fa7c7611c
Block parsing is now robust
...
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
2012-02-28 14:03:21 -05:00
matthewjheaney
4c682199b0
mkvparser: cache SeekEntry start and size
...
Change-Id: I54a0ac4035f7174f51ae2145dedb1c3ed5ad7ec8
2011-12-08 16:07:15 -05:00
matthewjheaney
9303667611
parse void elements in seek head
...
Change-Id: Ifc8841909f6aa877108abebb5b5623c2344d0e35
2011-11-17 19:08:48 -05:00
Frank Galligan
4affedd0a7
Add support for encryption elements.
...
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
2011-11-04 14:09:56 -04:00
matthewjheaney
1ae4335c1c
libwebm: liberalize handling of reference blocks
...
Change-Id: I3df0235e005c57507eb974ad3754b4c800a99825
2011-08-09 16:03:50 -04:00
matthewjheaney
9ecedef185
libwebm: include <cstddef>
...
Change-Id: Ieba2507dd82b34558ffef4febb6f80225009cc30
2011-05-03 15:48:13 -04:00
matthewjheaney
3395c36a8e
libwebm: added UnserializeInt function
...
Change-Id: I2298e547cd38d3aea04c0c993a67e5e291b8fea8
2011-04-05 20:55:26 -07:00
matthewjheaney
ffe5a8e548
libwebm: added GetLacing selector function for Block
...
Change-Id: I77bff875919f7a57a8c838beb05bc9a992cadacd
2011-04-05 20:55:25 -07:00
matthewjheaney
a9c65fbbc0
libwebm: added BlockEntry::GetKind op
...
Change-Id: I7d7daac0d3b8be1b8839f96503250170f675e34d
2011-04-05 20:55:24 -07:00
matthewjheaney
31a9d5470e
libwebm: don't alloc block object in block group
...
Change-Id: I55ff9451591da86b89ed58c22eb9778317b89364
2011-04-05 20:55:23 -07:00
matthewjheaney
2b84a12da8
libwebm: removed old Cluster::Load
...
Change-Id: I02448e6c9d5850368282353dba40a549753c26bc
2011-04-05 20:55:22 -07:00
matthewjheaney
bd833a82e4
libwebm: removed old LoadBlockEntries
...
Change-Id: I340f444f719fa9c5d9da986f1527522d8a5f9812
2011-04-05 20:55:21 -07:00
matthewjheaney
7b07758854
libwebm: refactor BlockEntry class
...
Change-Id: I68d799d5b928de0ff7be293731ab73750c7cbb86
2011-04-05 20:55:20 -07:00
matthewjheaney
00ed87aad6
libwebm: Block::GetIndex returns type long
...
Change-Id: I7b233a18b5054398ae22696148ede17817ea608a
2011-04-05 20:55:11 -07:00
matthewjheaney
70f9644a8d
libwebm: restored Cluster::GetLast
...
Change-Id: I73564fb508e23004392b5aaab1f1ad7cdedc8bb1
2011-03-19 10:34:12 -04:00
matthewjheaney
2083c72300
libwebm: removed LoadBlockEntries
...
Change-Id: I1d65c07d91de568573f48e9fddf83b4c5672871d
2011-03-18 21:43:06 -04:00
matthewjheaney
f5ec272e54
libwebm: removed Cluster::Load (non-incremental)
...
Change-Id: I1f2ad153e0c643d04fa1fe1ec85410bbef1954ef
2011-03-18 11:18:46 -04:00
matthewjheaney
31b2d8689c
libwebm: parse unkown cluster size
...
Change-Id: I74f7f552185aafaa4466556644e95c3a25063a08
2011-03-07 21:11:57 -05:00
matthewjheaney
227d62aadf
libwebm: changed type from size_t to long
...
Change-Id: I5a684628119877a2f89116b760a1c7e41716748d
2011-03-02 19:05:28 -05:00
matthewjheaney
85beb00fe3
libwebm: changed idx from size_t to long
...
Change-Id: I7ea9637ab3c55d7535fe9f2fe11fe88f4d47e474
2011-03-02 18:21:21 -05:00
matthewjheaney
eb4bd69098
libwebm: do not lazy-load cue points
...
Change-Id: I07646f1942d1f473f051ff8ab0aa07b2f4381d4c
2011-02-26 16:59:42 -05:00
matthewjheaney
cf36dc2848
libwebm: added Cues::GetCount
...
Change-Id: I5b2bca8fd7229318783d9b97c50a4e20ce2ba640
2011-02-26 11:50:23 -05:00
matthewjheaney
a1aa16692a
libwebm: added support for incremental cluster parsing
...
Change-Id: Idb1bd292a01b7c9971967760ad016691ac628c29
2011-02-22 11:51:23 -05:00
matthewjheaney
5ac9764a95
libwebm: liberalized parsing of next cluster
...
Change-Id: I166ecfb5a76d475b77c3e418c4ae91195ff58d32
2011-02-13 19:00:31 -05:00
matthewjheaney
5e72a2dfc2
libwebm: changed signature of CuePoint::GetTime
...
Change-Id: Ia80da8af5607c7067e848bafd453842cfe8cfcca
2011-01-28 00:52:13 -05:00
matthewjheaney
a131a01446
libwebm: incrementally load block entries
...
Change-Id: I566df5979e7638b6a5411a3338bbb0cf7d9ad111
2011-01-25 23:01:51 -05:00
matthewjheaney
94f2d589fc
libwebm: tolerate errors in SeekHead element
...
Change-Id: I380f43dd495dc5107f5df37f9d05ff67da4f8424
2011-01-24 20:50:12 -05:00
matthewjheaney
6e723319e8
added support for incremental (partial) loading
...
Change-Id: Ic411e6214fdfc3e23a7e3f621f9fb8be0d650d50
2011-01-21 20:04:58 -05:00
matthewjheaney
9911f61616
incrementally parse cue points
...
Change-Id: I83699208eabb2433b25f634927b7c0be8623c3a2
2011-01-19 21:22:37 -05:00
matthewjheaney
00aa1804e9
Segment::ParseHeaders return wrong result when underflow
...
Change-Id: Iabdec9c2f062ec2fc6c9edeec208c4efc07c8307
2011-01-13 22:53:54 -05:00
matthewjheaney
bb8dfbe026
Segment::ParseNext is implemented
...
Change-Id: I31100afd4c16c48b366b7a29bec597909f9e2bbc
2011-01-13 15:11:33 -05:00
Hwasoo Lee
b81751642e
initialized members using initialize list of EBMLHeader
...
Change-Id: I5bb46132141d7381dd23e0a3b87a3b6c0e8b7f4b
2011-01-13 15:00:16 -05:00
Frank Galligan
d1aff34626
Added EBML element start and size to Segment Info, Tracks, Track,
...
Cluster, Cues, and CuePoint. The information was needed for some
tools bieng worked on. Element start is byte offset of the EMBL ID's
first byte.
Change-Id: I64e0a48932630e0a5269418f4979487d6d7bce60
2011-01-05 13:57:29 -05:00
matthewjheaney
3ba8df9a64
return invisible flag setting
...
Change-Id: I1953b0a590813302054245b8ceb5430aa1d9d09b
2010-12-14 15:05:35 -05:00
matthewjheaney
93263f0b4a
return error when no segment id found
...
Change-Id: I291335dc726171f7eb3820b9ade2d261a33500ff
2010-12-03 11:57:53 -05:00
matthewjheaney
e1e757f919
LoadCluster passes back posn and size
...
Change-Id: I91b3c2234f7621139a5cae2d71af7301a30c027e
2010-11-30 12:49:20 -05:00
matthewjheaney
fd1d8006f0
moved seek function from segment to track
...
Change-Id: Ie34549cea4c5d961b6cc04ef229a3eadc1f0ee3b
2010-11-22 15:57:25 -05:00
matthewjheaney
be2f81abca
filter out empty clusters
...
Change-Id: Iad4da9d55c1cfc332042d0017bd5d77e9ad511b6
2010-11-18 19:28:50 -05:00
matthewjheaney
cb5414a42a
changed semantics of m_entries_count
...
Change-Id: I114b1482239cced838932f35ca4b5ae380f0d022
2010-11-18 17:30:12 -05:00
matthewjheaney
2ce6965b2d
GetEntry now accepts a time
...
Change-Id: I850cfa1deaae465b91c9f65b774ad49cce9e8b8d
2010-11-17 14:27:55 -05:00
Hwasoo Lee
d97f236f81
fixed the issue 234
...
Change-Id: Ie527263ae2862426e8c58fce13b34da4c792cc01
2010-11-16 14:54:14 -05:00
Ryan Thompson
14e42cf98b
Made getcluster call const
...
As Inherited from the super class this call should also be const.
2010-11-08 16:14:04 -05:00
matthewjheaney
95c134ad53
ensure const correctness
...
Change-Id: Ia401d66519d1d663e9630ad1e70f18adec0f0bb5
2010-11-04 19:15:16 -04:00
matthewjheaney
7adec5248a
added lacing support
...
Change-Id: I79ce0b6820f62846b05edbc8a0cb381aa2bc32a6
2010-11-02 11:44:31 -04:00
matthewjheaney
ed90de0d52
check lacing bits
...
Change-Id: Iaa3a65429b7f3211868a86bbb83ce8018350554a
2010-10-29 14:04:43 -04:00
matthewjheaney
a01e568293
removed IsBFrame selector
...
Change-Id: Iae51165c318997a9131e9af5c667cfac1f37e773
2010-10-28 17:28:59 -04:00
matthewjheaney
fc12207e15
handle case when no duration
...
Change-Id: I694f6ce6ae9ecc6fc3b90b954dd7041e82fb9ac0
2010-10-22 13:46:39 -04:00
matthewjheaney
16934eb76f
separate cue-based searches
...
Change-Id: I5d98be1c9c5bc33b4ef216f48de22220f38c0f36
2010-10-13 13:44:13 -04:00