Commit Graph

722 Commits

Author SHA1 Message Date
Tom Finegan
826436a42f mkvparser: minor SeekHead::Entry clean up.
- Store actual element ID in SeekHead::Entry id field (instead
  of a decoded EBML int, which is completely _wrong_).
- Add a SeekHead::Entry constructor so we get initialized values
  in SeekHead::Entry's when parsing an Entry fails.

Change-Id: I152fae54628cb84918917139dba0cd0b42a44a57
2016-08-31 10:00:04 -07:00
Tom Finegan
24fb44aa1a mkvmuxer_tests: Add Projection element test.
Change-Id: I9a1e56d0846f43851ed0430ec52e2d7b816661fc
2016-08-31 10:00:04 -07:00
Tom Finegan
1e0a8eaa3c mkvmuxer_tests: Add Colour element test.
Change-Id: I5348930fb74d43f3fc4e1815d13a525bda70f4a0
2016-08-31 10:00:02 -07:00
Tom Finegan
027861614c mkvmuxer: Colour accessors/mutators.
Make data members of Colour and children private, and add
accessors and mutators for the changes members.

Change-Id: I203f6b4e8047cd4dae5c1b662649b535e05148fd
2016-08-30 18:13:51 -07:00
Tom Finegan
ce52f6e31d Merge "Add mkvparser wrapper functions." 2016-08-30 17:23:14 +00:00
Tom Finegan
6e5cbc09c0 Merge "webm_info: Add Projection element support." 2016-08-30 17:22:45 +00:00
Tom Finegan
0a039cb851 Merge "mkvmuxer_sample: Add support for Projection element." 2016-08-30 17:22:29 +00:00
Tom Finegan
149e8e997c Merge "mkvparser_sample: Add support for Projection element." 2016-08-30 17:21:37 +00:00
Tom Finegan
43f40c453d Merge "mkvparser: Add Projection element support." 2016-08-30 17:21:28 +00:00
Tom Finegan
0c9a19e20b Merge "mkvmuxer: Add Projection element support." 2016-08-30 17:21:17 +00:00
Michael Bradshaw
ff667d5fb4 Merge "Add support for the Projection element" 2016-08-30 16:49:37 +00:00
Tom Finegan
2346f8fafa Add mkvparser wrapper functions.
Add a couple mkvparser wrapper functions for testing mkvmuxer
output. Also expose HasCuePoints() via test_util.h for use
in cue point related tests.

Change-Id: I77321840926f41b60b6ceac65a1e3cfd79b7d2c2
2016-08-29 14:51:28 -07:00
Tom Finegan
54d6b6b60e webm_info: Add Projection element support.
Part of the Spherical Video V2 draft specification:
https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md

Change-Id: If37a7e3ede452a2545f613b50cd3cedd5dd64f09
2016-08-29 14:51:28 -07:00
Tom Finegan
65fee06599 mkvmuxer_sample: Add support for Projection element.
Part of the Spherical Video V2 draft specification:
https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md

Change-Id: If8cc7a102933ca7fe81990919dbabe7db97812f8
2016-08-29 14:51:25 -07:00
Tom Finegan
9a3f2b5762 mkvparser_sample: Add support for Projection element.
Part of the Spherical Video V2 draft specification:
https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md

Change-Id: I06d8e55d197fcf106b91d8d795ef85163ef5c2d5
2016-08-29 14:29:30 -07:00
Tom Finegan
41e814a008 mkvparser: Add Projection element support.
Part of the Spherical Video V2 draft specification:
https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md

Change-Id: I431349898b4018189cc58ce2cd67158ffb4c7f80
2016-08-29 14:29:30 -07:00
Tom Finegan
483a0ff800 mkvmuxer: Add Projection element support.
Part of the Spherical Video V2 draft specification:
https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md

Change-Id: Ia935ba975a0f01c1fb2919325ab7f70254c2ed10
2016-08-29 14:29:25 -07:00
Michael Bradshaw
676a7135d1 Add support for the Projection element
It's a part of the Google Spatial Media V2 spec:
https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md

Change-Id: I52f05e34b19239af09774da2f88eb584a0bfa628
2016-08-29 13:15:07 -07:00
Tom Finegan
725f36207e mkvmuxer: Fix memory leak when Colour is set multiple times.
Change-Id: I5650ca1116a5ae678b11ac5f6a8abf1590bc9e3f
2016-08-26 21:08:30 -07:00
Tom Finegan
fa182de6e4 mkvparser_sample: Add output of audio track codec private size.
Change-Id: Ie0a2a379cd4e68ae751e514b3d3b2025c254500b
2016-08-26 21:08:29 -07:00
Tom Finegan
4aa5338ba5 Merge "mkvparser_tests: Add invalid BlockGroup test." 2016-08-26 22:10:03 +00:00
Tom Finegan
8f521f2192 mkvparser_tests: Add invalid BlockGroup test.
Change-Id: I2b24859a92d2beb5558c2afa817237c1f78f644d
2016-08-25 13:18:19 -07:00
Michael Bradshaw
dae3d48a6f Merge "Remove docs saying binary elements default to 0" 2016-08-25 18:36:29 +00:00
Michael Bradshaw
39137d7385 Remove docs saying binary elements default to 0
They don't have a real default, and certainly not an integer value of 0.

Change-Id: I839291b9960315241068f99a0926fca3ca27ac18
2016-08-25 11:19:52 -07:00
Tom Finegan
2349904020 Merge "Fix legacy Makefile." 2016-08-25 17:52:16 +00:00
Michael Bradshaw
16e5d2a369 Merge "Do not skip over unknown elements at the root level" 2016-08-25 17:43:34 +00:00
Michael Bradshaw
80685d3865 Do not skip over unknown elements at the root level
OnUnknownElement() should be called to handle them.

Change-Id: Iebd99631f094e95d0c3e75952930962e15826bac
2016-08-24 17:37:03 -07:00
Tom Finegan
c1475044b4 Fix legacy Makefile.
- Replace definition of EXES var (fixes all target building
  nothing).
- Update mkvmuxer/mkvmuxer sample target dependencies and
  exe names.

Change-Id: I2951e0b60ae8dc18b2a7cae28fa28624967df987
2016-08-24 12:21:56 -07:00
Tom Finegan
58711e8c3e mkvparser_sample: Fix version info string.
Change-Id: I87dfe753358aede2eb5219cfef7456151cb3a7e7
2016-08-24 12:03:08 -07:00
Tom Finegan
837746f4d2 mkvparser_tests: Add invalid block test.
Add test that confirms expected failure when a block
that ends beyond the current cluster is encountered.

Change-Id: I27abcab6d00b78c14b7ca00f51c97e43c5cdd34c
2016-08-23 17:55:52 -07:00
Tom Finegan
207cd80a86 Disambiguate sample sources and targets.
sample => mkvparser_sample
sample_muxer => mkvmuxer_sample

Change-Id: Iba6a1276da9c1bb4a46fc5c4521392f89f08a59e
2016-08-23 17:55:52 -07:00
Tom Finegan
a112d71cd0 mkvparser_tests: Refactor invalid file loading code.
Combine duped loading code into one method.

Change-Id: I3c4f9b7003f032a04b734f452f3c684d1af8e841
2016-08-23 17:55:49 -07:00
Tom Finegan
5dea33eacc Disambiguate test source and target names.
Rename source files and targets to better reflect what is
actually being tested.

muxer_tests => mkvmuxer_tests
parser_tests => mkvparser_tests

Change-Id: I921901f37d269f294b96ba20732b31c27f81945b
2016-08-23 10:29:30 -07:00
Tom Finegan
125049eecd parser_tests: Add another truncated chapter string test.
Causes mkvparser to fail in a slightly different way.

Change-Id: Id60fd43e6d0ef1871842367d19db52f60a8721cc
2016-08-19 12:44:43 -07:00
Tom Finegan
1de8d4cb4f parser_tests: Add truncated chapter string test.
Change-Id: I1714fbfea5bab61cca61cd32a0a0d30315ed56fc
2016-08-19 12:13:14 -07:00
Tom Finegan
ff8c2b6af7 parser_tests: Move cue validation to test_util.
And tidy it up a bit.

Change-Id: I68e7f16ad2aa922fdb064802e8986a6955364c32
2016-08-19 11:57:08 -07:00
Tom Finegan
4b0690faa2 parser_tests: Add invalid lacing test.
Also fixes leak this test exposed in mkvparser::Cluster.

Change-Id: I06ae11b72bc89219b6b2b407b4cc215982e3ae65
2016-08-19 11:57:05 -07:00
Tom Finegan
64ae831047 Merge "mkvmuxer: Set default doc type version to 4." 2016-08-12 21:59:33 +00:00
Tom Finegan
a351196dbb Merge "webm_parser: Reference more files in CMakeLists.txt." 2016-08-11 21:52:39 +00:00
Tom Finegan
9828e39874 mkvmuxer: Set default doc type version to 4.
mkvmuxer can write matroska v4 elements in all modes, but does
not always confirm that the doc type is high enough for all
elements written. The main culprits are Colour and its
children. Avoid problems by using 4 as the default version.
This avoids problems in all cases but those where users who
know what they are doing have written the EBML header manually.

Update the test files because the new default causes the file
compare abuse in the muxer tests to fail.

Update expected doc type version in the parsing tests.

BUG=webm:1201

Change-Id: I4c69000af4c1d5efe66315c17f3953344ef04993
2016-08-11 14:20:53 -07:00
Tom Finegan
5495a59d38 webm_parser: Reference more files in CMakeLists.txt.
Some includes were missed in the first pass when webm_parser
was added to CMakeLists.txt. Add the missing includes from
webm_parser/include/webm.

Change-Id: I193debe8018155ff9f0ab1d1326330069333948e
2016-08-11 08:48:45 -07:00
Tom Finegan
0c0ecd0f24 vpxpes_parser: Add start code emulation prevention support.
Remove bytes inserted to avoid start code emulation. Operates on:
- PES optional header
- BCMV header
- payloads.

Transforms the following byte sequences as noted (left converts to
right):
  0x00 0x00 0x03 0x01  =>  0x00 0x00 0x01
  0x00 0x00 0x03 0x03  =>  0x00 0x00 0x03

Change-Id: I09ae2d5bf03dfc1ade785ee89a773509eca8330c
2016-08-11 08:45:31 -07:00
Tom Finegan
639a4bc3b1 webm2pes: Remove debug printfs().
Change-Id: I13ba6590c63e7fef14efee812095ac704ef8b69e
2016-08-10 14:56:33 -07:00
Tom Finegan
9a51102cb5 webm2pes: fflush() in the correct conversion function.
Change-Id: I79db8b24178d4e7ba205995525b74a09efef8a04
2016-08-10 14:56:33 -07:00
Tom Finegan
dc7f15559f webm2pes: Track total bytes written.
Change-Id: I78807280cbd05f642215c83d5db4d04837c06438
2016-08-10 14:56:33 -07:00
Tom Finegan
d518128266 webm_parser: Enable usage of werror.
Mass warning clean up. Mainly:
- Explicit casts of numeric literals to avoid signed/unsigned compare
  warnings.
- Commenting out of unused function arg names.

Change-Id: I0e70393a5743ae984035d43712c724d4ccd12f9d
2016-08-10 08:56:57 -07:00
Tom Finegan
e1fe7627c8 webm2pes: Add test for mux/demux of large input.
Change-Id: I253aa49aa3757682dbba83bd9ba6dd1e93d7ccce
2016-08-08 11:15:29 -07:00
Tom Finegan
1b24a792e3 vpxpes_parser: Read and store PTS when present.
Change-Id: I11acb45b26eeea6f5945c04bb447937ba2ffca9f
2016-08-08 11:15:23 -07:00
Tom Finegan
6cf0a0f400 vpxpes_parser: Store frame payloads.
libwebm_util:
- Add 90khz -> nanosecond conversion.

vpxpes_parser:
- Get rid of VpxPesParser::VpxFrame and use VideoFrame.
- Store/Accumulate (when neccessary) PES payloads in
  VideoFrames.
- Change type of size constants from int to size_t.
- Return offset accounting for origin from FindStartCode().
- Check all PTS marker bits (instead of checking the second
  marker twice).

video_frame:
- Add nanosecond_pts mutator.

webm2pes:
- Write DTS/PTS presence flag correctly when PTS is not
  present.

Change-Id: I10f16cd03bb3a51205a25331527ddceb3769ba03
2016-08-08 11:14:03 -07:00
Tom Finegan
25d26028c1 webm_parser: Convert style to match the rest of libwebm
Remove webm_parser/clang-format-style.
Run clang-format -style=file -i for each source file.

Change-Id: Ieaf44bd323375cbcfec67014e94b7742d6bda14a
2016-07-27 14:31:28 -07:00