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
- Fixed a bug with the muxer where it would generate a entry in
the SeekHead for a Cues element with OutputCues set to false.
- Fixed a bug with the muxer where it would generate an empty
Cues element with OutputCues set to false.
- Issue:http://code.google.com/p/webm/issues/detail?id=383
Change-Id: I99cc404a7e8ad61759dbb57ab769625dd724240c
- 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
There was a potential bug with calculating the size of a master
element. The size was being calculated with a straight unsigned
integer when it should have been calculated with a coded
integer.
Change-Id: I68422ecdb7818af51ded2953a8914fcdc8858f7a
Fixes reliability issue with IMkvWriter::ElementStartNotify: the
cluster and segment IDs were being written with SerializeInt instead
of WriteID.
Also:
- Remove completed TODO.
- Fix method declaration order in MkvWriter.
Change-Id: Ie37e141169af6e0ca7d931cc39f001722e7b9078
Segment::AddFrame will now return false (fail) when a non-monotonically
increasing timestamp value is passed to the method.
Change-Id: Icfac093e6bddf18e3ef252df79e35c33dbe1e134
- Fix return values; use EXIT_FAILURE and EXIT_SUCCESS
instead of -1 and 0.
- Use C++ versions of C library includes.
Change-Id: Ib3a36e799d6a91b7fea0f328480e977ef21ca260
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
NDEBUG is defined in our release build, which allowed for misuse of
the library by users that would result in dereferencing NULL
MkvWriter pointers in various places throughout the muxer code.
Change-Id: I6ab51453ef26786ca988310c051bb49db16ecbc5
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
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
If the muxer had audio frames that were earlier in time than the
first video frame then the first cluster would not be initialized
in time to write out the first audio frames.
Change-Id: I6a2ca25a25c326a4215c307bdae666db9107e9b5
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
This commit addresses three types of warnings:
* constructor initialization order inconsistencies
* statements with no effect
* possible use of uninitialized fields
Change-Id: I572ccdc6813d8cfeff3e9e06d7acf6a8ab5ac7b1