Commit Graph

274 Commits

Author SHA1 Message Date
Tom Finegan
84f2156ca1 Merge "mkvmuxer: Add DiscardPadding support." 2014-01-23 15:34:12 -08:00
Tom Finegan
5c14a3f035 mkvparser/mkvreader/sample: CRLF -> LF
Change-Id: Id4a5bea411d104289548b276d0e996352cc816b1
2014-01-23 10:57:06 -08:00
Tom Finegan
71a097fb12 mkvparser sample: clang-formatify
Exception asterisk placement, which was left as before to match the rest of
libwebm.

Change-Id: I3947acc936cca68df72a5bcd8dec17ed40658ba6
2014-01-23 10:52:46 -08:00
Tom Finegan
cd6f7bff4b mkvmuxer: Add DiscardPadding support.
Also a bit of refactoring to remove some duplicate code.

Change-Id: Ia3d17461ae5f6275534e06c31f348bdfc4bba169
2014-01-22 23:26:26 -08:00
Tom Finegan
327e8ab617 Minor clean up: msvc warnings/include order/comment text.
Change-Id: I2b54abcb9f535715d8713930942447c0b0f5f862
2014-01-22 14:03:40 -08:00
Tom Finegan
796c90798a Merge "sample_muxer: Silence MSVC warning." 2014-01-16 13:01:54 -08:00
Sergey Ulanov
0f7815b036 Add license header in sample_muxer_metadata.cc.
This is required by the checklicenses.py script in chromium.

Change-Id: Ice6155b1332adcbda74532e558438083212e1511
2014-01-16 11:31:13 -08:00
Tom Finegan
ccb7fa9c73 sample_muxer: Silence MSVC warning.
Disable C4996; A warning that encourages users to make their code
require the "secure" variant of functions like tmpnam(). Doing so
just happens to make the resulting code require the MSVC runtime.

Change-Id: I0329ce3aa93da060110d24a4bc7f48a7f9c87227
2014-01-15 15:00:59 -08:00
Tom Finegan
4ec1e5cae5 Merge "mkvmuxer: Fix warnings." 2014-01-15 14:36:06 -08:00
Tom Finegan
849093f84f mkvmuxer: CRLF->LF webmids.h.
Match the other muxer sources. Also fix declaration order
of elements in the track grouping.

Change-Id: I06fdb98eb42815af96e80e33379ef73d41b470b3
2014-01-15 12:37:15 -08:00
Tom Finegan
32e1556e68 mkvmuxer: Fix warnings.
Remove useless spam from build output.

Change-Id: Iae200d32cda1fc11cd471772725345d0979e97bc
2014-01-15 12:14:27 -08:00
Tom Finegan
5efd6e3c1d mkvmuxer: Add support for VP9 and Opus tracks.
Also make codec ID constants really constant.

Change-Id: I951d25e83ce507afb1ca475e2d5dbfe6402f3d61
2014-01-10 15:03:47 -08:00
Tom Finegan
a6c71c1407 mkvmuxer: Add support for writing CodecDelay and SeekPreRoll elements.
Change-Id: Iad8c671b76c4b97abad58946df7f3c0ebe6cb01b
2014-01-10 11:32:56 -08:00
Tom Finegan
81c1d8415c mkvparser: Add support for CodecDelay, DiscardPadding, and SeekPreRoll elements.
Change-Id: Ic9e6ebcc2ba533f8cc1ab933d0bf55782ccab932
2014-01-08 17:33:03 -08:00
Vignesh Venkatasubramanian
d2f7478148 Initializing last_block_duration_ to zero.
Adding a missing initialization.

Change-Id: Id4223765968745a46653139b2a9f1537102c3618
2013-10-30 11:13:38 -07:00
Vignesh Venkatasubramanian
fd0a65af98 Merge "Fixing a bug in Chapter::Clear" 2013-10-25 11:13:05 -07:00
Vignesh Venkatasubramanian
872cc57de4 Adding set_uid to Chapter Class
Adding set_uid function to the Chapter class. It can be used to
achieve deterministic output from the muxer. For example, for files
with only one segment, track number or track id can be used for
chapter uid.

Change-Id: I2e94c6150e32cb9019a6623af7919acc099aa20d
2013-10-25 09:33:28 -07:00
Vignesh Venkatasubramanian
ddfea3431f Fixing a bug in Chapter::Clear
Replacing a typo'd < with > in Chapter::Clear of mkvmuxer.

Change-Id: I8784d19dbca5a8a62c92ed14e2efa61d96c5375f
2013-10-25 09:12:11 -07:00
Vignesh Venkatasubramanian
4134f6e04e Adding AddLastFrame to Segment
Adding AddLastFrame function to the Segment muxer so that the duration
of the Segment can be accurately calculated given the last Block's duration.
We now provide an AddLastFrame function which will take duration of that block
as a parameter. When this function is used to add the last frame, the duration
of it is taken into account when computing the Segment's duration.

Change-Id: I3e1456299fefa1a4dd6d845c47292951d1ce3ad0
2013-10-25 08:28:23 -07:00
Tom Finegan
25025a5471 Add dependency checks to Makefile.
Avoid unfortunate things like breaking the library because the make file
was not previously checking dependencies.

Change-Id: Iab20c3cfa0d1475dfb5c54127646b351df1c4c50
2013-08-19 19:32:37 -07:00
Tom Finegan
f72dc7b052 Ignore dependency files and build products.
Change-Id: I4e9da395b8e06a696e77389d0bc863b8837eceee
2013-08-19 11:02:23 -07:00
Tom Finegan
c5892de23b Fix mkvmuxer::Track::set_uid().
Modifying const variables doesn't work.

Change-Id: Ie1aa9ce1779002973ec93f808ba5e86c569b9df4
2013-08-19 11:01:49 -07:00
Tom Finegan
15a708e416 Add set_uid() to mkvmuxer::Track.
Allow users of libwebm's MKV muxer to control the Track UID. This,
for example, allows creation of tests that rely on checksum comparisons
to verify output from the library.

Change-Id: I8b052e6dd5af734d76122b2a1b6b16382ffba214
2013-08-16 10:58:17 -07:00
Vignesh Venkatasubramanian
8206558561 Handling chunking_ being set to true on repositioning cues.
CopyAndMoveCuesBeforeClusters should return false (fail gracefully)
if chunking_ is set to true.

Change-Id: Idf4d573e3f15b59c25ee0774a7875e5dfda9c02e
2013-06-27 11:30:17 -07:00
Vignesh Venkatasubramanian
d782edd68e Update Segment size if Cues size changes on repositioning
Files created with Segment::CopyAndMoveCuesBeforeClusters can't be parsed by
libwebm because the Segment size was not updated to account for the change
in Cue size. Fixing that.

Change-Id: I993f63e5c279f131cd39c54bee40163da00b8cbd
2013-06-24 11:55:53 -07:00
Vignesh Venkatasubramanian
4ac7b755f4 Repositing Cues before Clusters
A whole new approach to repositioning Cues before Clusters. This
patchset adds a new function CopyAndMoveCuesBeforeClusters to the
Segment class. This function should be called after
Segment::Finalize() to obtain a copy of the same output file with
Cues positioned before the Clusters.

Removing everything else that was added to accomplish the same in
the previous few commits.

Also, adding std:: qualifier to one of the variables in
sample_muxer_metadata which was missed accidentally in the previous
commit.

Change-Id: I2810d06a6251325add2f5e54d32d1da6e2fe143f
2013-06-14 13:01:48 -07:00
Vignesh Venkatasubramanian
09dd90fcc7 Fully qualifiying usage of std::string
Replacing "using std::string" with fully qualified namespace on
each occurance of string in sample_muxer_metadata.cc and
webvttparser.cc.

Also fixing a formatting nit in mkvwriteeofreader.cpp

Change-Id: Icf713f9e489fbdc9af14e83d0cb7ba2e89e65ab4
2013-06-12 11:23:35 -07:00
Vignesh Venkatasubramanian
54ca052b1c Changing IMkvReadableWriter to IMkvWriteEOFReader
Changing the IMkvReadableWriter interface to IMkvWriteEOFReader.
Also changing the default implementation.

Change-Id: Id37ffd7ef0af2ff7a392fb4fb0b1b134664ab20f
2013-06-11 15:11:18 -07:00
Vignesh Venkatasubramanian
74e5f0fa1d Adding mkvreadablewriter
Adding mkvreadablewriter files which was missed from previous commit.

Change-Id: I84363ca897ebe758a42538c179ad60c2adfe9247
2013-06-03 14:26:20 -07:00
Vignesh Venkatasubramanian
9b42d039ad Support for placing Cues before Clusters
Adding support for placing Cues element before the Cluster element. We
recompute the new offsets using a recursive algorithm and update the Cues and
Seek Heads with the updates offsets.

Change-Id: I038f1a403b1defa853b9026bd3e48f4ad1006866
2013-06-03 10:27:27 -07:00
Vignesh Venkatasubramanian
3f7681d11e Merge "Fixing mistyped element name in mkvmuxerutil" 2013-05-20 17:11:11 -07:00
Vignesh Venkatasubramanian
7a64466954 Fixing mistyped element name in mkvmuxerutil
Replacing correct element name in mkvmuxerutil that was mistyped
in a previous commit.

Change-Id: Ic34f544aeeb124f0950c3f45e7b638d4616f8b86
2013-05-20 16:46:33 -07:00
Vignesh Venkatasubramanian
05912e8a96 Merge "Elements and functions to support BlockAdditional" 2013-05-07 14:17:43 -07:00
Patrik2 Carlsson
a9f43fe8e7 mkvparser: Get frame default duration
Track::GetDefaultDuration is implemented as an alternative
to VideoTrack::GetFrameRate which seems to be deprecated.

Change-Id: I2c7a6d56a232125b8632d87eab75b9600c5451e1
2013-05-02 16:04:34 +02:00
Vignesh Venkatasubramanian
5af56bb9ee Elements and functions to support BlockAdditional
Adding elements and functions to support muxing of BlockAdditional element.
This is required for supporting muxing of streams with Alpha Channel (where the
Alpha data goes into BlockAdditional). Detailed design doc of Alpha Channel can
be found here: http://goo.gl/wCP1y

Change-Id: Idac144d9588de16685734850585ab7115ddd08a4
2013-04-24 16:16:14 -07:00
Frank Galligan
64cee42b85 libwebm: Remove STL dependency from Android build.
Change-Id: Id2f378f2fa8350aae97394bd8b21918cff4d179a
2013-04-15 10:24:34 -07:00
Frank Galligan
d5cb6c7fa4 libwebm: Fix random number generation on Android.
Change-Id: I593561128aaeb5806f8f015e2de3b4c9aa4411fc
2013-04-15 09:27:34 -07:00
Frank Galligan
252bd24950 libwebm: Update Android build
- Change to libwebm.
- Add muxer support.
- Remove sample app.

Change-Id: I39c31ecbff573f86214e85b3ac08e0dcdfe22ae2
2013-04-15 09:13:07 -07:00
Michael Szal
9cb9ee4efa Removed IsOpen because it should not have been there.
Change-Id: I4d5149de362e50a8f15ebfd382e39218ca2ca560
2013-03-29 11:44:28 -07:00
Patrik Carlsson
3af8d02ca1 mkvparser: support seek for generic tracks (subtitles)
To support seek in generic tracks with subtitles the audio track
implementation of seek is made generic and inherited by audio track.

Change-Id: Ic88d2e859d077a1054b2af7d7680cfddfba8a589
2013-02-28 15:47:04 +01:00
Patrik Carlsson
0d5b3fc5ae mkvparser: add support for compression elements
ContentCompression elements are now parsed.

Change-Id: I9a67ae444ed929e49c7ea223a16c13c9d16a4c13
2013-02-28 15:46:58 +01:00
Patrik Carlsson
3980cf4159 mkvparser: read track language information
Track::GetLanguageAsUTF8 is implemented to allow the user to
choose between available audio and subtitle tracks.

Change-Id: I5ec9b1c1c00182da759681ba486cbace46e9b63f
2013-02-27 15:40:33 +01:00
Matthew Heaney
1274be1184 libwebm: fixed compilation error
Change-Id: I2dfa93f3a2470e016ca905caee33c3dceb789b57
2013-01-31 14:13:33 -08:00
Matthew Heaney
43178b4c9a libwebm: fixed rand() on windows
Change-Id: Ie17445072f10f91bdaabfba74a1be58764d78b94
2013-01-24 17:29:23 -08:00
Matthew Heaney
8376a8e9d7 mkvparser: liberalize parsing of bad elements
Normally, if a sub-element of a cluster reports a size
that lies beyond the end of its enclosing cluster, we
would treat this as a malformed stream and immediately
terminate the parse.

However, if the sub-element is not a simple block or block
group, we would ignore the (sub)element anyway, so there
doesn't appear to be any harm in just concontinuing to
ignore the (sub)element, and treating this case as if
we had reached the end-of-cluster in the normal way.

Change-Id: I16c0a44f7458823ed579612d917b09ee08a8d90a
2013-01-10 19:24:21 -08:00
David Schalig
2b09f9b53a mkvparser: ignore 0-size elements in TrackEntry
ParseTrackEntry handled MKVs with 0-sized EBML elements
as malformed. Relaxing this and allow empty elements to allow
parsing such MKV content.

Change-Id: I7e430e9b2d177df7fe1e656546f63ee8673e784e
2012-12-11 17:08:22 +09:00
Matthew Heaney
28222b4927 Add support for WebVTT cue identifier line
Modified the mkvmuxer to write the ChapterStringUID
sub-element of the Chapter Atom element.

Modified the mkvparser to read the ChapterStringUID
sub-element of the chapter atom.

Modified the vttdemux app to write the Cue Identifier
line of the WebVTT cue.

Change-Id: I06fe386f44897ada3fe10cbf89096df104dcf779
2012-11-13 12:44:06 -08:00
Matthew Heaney
0fcf5e5a40 Merge "vttdemux: add support for WebVTT chapters" 2012-11-13 09:38:29 -08:00
Matthew Heaney
c26db03d5a vttdemux: add support for WebVTT chapters
Change-Id: If5e12ff7057ce4217907ef91d493e1bcd8a72656
2012-11-12 11:52:15 -08:00
Frank Galligan
baefebcf1c libwebm: Fix BlockNumber on CuePoint
- libwebm was writing the BlockNumber of the next Block instead
  of the Block that was just written.

Change-Id: I344800fcea919a82d7f0a04a54cf510be3851ec6
2012-11-12 08:35:39 -08:00