Commit Graph

336 Commits

Author SHA1 Message Date
Vignesh Venkatasubramanian
1c36c24694 mkvmuxer: fix style guide violations
fix a few style guide violations in mkvmuxer.cpp

Change-Id: If800a5d6851f8ba4b904341fd054e1c2091e281e
2014-05-29 08:30:30 -07:00
Vignesh Venkatasubramanian
568504e64e Merge "UUIDs can have their high bit set" 2014-05-23 09:01:20 -07:00
Sergey Ulanov
acf788bedd Add support for CropLeft, CropRight, CropTop and CropBottom elements.
Change-Id: Ic5993a3e04b3eefccc3016fbe6b49d1e4a5fc05d
2014-05-21 19:46:36 -07:00
Vignesh Venkatasubramanian
418188b03e Merge "muxer: codec_id is a mandatory element" 2014-05-18 12:48:29 -07:00
Vignesh Venkatasubramanian
07688c92d7 mkvmuxer: Reject frames if invalid track number is passed.
Reject frames if an invalid track number is passed. Also change sample_muxer
to reject files which have Block elements with invalid track numbers.

Fixes Issue #659: https://code.google.com/p/webm/issues/detail?id=659

Change-Id: Ie6cf39a409b68bb4d2261f308409ee0c36d5dd8e
2014-05-18 12:45:49 -07:00
Vignesh Venkatasubramanian
2a63e473d8 muxer: codec_id is a mandatory element
codec_id element for a Track is mandatory and it does not have a default.
Rejecting the file if that happens.

Change-Id: I4fb0dfcd4c09eeabf22634db7fdf6ca818c93917
2014-05-16 11:42:05 -07:00
Vignesh Venkatasubramanian
d13c017744 UUIDs can have their high bit set
mkvparser::UnserializeUInt() assumes that unsigned values never have
their high bit set. This is too limiting for UUIDs. In addition, the
Chapters::Atom::Parse() method would truncate a "negative" 64-bit UUID
value to 32 bits and return the truncated value as a status code.
This value then might or might not be treated as an error by the caller
depending on whether the truncated value was itself negative.

Change-Id: I15624ac62d0b02691a1405ee6a5f7eb441b3bc48
2014-05-16 11:25:22 -07:00
James Zern
249629d46c make Mkv(Reader|Writer)(FILE*) explicit
Change-Id: I2c6e0df3049903f8ea53babeacffaa87f6c222b0
2014-05-02 11:47:44 -07:00
Vignesh Venkatasubramanian
7f3cda494a mkvparser: fix a bunch of windows warnings
fix a bunch of windows warnings in parser.

Change-Id: Ia9a03879540595306d8fa2b90ceb9b3b5b0d93a6
2014-05-01 13:50:19 -07:00
Vignesh Venkatasubramanian
5c0617852f Merge "clang-format on mkvparser.[ch]pp" 2014-05-01 11:50:03 -07:00
Vignesh Venkatasubramanian
4df111e60a clang-format on mkvparser.[ch]pp
Conformance of mkvparser.[ch]pp to Google C++ style guide.

Change-Id: I459adac3da1496b432b71b3580b4dbd63037df2b
2014-04-29 11:30:00 -07:00
Vignesh Venkatasubramanian
7b2450131c clang-format re-run.
Re-running clang-format to take into account the recent change in it.
(https://gerrit.chromium.org/gerrit/#/c/69926/ )

Change-Id: Ie11afcaaf07a1967f65fd765f1a7c7112c85875a
2014-04-29 11:27:31 -07:00
Vignesh Venkatasubramanian
c6767b94fd Change AlignTrailingComments to false in .clang-format
AlignTrailingComments set to true seems to be causing some unwanted
alignments. Turning it off.

Change-Id: I5fd99db90b00c76cc7891f2cd1c80ec69ae97697
2014-04-29 00:38:14 -07:00
Vignesh Venkatasubramanian
9097a0691b Merge "muxer: Reject file if TrackType is never specified" 2014-04-29 00:18:55 -07:00
Vignesh Venkatasubramanian
eddf9744cb Merge "clang-format on mkvmuxertypes.hpp and webmids.hpp" 2014-04-28 10:40:43 -07:00
Vignesh Venkatasubramanian
def325c010 muxer: Reject file if TrackType is never specified
According to matroska specification, TrackType is a mandatory element without a
default value [1]. But we have been producing invalid matroska files when
TrackType is never specified because we write 0 by default.

This patch will reject writing a track without specifying the TrackType value.
Specifically, this path will be triggered when Segment::AddTrack() is called
but there is no subsequent call to Track::set_type().

[1] http://www.matroska.org/technical/specs/index.html#TrackType

Fixes issue #769: https://code.google.com/p/webm/issues/detail?id=769

Change-Id: I4d75d169fd96c7e1fad278561f0e7a3e1135989c
2014-04-26 03:14:05 -07:00
Vignesh Venkatasubramanian
41f869cb0c Merge "clang-format on webvttparser.(cc|h)" 2014-04-25 22:19:26 -07:00
Vignesh Venkatasubramanian
fd0be37ba4 clang-format on webvttparser.(cc|h)
Conformance of webvttparser.(cc|h) to Google C++ style guide.

Change-Id: I19610c5795c0bd2446c07a6c2abde58c3286b2ea
2014-04-25 22:18:40 -07:00
Vignesh Venkatasubramanian
207d8a193a Merge "clang-format on mkvmuxerutil.[ch]pp" 2014-04-25 22:09:48 -07:00
Vignesh Venkatasubramanian
02429eb11b Merge "clang-format on mkvwriter.[ch]pp" 2014-04-25 22:09:17 -07:00
Vignesh Venkatasubramanian
0cf7b1b7d3 Merge "clang-format on mkvreader.[ch]pp" 2014-04-25 22:09:02 -07:00
Vignesh Venkatasubramanian
2e80fedf8c Merge "clang-format on sample.cpp" 2014-04-25 22:08:38 -07:00
Vignesh Venkatasubramanian
3402e12d1a Merge "clang-format on sample_muxer.cpp" 2014-04-25 22:08:27 -07:00
Vignesh Venkatasubramanian
1a685db45b Merge "clang-format on sample_muxer_metadata.(cc|h)" 2014-04-25 22:07:59 -07:00
Vignesh Venkatasubramanian
6634c7f87a Merge "clang-format on vttreader.cc" 2014-04-25 22:07:46 -07:00
Vignesh Venkatasubramanian
7566004462 Merge "clang-format on vttdemux.cc" 2014-04-25 22:06:42 -07:00
Vignesh Venkatasubramanian
9915b8408e clang-format on mkvreader.[ch]pp
Conformance of mkvreader.[ch]pp to Google C++ style guide.

Change-Id: I9928a1a7daf9afaa30355b17b3eeeb2966626031
2014-04-15 12:05:58 -07:00
Vignesh Venkatasubramanian
743725477c clang-format on mkvmuxertypes.hpp and webmids.hpp
Conformance of mkvmuxertypes.hpp and webmids.hpp to Google C++ style guide.

Change-Id: Ib5e524f75f04ae6f6f5f24600d70b8448d01964c
2014-04-15 11:39:44 -07:00
Vignesh Venkatasubramanian
0d5a98cee5 clang-format on sample_muxer.cpp
Conformance of sample_muxer.cpp to Google C++ style guide.

Change-Id: I8d7ef884fbaac8ebbf12fc3e3215532ced5ac29b
2014-04-15 11:36:43 -07:00
Vignesh Venkatasubramanian
e3485c9b9f clang-format on vttdemux.cc
Conformance of vttdemux.cc to Google C++ style guide.

Change-Id: Id8838ddec286f935c8a3c1b78d9d9027b467165f
2014-04-15 11:31:20 -07:00
Vignesh Venkatasubramanian
46cc823994 clang-format on dumpvtt.cc
Conformance of dumpvtt.cc to Google C++ style guide.

Change-Id: I5fa11e79e95e61c1a1d923ba76ac7ae343c9c8e4
2014-04-14 12:15:04 -07:00
Vignesh Venkatasubramanian
5218bd291c clang-format on vttreader.cc
Conformance of vttreader.cc to Google C++ style guide.

Change-Id: Id5d2baf0977bca9ab938831cf6e6204acd4ed647
2014-04-14 12:11:27 -07:00
Vignesh Venkatasubramanian
1a0130d069 clang-format on sample_muxer_metadata.(cc|h)
Conformance of sample_muxer_metadata.(cc|h) to Google C++ style guide.

Change-Id: I500a8cdbc443981ecae6ac2a7d8de7cab1c72e28
2014-04-14 12:09:20 -07:00
Vignesh Venkatasubramanian
867f1894da clang-format on sample.cpp
Conformance of sample.cpp to Google C++ style guide.

Change-Id: Icb6bfce6af5df04775a086e080e6fa742c6d68f9
2014-04-14 12:05:21 -07:00
Vignesh Venkatasubramanian
4c7bec5743 clang-format on mkvwriter.[ch]pp
Conformance of mkvwriter.[ch]pp to Google C++ style guide.

Change-Id: I997545b366277b7f1235b9fa7cc30a4969098553
2014-04-14 10:30:33 -07:00
Vignesh Venkatasubramanian
9ead078aaf clang-format on mkvmuxerutil.[ch]pp
Conformance of mkvmuxerutil.[ch]pp to Google C++ style guide.

Change-Id: Ib66b73adb2682cd5560f6f363fc04d75ab3815c6
2014-04-14 10:28:59 -07:00
Vignesh Venkatasubramanian
fb6b6e6444 clang-format on mkvmuxer.[ch]pp
Conformance of mkvmuxer.[ch]pp to Google C++ style guide.

Change-Id: I9bcd14710adbad4f32aa1a6be2ea7e40fb715e91
2014-04-11 11:41:01 -07:00
Vignesh Venkatasubramanian
ce775929a6 Update .clang-format to allow short functions in one line
Update .clang-format so that it allows short functions and constructors in a
single line if it fits.

Change-Id: I60788089fc7a4e2f4c4df6947368ebc0f3fa8c49
2014-04-11 11:24:46 -07:00
Tom Finegan
0a24fe44ae Merge "Add support for DateUTC and DefaultDuration in MKV Muxer." 2014-04-10 16:13:21 -07:00
Vignesh Venkatasubramanian
11d5b66eb4 Merge "Add .clang-format" 2014-04-09 11:55:47 -07:00
Vignesh Venkatasubramanian
a1a3b14538 Add .clang-format
Add .clang-format file so that it can be used to maintain
the same style throughout the library.

Change-Id: I22bd21055f565a886b5a880856810f4b35b22cce
2014-04-09 11:50:54 -07:00
Sergey Ulanov
0fcec38045 Add support for DateUTC and DefaultDuration in MKV Muxer.
BUG=crbug.com/321825

Change-Id: I5ff8c5b9fd4e6be23ef2bc91a7a4ba021db6441f
2014-04-08 21:48:00 -07:00
Vignesh Venkatasubramanian
a7118d8ec5 Fixing a warning in mkvmuxerutil.cpp
Changing a constant from int32 to uint64 to fix a warning in
mkmuxerutil.cpp

Change-Id: Ifd9f76ea4be848eff4d98a797d2d4dcd22f11478
2014-04-08 16:15:28 -07:00
Vignesh Venkatasubramanian
abe9c2d0d1 Adding support for user file ownership in MkvReader
Adding a constructor to MkvReader that will enable user application
ownership of the file.

Change-Id: I10f8f71715392df3d4b78c7c11076e19c30e1af6
2014-04-04 13:49:52 -07:00
Vignesh Venkatasubramanian
630a0e3c33 mkvmuxerutil: Getting rid of strict-aliasing warning
Replacing a reinterpret_cast from float& to uint32& with a union to get rid of
"dereferencing type-punned pointer will break strict-aliasing rules" warning.
This warning is produced on passing -O3 in gcc.

Change-Id: Ie942597f418e3659e3ff29a909c43dd99266c04d
2014-03-17 12:19:21 -07:00
Vignesh Venkatasubramanian
e369bed319 Support user ownership of files in MkvWriter
Overloading MkvWriter's constructor so that it can wrap a user owned
FILE pointer. Doing this so that applications which handle the file opening
and closing by themselves don't have to have their own implementation of the
IMkvWriter interface.

Change-Id: I69c57f3e6927ea13b616c425e3b5f179d2e69215
2014-03-12 12:48:17 -07:00
Tom Finegan
a9d94ef2c5 Merge "vttdemux: Add VS2013 project." 2014-03-10 11:49:55 -07:00
Tom Finegan
3b66306126 vttdemux: Add VS2013 project.
And add it to the libwebm VS2013 solution.

Change-Id: I9957b47b291722bc0e5eb435795252cf780f968b
2014-03-10 11:46:53 -07:00
Tom Finegan
acb7a2c8bc Add VS2010 DLL build configurations for vttdemux.
- Link to libwebm instead of building sources.
- Add missing dependency on libwebm.

Change-Id: I8f977f767f6104d07f716c7c5ebecda249c202f2
2014-03-07 16:53:47 -08:00
Tom Finegan
99f40649a7 Merge "mkvmuxer: Silence MSVC warning that suggests making code non-portable." 2014-03-06 16:40:59 -08:00