Commit Graph

762 Commits

Author SHA1 Message Date
Thomas Inskip fedf9b4233 Fix for video frame corruption which occurred when PES packet payloads
are not a size multiple of 16 bytes.

Change-Id: I6e7f524ef17177a1e293cb22e52afa59abacd0de
2014-11-25 13:50:55 -08:00
KongQun Yang fe9c4201f3 Remove the restriction that key response contains all keys
Also set fragment_duration in mvex.

Change-Id: I9584c17569b2eb9b75d060284288c44f64b76821
2014-11-06 15:24:38 -08:00
KongQun Yang f5e71b62b5 Fix two packager crash bug with invalid arguments
Fix b/18005827 Packager crashes in debug mode with widevine decryption
enabled given a non-existing file.

Fix b/18005632 Packager crashes with invalid fixed_key_encryption
parameters.

Also cleans up some code.

Change-Id: I097f5c8dc113eb6d33b42b19a4bf5de125c47c30
2014-10-16 12:40:31 -07:00
Ramji Chandramouli 0be4815edc Use only the first 16 bytes of the asset key.
Bug: 18003864

Change-Id: I65b08c4766a4c2ab08b09660b1540630387ab36c
2014-10-16 10:50:00 -07:00
KongQun Yang 8336801ffc Refactor WidevineKeySource to pass signer in setter instead
Since signer is now optional, it makes more sense to pass it in setter
function.

Also fix a problem in command line that if a signer or key source is
not specified correctly, the program should return immediately.

Change-Id: I3be6a4e2ba7bf7b8d5589ac8268390a0fe08a626
2014-10-14 19:50:14 -07:00
KongQun Yang b270e9fe0c Allow query stream info without decryption
Also fixes packager_test script due to path change and adding unittests.

Bug: 17977484

Change-Id: I57d1eb9f8ae8039dc5320ffa4141299d42b0e603
2014-10-15 01:32:40 +00:00
KongQun Yang dd2ada2026 Make signer optional in packager app
Also refactor the command line flag validation app to make it cleaner.

Change-Id: Idb7bb33bd3060aaf25765c1575ceddd901b90c4d
2014-10-14 14:20:21 -07:00
KongQun Yang e72d12c54f Make RequestSigner optional for WidevineKeySource
Change-Id: I4298d5c5ba1d8539c5cd28130266b1a988308f0b
2014-10-10 15:55:39 -07:00
Thomas Inskip 7e9515c349 Updated README.md to include media decryption and WVM.
Made some additional minor edits.

Change-Id: I3f00c592c64f607f213c70662c9111af574f158a
2014-10-10 20:02:33 +00:00
KongQun Yang e685dd1a73 Move test files in media/base to test directory
Also rename mpd/base/bandwidth_estimator_test.cc to
bandwidth_estimator_unittest.cc for consistency.

And remove mpd/base/simple_vod_mpd_notifier.* as they are not used
anywhere.

Change-Id: Iaeb096aef9259837a4eb356c18d5ca15f08d2376
2014-10-10 10:33:17 -07:00
Ramji Chandramouli 8cc29520b0 KeyFetcher interface and HTTP impl to retrieve keys from the Widevine
License Service.

Change-Id: Icb1af3fd26a5243293dd089888d4b396539fd768
2014-10-09 18:19:22 -07:00
Thomas Inskip e7e86d684a Fixed various bugs:
- 17932674 Packager crashes when an incorrect key is provided to wvm.

- 17932293 Packager crashes if no key source is provided for wvm input.

- 17932868 StreamInfo is cast to AudioStreamInfo unconditionally and corrupts memory in wvm_media_parser

- 17932033 input: wvm --enable_fixed_key_decryption Segmentation Fault.

Change-Id: I7fc774c87a33314a4c92bc907f06c17f0c269a16
2014-10-09 14:23:57 -07:00
KongQun Yang 9158f4a543 Remove (D)CHECK_OK and usage of MemoryMappedFile
Change-Id: Ifb46a0fe063dfe8fdd770d830f9fb7bf2cf31901
2014-10-08 16:19:31 -07:00
KongQun Yang 8ffb41df76 Fix various errors discovered during integration
Change-Id: I927ba02bbe99bf6e6c9877968a4554ad949cf07f
2014-10-06 12:44:54 -07:00
Ramji Chandramouli 6a1805129d Enabled WVM test with mocks for WidevineKeySource.
Change-Id: I4b9f8acacca6a334087e10d47b96be15fc3cafec
2014-10-03 13:46:07 -07:00
KongQun Yang 15ae26e12f Modify include headers to have "packager" in the path
This is a follow up to previous CL.

Generated using command:
find {media,app,mpd} -type f -exec sed -r -i 's/#include "(.*)"/#include
"packager\/\1"/' {} \;

common.gypi and mpd.gyp are also modified to take the path change into
consideration.

Change-Id: I1fb102b4eb73ae5fde5f4ab303a12cec09b05c33
2014-10-02 12:53:29 -07:00
KongQun Yang b8126bc9da Move source code into packager directory
Make it easier to be included and integrated into other code.

Change-Id: I609881688cc20f8fac676cbd91fde4753af32ee5
2014-10-02 12:32:14 -07:00
Ramji Chandramouli e3d0f60c4b WVM media parsing - integration with Decryption.
Change-Id: I05352480ce03927dbf4f8a212bb81217260c65af
2014-10-01 18:02:50 -07:00
KongQun Yang c1b47e256b Clean up include files for third_party libs
Change-Id: Ie1b48d3c22d646a58472d759963f98614a444cce
2014-10-01 12:37:00 -07:00
KongQun Yang f907cb18f8 Clean up include files for int8_t,...int64_t
Use <stdint.h> rather than "base/basictypes.h".

This is a follow up to previous CL.

Also get rid of ku?intxx(min|max) and use std::numeric_limits as per
base/basictypes.h, it is DEPRECATED too.

The change was made using the below commands with some adjustments like
include order etc:
> find {media,app,mpd} -type f -exec sed -r -i
  's/"base\/basictypes.h"/<stdint.h>/' {} \;
> find {media,app,mpd} -type f -exec sed -r -i
  's/k(u?int[0-9]+)(min|max)/std::numeric_limits<\1_t>::\2\(\)/g' {} \;

Change-Id: I6347723989c3d66e64ffcc54123b5c182b8c71b7
2014-10-01 00:44:07 +00:00
KongQun Yang d1068964ae Replace u?int(8|16|32|64) with u?int(8|16|32|64)_t
u?int(8|16|32|64) are DEPRECATED per base/basictypes.h.

The change was made using the below commands with some adjustments for
pretty formatting:
> find {media,app,mpd} -name '*.proto' -prune -o -type f -exec sed -r -i
's/\b(u?int[0-9]+)\b/\1_t/g' {} \;
> git clang-format

Change-Id: I99d2e5e0fbbdbc5d7b9eb121b4622de780413f53
2014-09-30 17:39:07 -07:00
KongQun Yang 7e6cd6e853 Some misc cleanups
Put everything inside edash_packager namespace.

Change-Id: Iade763d5d3c99a4cca28975a40465459ff2ad86c
2014-09-30 14:44:50 -07:00
Thomas Inskip fd35084722 Implemented AES-CBC with Ciphertext Stealing for WVM decryption.
Change-Id: I4a1ba4247bb6f055905663568699b06d7c18a968
2014-09-24 15:38:17 -07:00
KongQun Yang 3114ee945d Add namespace edash_packager to packager codes
For mpd codes, rename dash_packager to edash_packager; for media codes,
add namespace edash_packager.

Change-Id: I1120e6110c734cd02bdbe15f1cf7abddcdfdd7ea
2014-09-22 12:51:40 -07:00
Ramji Chandramouli 5b869fb4fb Build break fixes for issues found using clang.
Change-Id: Id9e74f03ec27b25cdac22c43394ecc0ec9007d19
2014-09-17 12:15:49 -07:00
Ramji Chandramouli 972ec11bea Unit test for WVM clear input.
Change-Id: I7261e927238682ac73bb564366c5e7a731b439d7
2014-09-15 18:18:11 -07:00
Ramji Chandramouli e4e2dafa52 WVM parser and demuxer.
Change-Id: Id54f285afd617b00b7bdd077dc37898b0562a8f4
2014-09-11 16:26:30 -07:00
Thomas Inskip 9208a99bcd Fix for build break on build server.
Change-Id: I6aefaeb06198b3df26f96d9f14e5411b62145d3c
2014-09-08 15:43:29 -07:00
Thomas Inskip 1ff36eb217 Fix for decryption unit test break.
Change-Id: I4da3956f25fae2738fac9d0e3a8e8f597836d3a3
2014-09-08 11:43:25 -07:00
Thomas Inskip 7b1640a8f7 Added Widevine and fixed key decryption.
Change-Id: Ia29ce678c0e64e886cdd92bbfda727768356fd21
2014-09-05 10:38:21 -07:00
Thomas Inskip 65e558b19c KeySource changes to support media decryption.
Renamed EncryptionKeySource and WidevineEncryptionKeySource to KeySource and
WidevineKeySource respectively.

Replaced Initialize method with FetchKeys.

Added unit tests.

content_id parameter is now binary. Specified in command line with hex string.

Change-Id: I8010ca62d036cefb3a7c105e0eefee25bbf06d61
2014-09-03 12:06:58 -07:00
KongQun Yang 38c3569011 Use relative path for libxml and protobuf
This is to remove dependency on Chromium directory layouts, to make it
easier for integration.

Change-Id: Idcdf31a517e50a9a689794a665b3e5e7c05e6c1f
2014-08-29 20:29:36 +00:00
KongQun Yang f4d0ef432e Remove "testing" from gtest/gmock include header
This is to remove dependency on Chromium directory layouts, to make it
easier for integration.

Change-Id: If23512c9e4a70462d70ff965e59339a33541746c
2014-08-21 18:04:44 -07:00
Rintaro Kuroiwa fe4196e7da Add hook to DEPS for pulling clang
Change-Id: I43e637467f3efd31e12b75f0a08cc05ad5a4965e
2014-08-19 12:01:23 -07:00
Rintaro Kuroiwa d04ae592cd MpdBuilder should be able to write to File instance
Change interface of MpdBuilder so that it can write to a File instance
directly.

Change-Id: I4007deed4d0246a7c75fbc7c5aca3ece374c1224
2014-08-19 11:54:59 -07:00
KongQun Yang 05db9e02b9 Generate sidx box only if there are more than one entries
Change-Id: If7d7440f18e8b50a3261e18138b1a40bd754aba7
2014-08-01 01:06:33 +00:00
KongQun Yang 3e6190ec2b Deprecate normalize_presentation_timestamp
Force earliest_presentation_timestamp to start from 0 by default for
single segment segmenter.

Change-Id: Icfc14e27051c6edfb7a86559045c50a0ce51a62e
2014-07-23 22:55:54 +00:00
KongQun Yang 66f155502d Fix packager failure if there is only one sample in a fragment
That is a very corner corner case.

Change-Id: I45bc6c2d41db2a666a4ad997e4bf2eb17843e3ea
2014-07-23 22:55:54 +00:00
Kyle Alexander 78aa230552 Adding tests utilizing the sample packager binary.
Change-Id: Id868c3cb00f418912329cafeb48c784795a13cd3
2014-07-23 22:55:54 +00:00
Thomas Inskip 72b6988516 Change to allow receiving PPS before SPS.
Change-Id: I9c5a62a9b8948420cd45be39805a60db128964ac
2014-07-23 22:55:54 +00:00
KongQun Yang 301f8c134d Enable more compilation checks in clang
These checks were disabled in Chromium due to historical reason.

Also fix compilation errors as a result of the above mentioned change.

Change-Id: I5d240f2f11aa5920598f954d696a15bdcbf78fd8
2014-07-09 21:39:57 +00:00
Ramji Chandramouli cb12a2bad2 Removed 'explicit' keyword from empty constructor.
Change-Id: If508d44bdd60530292340e9731014e24e8ef0980
2014-07-02 18:56:01 +00:00
KongQun Yang 7a1e0cf68a Use Chromium style for clang-format
Change-Id: I364b5fb93645595c45abf70b8098df8f84c155c3
2014-07-02 22:49:46 +00:00
KongQun Yang b7c1e807f1 Fix type conversion narrowing error in C++11 (int to size_t)
Change-Id: Iff0bd355a506504117263d24ce3a4830345973c3
2014-07-02 15:38:20 -07:00
Thomas Inskip b3d7e7db93 Fix for reported build break.
Fix for broken unit test on 32-bit platforms.

Change-Id: Ie9c314b4ea14be2cb3e51c8b06374b22ffdf9200
2014-07-01 11:54:59 -07:00
Thomas Inskip 79d3c4f4ec Hooked MPD flags up to MpdOptions.
Added calculation of availabilityStartTime MPD attribute.

Change-Id: I00876005c71f28ea83fb5d9ba0ad1f19f1d08e69
2014-06-28 11:28:05 +00:00
KongQun Yang 6651ae1c3d Update README markdown
Change-Id: I2a840de742d67672035ef9d13191beffa2e60fdf
2014-06-28 11:28:05 +00:00
Rintaro Kuroiwa 5a6d95b330 Use bandwidth in muxer options
Change-Id: Ic284528d44c5159af0c1495114556e06991b81f5
2014-06-30 18:50:17 -07:00
Thomas Inskip efe52e62dc Implemented name/value pair stream descriptors.
Implemented user-specified bandwidth.

Change-Id: If01f26867d4285bcbc899310d3f1b98b928bed89
2014-06-30 18:34:18 -07:00
KongQun Yang 50aea3e6f6 Set fragment decoding time from input sample dts
For live streams, we cannot assume that the input decoding timestamp
starts from zero.

Also don't overwrite |normalize_presentation_timestamp| if the user
does not want to enable it for on-demand profile.

Change-Id: I1abe7926e0b25eb11dee021be964d126484d4036
2014-06-30 18:01:59 -07:00