Commit Graph

394 Commits

Author SHA1 Message Date
Matthew Heaney
db20aaa2b1 mkvmuxer: refactored code that creates a new cluster
Change-Id: I5db03b0e1ea23f45820dd47b7be9e4b0422f3e6a
2012-09-14 10:17:09 -07:00
Matthew Heaney
c9e284b9e7 refactor code to make a new cluster
Change-Id: Ifa7938134494e3524d6479bd026aea6d1b309d52
2012-09-13 10:15:59 -07:00
Matthew Heaney
07ac1947f0 Change return type of Segment::WriteFramesAll()
Change-Id: I7fb45f1779c384bcc1cdea507f1f2f51c28dd827
2012-09-12 10:29:40 -07:00
Matthew Heaney
0edf087bbb Refactor Cluster::AddFrame member function
Change-Id: Ibff460918243647eb76785508bb50490bc1d8561
2012-09-11 14:58:56 -07:00
Matthew Heaney
c425e965aa add operation to write metadata block
Change-Id: I08f6c7f71dbc9b0d9ce15c08cf288f4918b2c22a
2012-09-05 15:44:45 -07:00
Matthew Heaney
ed6282b2d6 webvttparser more closely conforms to style rules
A few adjustments we made such that the webvttparser
now conforms more closely to the Google C++ style guide.

Change-Id: Iefb2242678ceea6ab5b9daa3a046980deb6cd91c
2012-08-30 15:24:20 -07:00
Matthew Heaney
282a67599c added dumpvtt app
Change-Id: I9eba00412bbd05641dafd1a6cfc4656bda8bb8c2
2012-08-23 14:00:57 -07:00
Matthew Heaney
adebb53754 added webvtt parser
Change-Id: Icef6d484e8fe6e2c63dc69ab02b6ab37ffcabbd8
2012-08-16 16:39:07 -07:00
Frank Galligan
a320f5be63 Add CTR encryption.
- Added ContentEncAESSettings, AESSettingsCipherMode,
  AESSettingsCipherInitData elements to the parser and muxer.
- Changed ParseContentEncodingsEntry, ParseContentEncodingEntry,
  and ParseEncryptionEntry to use PasreElementHeader.
- Added ParseContentEncAESSettingsEntry function.
- PS6 removed AESSettingsCipherInitData.
- PS9 Addressed comments, Fixed some LINT issues, and converted
  mkvwriter.h/.cpp to Unix line endings.
- PS10 Addressed comments.

Change-Id: I9d96a0c194f74a6c9bf0001aa0286196e410f07e
2012-07-27 09:34:31 -07:00
Frank Galligan
c4d2b27b7a Add support for DLL configurations.
- Added "Release DLL" which uses /MTd and "Debug DLL" which
  uses /MDd.

Change-Id: Ibdaf58995e5ee94c34d52ece64e2f8f01524e9cd
2012-07-25 08:41:01 -07:00
Frank Galligan
13a90600ea Muxer fix for chunking file names on Linux.
Change-Id: Ica2dbfc7af64a83fc8f08d35196eabf1dd69f2f0
2012-07-12 08:01:55 -07:00
matthewjheaney
478b524df3 version 1.0.0.25
Change-Id: I438d43572f450bb6e151d4a1ede077ff22252d1f
2012-05-30 15:42:33 -04:00
Tom Finegan
010a457bc9 Add Visual Studio 2010 projects and solution.
Change-Id: I6387f1e6d68b05b8f605f155784c1025f85c1a5b
2012-05-30 14:18:23 -04:00
Tom Finegan
47a09523b2 Ignore visual studio 2010 temporary files.
Change-Id: I18d214b5ba032ff71af2fa67e72a92715636513c
2012-05-30 14:18:22 -04:00
Tom Finegan
84bf4a41dc Move build output outside the repository directory.
Change vs2008 output and intermediate directories to:
1. Avoid build output collisions when using vs2008 and vs2010 on the
   same system (makes no difference until subsequent commit adding
   vs2010 support).
2. Keep the tree clean.

Change-Id: Ie819e57421b7df90244eebffc0f5e608bc135930
2012-05-30 14:18:22 -04:00
Tom Finegan
177df33d25 Move the muxer sample source file and project.
They now reside in the same place as the parser sample.

Change-Id: Idb4471ea81a3d91eeeaf1b36053187203de9a21f
2012-05-30 14:18:08 -04:00
Tom Finegan
4fff53441d Remove visual studio 2005 projects and solution.
Change-Id: I1d4d8cffeb8997eee415246753ea3c29c1af45ec
2012-05-30 11:36:31 -04:00
Tom Finegan
ca13a5bae0 Rename sample_muxer.vcproj to sample_muxer_2008.vcproj.
Also update the solution file path to the project.

Change-Id: I7e83b99893bcde5429e6de03772c61369b29d332
2012-05-29 10:55:00 -04:00
Tom Finegan
cb69e608b4 Enable auto CRLF for visual studio project and solution files.
Change-Id: I23ca85442173eec7a144c001080ca8a3b41609f3
2012-05-29 10:45:59 -04:00
Tom Finegan
f6b0408aba Use LF as EoL in visual studio solutions and projects.
Makes files easier to read in gitweb, and prevents conflict with
upcoming .gitattributes change.

Change-Id: I185e496d8df8efb4987bfb848a582f7d0da81fb8
2012-05-29 10:43:40 -04:00
matthewjheaney
9a561ab4dd libwebm: handle negative time for a block
Change-Id: Iafa0254fb1554621b42635cb99d40b2c0177468f
2012-05-11 11:53:23 -04:00
Frank Galligan
0568dd63a6 Memory Leak Fix in Muxer.
- Track language_ and name_ member variables were not properly
  deleted.
- http://code.google.com/p/webm/issues/detail?id=416

Change-Id: Id0da669c347270cd355ad0b5e1e45ebf6415e367
2012-04-17 15:28:28 -04:00
Frank Galligan
56488f73ef Merge "sample_muxer: Fixed bug with outputting audio cues." 2012-03-16 08:06:54 -07:00
Frank Galligan
f270ddaeb8 sample_muxer: Fixed bug with outputting audio cues.
- For muxed content with default settings the cues was getting
  output on the audio track when it should be on the video track
  by default.
- Added check to command line parameter parsing to make sure
  there are enough parameters.
- If Cues are set to output on one type of track the other type
  is now disabled.

Change-Id: I96ef1978dc3f442f34364f6dee6cfb01571c7289
2012-03-16 09:26:28 -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
71d296e44c Merge "mkvparser: overflow in biased count of laced frames" 2012-02-23 18:07:34 -08:00
matthewjheaney
72052ed8b1 mkvparser: overflow in biased count of laced frames
Change-Id: I946b233d559186fc8a24d0769607075333598191
2012-02-23 13:33:46 -05:00
Frank Galligan
a88d62b682 Fix muxer output with no Cues.
- 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
2012-02-16 16:34:59 -05:00
Frank Galligan
28d54555a7 Fix for audio and video track size calculation.
- 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
2012-01-25 13:23:40 -05:00
Frank Galligan
359b3654ad Merge "Fix bug with calculating master element sizes." 2012-01-25 10:01:39 -08:00
Frank Galligan
000944c4e4 Fix bug with calculating master element sizes.
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
2012-01-25 10:28:26 -05:00
Tom Finegan
8da8206fa0 mkvmuxer: Use WriteID for all element IDs.
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
2012-01-23 16:42:03 -05:00
Tom Finegan
7a9a72f984 mkvmuxer: Disallow non-monotonically increasing timestamps.
Segment::AddFrame will now return false (fail) when a non-monotonically
increasing timestamp value is passed to the method.

Change-Id: Icfac093e6bddf18e3ef252df79e35c33dbe1e134
2012-01-20 15:59:38 -05:00
Tom Finegan
d2327e2b65 sample_muxer: Cosmetics.
- Fix return values; use EXIT_FAILURE and EXIT_SUCCESS
  instead of -1 and 0.
- Use C++ versions of C library includes.

Change-Id: Ib3a36e799d6a91b7fea0f328480e977ef21ca260
2012-01-19 20:21:36 -05:00
Tom Finegan
1e37a264f1 mkvmuxer: Add element start notification.
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
2012-01-19 20:21:35 -05:00
Tom Finegan
01d5924817 mkvmuxer: Cosmetics.
- Use c++ versions of C library includes.
- Make Segment::~Segment non-virtual.

Change-Id: I868c1f3769b5a87362efe99383cca880586b57f3
2012-01-19 20:21:35 -05:00
Tom Finegan
a20f4255c7 mkvmuxer: Return errors instead of using assert.
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
2012-01-19 20:21:30 -05:00
Tom Finegan
69df730519 mkvmuxer: Add Init method to Cluster and Segment.
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
2012-01-19 20:21:25 -05:00
Tom Finegan
f7aa8ab33d Merge "Add output of elements to separate files." 2012-01-18 13:54:56 -08:00
Frank Galligan
73ad7bd83c Add output of elements to separate files.
Support outputting header, clusters, and cues to separate files.

Change-Id: Ia89bf59ddbddc094c3daf944123fd01630ae9193
2012-01-18 16:02:43 -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
Frank Galligan
23808a7ba4 Switch AddFrame parameter to const.
Change-Id: I4ae4ac3a57f91eb19a7bb1b1d1c63fe64128efe2
2011-10-27 13:21:04 -04:00
Frank Galligan
32227e70c1 Fix for writing audio to first cluster.
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
2011-09-13 11:41:15 -04:00
Frank Galligan
2d3461b4b3 Add support for setting track numbers.
When adding tracks to the muxer the application can set the
track number.

Change-Id: Id4dbbfec5cd541b1354c03361a40a3d2d7f921b9
2011-08-15 15:29:20 -04:00
Frank Galligan
a09f15f00e Better support for audio only webm files.
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
2011-08-14 10:49:50 -04:00
Tom Finegan
6d99850e7c Build muxer and parser into a single library.
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
2011-08-11 17:19:45 -04:00
matthewjheaney
1ae4335c1c libwebm: liberalize handling of reference blocks
Change-Id: I3df0235e005c57507eb974ad3754b4c800a99825
2011-08-09 16:03:50 -04:00