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
- Fix return values; use EXIT_FAILURE and EXIT_SUCCESS
instead of -1 and 0.
- Use C++ versions of C library includes.
Change-Id: Ib3a36e799d6a91b7fea0f328480e977ef21ca260
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
Changed max_cluster_duration to 30 seconds so default command line
will not crash on audio only WebM files. Added support to the sample
muxer to output cues on the audio track. Created a muxer helper
function to clean up the code a little.
Change-Id: I2871836b64cef7defd10aa51a209b4abd9046832
Makefile:
- Add a new target that makes a single libwebm.a instead of building
separate muxer and parser libraries.
- Update sample targets accordingly.
Visual Studio:
- Use a single project for muxing and parsing, and build a single library
name libwebm.lib.
- Update code generation settings (DLL -> static runtimes).
- Use C7 debug information format (instead of PDB)
- Disable minimal rebuild (C7 use causes warning otherwise).
Change-Id: Ie221d4ee02c93f98f2521757c08b75ecbf75f54f
Updated some long assignment statements to indent 4 per the
coding guide. Added explicit calls to Close on the reader and
writer objects.
Change-Id: I149326c3a07543d7eb9323c702cf13852c5bc3c2
Squashed commit of the following:
9f73b86 Updated code to Google C++ style guide.
8580901 Added support for linux.
fd0b59c Fixed segment size issue.
d51d5ef Added more Track and Video options.
0fc73fd Fixed issue where cue point was being written out on wrong
track.
fcfdd07 Updated sample_muxer to read in a webm and output a webm file.
Added some options to sample_muxer. Fixed writing out unknown
size.
285c558 Added support for muxer guideline "Audio that matches video key
frame should be in the same cluster." Added support for
block_number in cue points. Added support for setting max
cluster size.
f956dec Add support for setting the max duration for all clusters.
92ca53e Add support for Cues element.
d6b4cba Added typedefs for unsigned long long, long long, and unsigned
char. Reformated some code.
1b1f8b2 Added support for SeekHead element. Added WriteVoidElement
function.
8faa187 Add support for CodecPrivate. Add support for updating
SegmentInfo duration. Add support for updating Segment size.
Added new sample that swicthes the tracks.
1dd3555 Refactored some code. Check to see if track is a video track if
starting a new cluster on a key-frame.
1bc8374 Refacotrs code so Cluster is in charge of wirting out its own
data.
836cd74 Added basic cluster and simple_block support for writing frames.
cc48cc2 Add simple support for Audio tracks.
4efd614 Added support for using the encoded ID value for the elements.
fb8b5a6 Initial commit of libwebm muxer.
Removed switch_sample project. Fixed initialization order warnings on
Linux. Reformatted code to follow Google C++ style guide. Fixed Makefile.
Removed tester.cpp.
Change-Id: I4857042f804edb834be52787a7d5ccdd578b7275