Commit Graph

704 Commits

Author SHA1 Message Date
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
Kongqun Yang 57ca7d2144 Remove EncryptorSource argument from Muxer constructor.
Add a new function Muxer::SetEncryptorSource. Also clean up
packager test.

Change-Id: I5fee46e3d15e0c7a0f138c1d90f980b724887768
2014-01-15 01:48:41 +00:00
Kongqun Yang b6af6ca976 Move encryptor creation out of EncryptorSource::Initialize.
Use EncryptorSource::CreateEncryptor for encryptor creation.
EncryptorSource no longer owns the created encryptor.

Change-Id: I34d1f32262b7692bcb347d3b084fd06cbae7850f
2014-01-15 01:47:47 +00:00
Rintaro Kuroiwa 0154654539 Remove LITE from protobuf for serialization to human readable string
TextFormat class methods that output human readable messsages need
Message instance where LITE uses MessageLite.

Change-Id: I4ff14aa9334acdad608f0b02c81d9cb765e70a60
2014-01-14 16:18:40 -08:00
Rintaro Kuroiwa f4c7807554 Add 'name' field to Element protobuf message
Change-Id: I527433d6cee2c4e0deb2f243f623f40e29ba8c21
2014-01-14 15:18:54 -08:00
Rintaro Kuroiwa a84d6a7d09 Add mimeType to Representation and use float for duration
Work on some TODOs.
Mandatory mimeType field was missing from Representation.
All duration in the MPD is now float.

Change-Id: I85b8511bc1c43759d80f831bee371c398895cf39
2014-01-14 13:58:01 -08:00
Rintaro Kuroiwa 4723ef777d Add container type to MediaInfo proto
Change-Id: Ife22c7d8641af3847be3da9bf6e96146d72749f0
2014-01-14 21:10:28 +00:00
Kongqun Yang e7472c4247 Fix a path conflict due to merging.
Change-Id: Ib84e9628e62d423141fcad5e9763fc87dd666c5e
2014-01-13 18:10:10 +00:00
Rintaro Kuroiwa db5b2a4740 Unit test for MPD builder
Initial checkin, very small coverage.

Change-Id: I60f3fd768d5b8dca7a84f051e57f59a654272e53
2014-01-10 17:40:26 -08:00
Kongqun Yang 1eb5236c90 Rsa Key unittest.
Change-Id: I761db06762e594884f339aee66fec171c92b8108
2014-01-11 01:16:40 +00:00
Kongqun Yang a725f3fd02 Fix mp4 parsing failure if CTTS table is empty.
The original code assumes CompositionOffset is always valid and
has the same number of samples as other table, which is not true
if CTTS table is empty for non-fragmented mp4.

Change-Id: If4ecc1159de33202db4ab36df8e32c2a6900daf8
2014-01-10 16:36:22 -08:00