Commit Graph

214 Commits

Author SHA1 Message Date
Rintaro Kuroiwa f73f4bb773 Use default ContentProtection element specified by DASH for MP4
BUG: 13175714
TEST: media_event_unittest passes

Change-Id: I96a4ecaaf2a7152df21c1680949db74b6a47199f
2014-03-05 00:12:03 -08:00
Rintaro Kuroiwa 482c60ca1e Put AudioChannelConfig before ContentProtection
AudioChannelConfig should appear before ContentProtection in
Representation.
Enabled tests which covers this case.

Bug: 13227181
Change-Id: I0f4e913304ad982761a9296aa95d30200f6314d2
2014-03-05 00:07:21 -08:00
Kongqun Yang 5708e90c82 Setup git submodules for all sources included from chromium
Some of the modules was semi-setup when copied from chromium.

With submodule setup, the user may use git submodule init and update
to update the submodules.

Change-Id: Ief0899c1567cd2be9a55710f7f81c0eb74461f50
2014-03-03 21:29:09 +00:00
Kongqun Yang 374324b042 Disable test_isolation_mode, glib, and x11 in GYP_DEFINES
This removes unnecessary library dependencies.

Change-Id: Id451766d1bedd7fbcd9cf9cf882de86ccb662486
2014-03-03 21:28:33 +00:00
Kongqun Yang b9f1996b68 Fix compilation errors after manifest update
Manifest was updated in CL 7debbbe19b158ea7377e229a17ec1d3d9d19d1b8
to point to Chromium LGKR CL 253526.

There are some API refactoring in base, which result in some code
changes in our packager source.

Change-Id: I52bf5a8a4f8fe0ebc566677efcd572332db8f618
2014-03-03 13:26:14 -08:00
Rintaro Kuroiwa 895ff32202 MPD unit test for encrypted audio
Change-Id: Ib36191803ab9614dffe6221297d4e86243e53fe5
2014-02-28 18:46:30 -08:00
Rintaro Kuroiwa a470d52ee6 Share code between MPD and MpdWriter unit tests
The tests are similar because MpdWriter uses MpdBuilder.
Also changing tests and enabling them in mpd_builder_unittest.cc.

Change-Id: I76a8cfca27c390a039de765231c76d083c3ca26b
2014-02-27 17:42:09 -08:00
Edwin Wong c5ca55c388 Workaround pylint warning F0401.
gyp and gyp_helper path are obtained dynamically. Pylint generates
format checker warning. The Workaround is recommended by:
http://google-styleguide.googlecode.com/svn/trunk/pyguide.html.
Although the style guide prefers using symbolic names, which is
supported since pylint 0.25.3, the depot_tools/pylint is 0.25.1.

Change-Id: I6c9bc21a46102f38cab68c07c98339003cbd6991
2014-02-26 19:21:43 -08:00
Kongqun Yang 0a8dc6f606 Clean up *_iterator code in media/mp4.
Make functions const if needed and reformat the code using clang-format.

Change-Id: If2848ef6c3b61df5358286687d80213533125856
2014-02-21 10:52:01 -08:00
Kongqun Yang 5dd4a8cb45 Fix .gitignore to ignore only top level path.
Change-Id: Id311ce1003f1d897e22c6fcb5a997f3bdb8651e3
2014-02-20 15:04:48 -08:00
Rintaro Kuroiwa b51f20d40c Use gyp_helper in gyp_packager.py
build/gyp_chromium uses gyp_helper to get variables for GYP from
chromium.gyp_env file.
More on chromium.gyp_env can be found here
http://www.chromium.org/developers/how-tos/component-build

This is useful if you want to override some GYP varibles to test
different flags, e.g. using clang to build.

Change-Id: I14fc76abdd6503bf66ef3e27fb9216b3fb8aaa02
2014-02-20 10:47:18 -08:00
Rintaro Kuroiwa 4047cb78cc Enable media event unit tests
Change-Id: Ie3d5418a875da8f7091430b0aa73e3817b162248
2014-02-20 10:34:18 -08:00
Kongqun Yang b93f2020c8 Fix no ContentProtection element problem.
The original code used stream_info.is_encrypted() to check whether output
stream is encrypted; However, stream_info contains input stream
information and does not contain output stream infomation, which results
in incorrect status was passed to mpd generator. Fix the problem with
correct information from muxer.

Change on behalf of rkuroiwa after a discussion with him.

Bug: 12994813

Change-Id: I6e74b378a0fd7deedaaac166e913a66d312b8318
2014-02-20 01:22:09 +00:00
Kongqun Yang 859da912fc Replace bash build script with python script.
This is for cross platform support. gyp_packager.py is modified
from build/gyp_chromium and adapted to packager code.

New build instructions:

1. Setup gyp: ./gyp_packager.py

clang is not enabled by default, which can be enabled by overriding
GYP_DEFINE environment variable, i.e. "GYP_DEFINES='clang=1
use_openssl=1' ./gyp_packager.py".

Ninja is the default build system. User can also change to make by
overriding GYP_GENERATORS to make, i.e. "GYP_GENERATORS='make'
./gyp_packager.py".

2. The first step generates the make files but does not start the
build process. Ninja is the default build system. Refer to Ninja
manual on how to do the build.

Common syntaxes: ninja -C out/{Debug/Release} [Module]
Module is optional. If not specified, build everything.

Step 1 is only required if there is any gyp file change. Otherwise, you
may just run ninja.

Change-Id: I89cade7278bfdd3992644457e896e5a10085568b
2014-02-19 22:42:07 +00:00
Kongqun Yang d4a3b6c520 Remove base and build directories in packager.
chromium/src/base and chromium/src/build will be pulled using repo
manifest @ https://widevine-internal-review.googlesource.com/#/c/9071

Also ignore base and build in .gitignore.

Bug: 12588544

Change-Id: Iec9ad12d61c7b7719e066b30a6672c558ef15851
2014-02-19 19:05:49 +00:00
Kongqun Yang 58c4473d42 Add copyright information.
The information is generated by Edwin's copyright.py script with some
minor manual modifications.

Chromium's original copyright notice is not replaced.

Also add LICENSE file taken from
https://sites.google.com/a/google.com/ospo/releasing#TOC-BSD-License

Change-Id: I231f09af96a0a611b1ca81e95cab82e12d7f529b
2014-02-18 23:46:01 +00:00
Kongqun Yang 66e8f847e6 Clean up gyp.
Split packager.gyp into multiple smaller gyp definitions.

Change-Id: Icb38bd20f6e11ea41a975332c911d6bde7fc827d
2014-02-18 23:44:53 +00:00
Rintaro Kuroiwa 16c6c92643 Fix compilation warning when not using clang
Initialier lists caused gcc to raise warnings.

Change-Id: Ib9201d537082d311fb5f08e60773bc47ea4af896
2014-02-18 11:01:14 -08:00
Rintaro Kuroiwa 172cd59987 Use more data for creating VOD MediaInfo
MuxerListener takes MuxerOptions, reference time scale, and container
type which should be passed to MediaInfo creation.

Change-Id: I54c23476120e9ef77fc1df7e781b3a9acf0ff520
2014-02-12 15:51:18 -08:00
Rintaro Kuroiwa 10ec2f0956 MPD generator driver program
Change-Id: I9f34efbb322c3315583ec0bddf7d48e5a4e22f92
2014-02-07 15:04:02 -08:00
Rintaro Kuroiwa e65e2ea220 Add driver program flags for dumping MediaInfo
Change-Id: I314027b799271e95fc12b8716f5977be00013737
2014-02-07 13:47:06 -08:00
Rintaro Kuroiwa f8949ae311 MpdWriter unit tests
Change-Id: I3b2ee0df2782d5521260eb9323ddbe598e803be3
2014-02-07 13:23:54 -08:00
Rintaro Kuroiwa 4fe1594a73 Add util class to read files and generate MPD
Change-Id: I739aaec38c8416083eba261c82b8c3bbab4e670a
2014-02-07 13:12:03 -08:00
Rintaro Kuroiwa e8714a1374 Find Period element under MPD
It assumed that the first element is Period but it could be a BaseURL
which caused a DCHECK crash.

Change-Id: I75bdafdd312bfbcdf81cc76b44f8e2d0f1542976
2014-02-04 16:52:00 -08:00
Rintaro Kuroiwa d07007a5d2 VodMediaInfoDumpMuxerListener unit tests
Change-Id: Ib9ff3737f084fc835457fc931162c9a2e9c441bc
2014-01-29 11:57:58 -08:00
Rintaro Kuroiwa 0170d0530e Add BaseURL before SegmentBase
The order affects the output. Even though XML does not care about the
order of subelements, it makes more sense for BaseURL element to appear
above SegmentBase.

Change-Id: Idd1e73446be84640828358ef4d7a74688428f6b5
2014-01-28 16:03:19 -08:00
Rintaro Kuroiwa 6d68f778ee Add ContainerType to MuxerListener
Container type should be passed to MuxerListener

Change-Id: I4941f17d68fab1565c6105a73e50fa9885bbd304
2014-01-28 00:32:09 -08:00
Kongqun Yang 522048b0d9 Add a muxer option to normalize PTS to start from 0
Some players do not like non-zero starting PTS. We need to do PTS
normalization to make it work on those players.

Bug: 12686658

Change-Id: I0958c25395e4ea87d8208db9a5f6c5816827eb99
2014-01-24 22:34:27 +00:00
Kongqun Yang 1e79eeb086 Ignore docs directory in git.
Change-Id: I05cc3726ea320bbf9c16af72f04910422fecdd75
2014-01-24 22:29:14 +00:00
Kongqun Yang f05040fa18 Fix a misspelling of the flags name.
Change-Id: I0cd889ed3b31e722860c313536b01449746bd71c
2014-01-24 13:21:33 -08:00
Kongqun Yang 5b826ec637 Workaround server limitation with client retries.
Change-Id: Ia1c7b20682e50a5931a83be0f464d81acf7c07af
2014-01-23 18:50:54 -08:00
Kongqun Yang 53443ac466 Disable parsing of local clases and tests for doxygen
Change-Id: I4766bfbff2183ef3b1a89695242667bc8c28d770
2014-01-24 00:57:52 +00:00
Kongqun Yang a8fb39fb27 Clean up CHECK macros in mp4 muxer code.
Change-Id: I887344c8f79bb3b45a17abe23bc0b2614c0dcd48
2014-01-23 23:26:34 +00:00
Rintaro Kuroiwa fe2214b9a0 Add unittest file for XmlNode
Small coverage.

Change-Id: I6053d82a0f9b1d391b4720c419ff7b3cbaa67ca8
2014-01-23 08:48:31 -08:00
Rintaro Kuroiwa bd44c7d7b8 MpdBuilder should handle ContentProtectionXml
Added functions to add MediaInfo::ContentProtectionXml to
RepresentationBaseXmlNode. This allows adding ContentProtection elements
using MediaInfo protobuf.

Change-Id: I46aa97ba8cbf1548388ebbb61ac163786dfa0be8
2014-01-23 08:46:53 -08:00
Kongqun Yang 6957a4ac07 Implement packager driving program packager_main
I am not sure whether it is a good idea to define command line flags
in the actual source. I created several flags definition .h to host
these flags for now.

Change-Id: Ib6ca60d8656e8015a64dafff8e0a98a47676bbd2
2014-01-22 11:51:28 -08:00
Kongqun Yang 8f495e6615 Create doxygen config
Change-Id: I77c28af150d5110cf6067919dc8795cf25cda79d
2014-01-22 19:26:27 +00:00
Rintaro Kuroiwa 90dae2716c Convert info from muxer to MediaInfo and dump to file
A MuxerListener implementation.
MediaInfo protobuf is dumped out to a file as human readable string.

Change-Id: I1b1d52b4d11d969efc07b413ff25cb26fb1aa2b4
2014-01-22 00:38:23 -08:00
Rintaro Kuroiwa 9b3ed17a96 Delegate MediaInfo generation for VOD
Info from muxer is delegated to a function in internal namespace to
create MediaInfo protobuf structure.

Change-Id: I7c00ce02c9ab23f022cf485e582d771ce61107cf
2014-01-22 00:24:05 -08:00
Kongqun Yang 596e59c8be Add RSA signing support in WidevineEncryptorSource
Defines an abstract request signer class and two implementations of the
signer class, AesRequestSigner for AES-CBC signing and RsaRequestSigner
for RSA-PSS signing.

WidevineEncryptorSource now uses Signer for signature generation.

Change-Id: I4528409a9be998535bccde40fdadb412e4bbdaf3
2014-01-21 18:32:08 -08:00
Kongqun Yang 85c91568f2 Add a new packager test for separate av muxer output
Also fix a bug that when Muxer::Finalize is called, the fragmenter
isn't initialized yet.

Change-Id: I826d1ad2519e553de8581ac4a334373cf1eb8067
2014-01-22 02:27:52 +00:00
Kongqun Yang 257b48536a Clean up tools directory.
Remove all files and directories except:
clang  emacs  git  gyp  heapcheck  protoc_wrapper  valgrind  vim
xdisplaycheck

Change-Id: I6326e4edad4b843e0d0c2ef39c20ac90f13c8579
2014-01-21 23:15:57 +00:00
Rintaro Kuroiwa 72deea3493 Fix compilation errors by clang for mpd_builder target
Change-Id: I7c6f09714a4005267469bebf4b9783466883236f
2014-01-21 14:02:19 -08:00
Rintaro Kuroiwa efa270963e Remove disable gold flag and enable clang in build.sh
Change-Id: I497234ed6285785e5b8905d03c44adb9b9eda4ab
2014-01-17 14:28:37 -08:00
Kongqun Yang e6df0ffb21 Fix asan error in aes_encryptor_unittest.
The error was caused by an incorrectly constructed test case.

Change-Id: I86006bd79d85f68d28d623da5c644b9037a12844
2014-01-17 01:42:40 +00:00
Kongqun Yang 8095e21c96 Clean up clang compilation errors.
Clang from Chromium enforces Chromium styles:
http://www.chromium.org/developers/coding-style,
http://www.chromium.org/developers/coding-style/chromium-style-checker-errors.

Change-Id: I8070739489a8109380578d1797801e981d119793
2014-01-17 01:41:45 +00:00
Rintaro Kuroiwa 3da90d8bad Ignore gold directory for pulling in gold linker
Change-Id: I00e4c80c6b14d9173d62b898e8a0cf7603e03ee5
2014-01-16 14:56:41 -08:00
Kongqun Yang 76269c4706 Add static function File::ReadFileToString.
Change-Id: Ib50aea743662376c8c7da82bba4002932da4014c
2014-01-16 22:14:59 +00:00
Rintaro Kuroiwa 014cde57bd Ignore third_party/llvm-build
This only matters if you pull clang for building the packager.
clang binaries gets pulled in to third_party/llvm-build if you run
the script in tools/clang/scripts/update.sh.
clang is useful for ASAN and style (and better compiler error output).

Change-Id: Id615d739f80e92036fe13c3152569e51aed8a7f0
2014-01-16 11:02:10 -08:00
Rintaro Kuroiwa e4d94be0d3 Fire MuxerListener events from MP4Muxer
Implementation only for OnMediaStart and OnMediaEnd.

Change-Id: I58a94c29b7e8cecf29b6202c7018592e5ce620b2
2014-01-14 18:25:07 -08:00