Commit Graph

336 Commits

Author SHA1 Message Date
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
Thomas Inskip fc85154bca Changed es_parser_h264 to wait for initial I-frame to start emitting samples.
Change-Id: I7b9ca4a73a8765501a1c29e467e877e1eee5f9d9
2014-06-28 11:28:05 +00:00
KongQun Yang f609b2947c Key Rotation: Get the initial crypto index from first request
This change also updates the WidevineEncryptionKeySource to be able to support
KeyRotation enabled and disabled requests simultaneously.

Change-Id: I5178cafc0dbabbb64ac9af9969d3bf7d8117a4dd
2014-06-28 11:28:05 +00:00
KongQun Yang 33a87aa84b Support MediaInfo dump in packager app
VodMediaInfoDumpMuxerListener is also changed to manage the file
internally rather than take an opened file pointer. This change
simplifies the caller as the caller does not need to manage the media
info dump files any more.

Change-Id: Id9dcaf367c96ed13603b13b1e3705c687c948b07
2014-06-30 11:05:44 -07:00
KongQun Yang e60156a3dd Add --profile to set default options to ensure comformance
Change-Id: If114b9f10e029cb8ca53ae64c865a46558d1daca
2014-06-26 23:45:22 +00:00
KongQun Yang 2af92f67d2 More fix for issues on 32-bit OS
Somehow it worked fine on 32-bit Ubuntu but not on 32-bit Redhat.

Change-Id: Icfa4ec651dedd74edadf5a65f997f649c2693115
2014-06-26 23:45:22 +00:00
Rintaro Kuroiwa b2a10d478d Custom map compare function for better debug logging
When running mpd unit tests, add --logging -v=2 to see verbose logs and -v=3
for more verbose logs

Change-Id: I5484f3fd9be4c9e7527d86fa71205e8f025d102a
2014-06-25 03:38:49 +00:00
KongQun Yang 5d5750b405 Update gyp_packager to support earlier version of python
"{} {}" formatting in python is introduced in version 2.7. Replaced
with "{0} {1}" to support python 2.6 and below.

Change-Id: Ic20fdc5fce554a5a5cb57383d5587581f70de598
2014-06-23 15:25:51 -07:00
KongQun Yang 4519dda07c Fix a race condition in WidevineEncryptionKeySource
The race condition could cause incorrect progress in current crypto
period index.

Change-Id: I76a1a3be16e2266fd07b5bbf73cb9470eafaac4b
2014-06-23 15:22:11 -07:00
KongQun Yang 0f49af6cc1 Fix problems on 32-bit fresh linux box
There are two different problems:

1. int64/uint64 formatting: %lu formats unsigned long. However, the
definition of long is different on 32-bit machine and 64-bit machine.
We need to use a macro to format int64/uint64 correctly.

2. The packager target is dependent on openssl.

Change-Id: I5d51a500c3cb8bcd4b4049ab7ec5a985ac486a76
2014-06-23 13:48:41 -07:00
KongQun Yang 895989b4b0 Merge "Retire single_packager" 2014-06-23 17:14:23 +00:00
Rintaro Kuroiwa 4668770093 Respect MPD@timeShiftBufferDepth
- Only Segments with end time in range [NOW - timeShiftBufferDepth, NOW] get
  listed as S elements under TemplateTimeline element. Any old segments
  do not get listed.
- Also adding tests

Change-Id: I52df9acaec107610757d809ac6c9cb13592d6f37
2014-06-23 12:13:11 -07:00
KongQun Yang 956f483528 Retire single_packager
Packager has all the capabilities of single_packager, so we don't need
single_packager any more.

Change-Id: I3e4dad86eaaa7e798cc3b6cd54838328cd1b45c9
2014-06-23 11:23:25 -07:00
KongQun Yang 1927109818 Adjust WidevineEncryptionKeySource to handle timeout
Change-Id: Iac4a86acae2e522c6cfc84ce02ae7ec1dd30c47e
2014-06-20 21:32:23 +00:00
KongQun Yang 419d463eaa Modify HttpFetcher to use libcurl
With libcurl, HttpFetcher now supports timeout and https.

Two additional changes:
1. Remove happyhttp which is no longer needed;
2. Add README.packager for curl

Bug: 13658515
Bug: 14301830

Change-Id: I13c2835e7feca9abf36e5bb8f7bc35a7db9ec94c
2014-06-20 10:36:24 -07:00
KongQun Yang b3f6015ccd Add curl in third_party
Change-Id: I93d45d306a5ade6248596d7e230e65788e55e5ba
2014-06-18 01:56:00 +00:00
KongQun Yang b0c880e03f Check InitializeFragments status in segmenter
Change-Id: I203c9befcaba389958d789fa3c716349636d5b8c
2014-06-17 21:10:01 +00:00
KongQun Yang 8cb3be74b1 Support mpd generation in packager app
Change-Id: I9dfa8ca254d3d3e0210feeecc7389f360ab4b6a7
2014-06-11 17:03:22 -07:00
Kongqun Yang df64029e47 Update MpdNotifier due to MpdBuilder change
Change-Id: I7bb391d6f6776c2355d76a90157b1fe9153f5474
2014-06-11 16:15:02 -07:00
Rintaro Kuroiwa 8951894f13 Build fix
Clang built ok but GCC didn't like it.
Add missing header.
Remove extended initializer.

Change-Id: I1abbfdc49c94d8e6a39491a1b1e8c698ee2c0b88
2014-06-11 13:04:18 -07:00
Rintaro Kuroiwa 4a0193a816 MpdBuilder Live profile
Add BandwidthEstimator to estimate the required bandwidth for the
segments.
Also includes unit test for the change.

Change-Id: I28262424e2ed6ceebdf81e2b11dcd67feba1d68c
2014-06-11 12:36:53 -07:00
KongQun Yang 5b1980651f Support segment template identifier $Time$
Also add support for format tags.

Also change default fragment_duration to 10s, i.e. to have the same
value as --segment_duration. So by default, only one fragment per
(sub)segment is generated.

Change-Id: I21123723c3998b656037a397eb7b58b3d91721bb
2014-06-09 18:09:12 -07:00
Kongqun Yang 72ad649ac4 Move MoreThanOneTrue/AtLeastOneTrue/OnlyOneTrue to mpd util
Change-Id: I28883808a01d9bf8c115990edbd8b3052c673abb
2014-06-09 14:32:50 -07:00
KongQun Yang 1d920a1a4e Media code change to support live mpd
Change-Id: I24ca877ec62e69df5dbf3c9ede54da4df189dbc4
2014-06-06 10:38:48 +08:00
KongQun Yang 6837ac45b7 Implement MpdNotifyMuxerListener
Change-Id: I08742839c2be5e5da104914ec841b8c5dd57f0b7
2014-06-05 18:51:52 +08:00
KongQun Yang 1899d5c3b0 Add back Initialize which starts key fetching thread
The key production thread was started in constructor. The default http
fetcher might have already been used to fetch keys before it is modified
by set_http_fetcher. This could lead to flaky unittest.

Change-Id: I977b6450862d87ffeb5cb219bcd46b33d877e550
2014-06-05 18:21:13 +08:00
KongQun Yang cdf0aa178d Support configurable policy in Widevine encryption
Bug: 13658473
Change-Id: I90bbaa2e34687e7456c9a247d51c64cd91782891
2014-06-05 17:58:19 +08:00