Commit Graph

616 Commits

Author SHA1 Message Date
Haoming Chen 03d7a81c83 Fix a precision conversion problem.
- This causes a compilation error on Windows.

Change-Id: I53c03841565be00ebaa3acbfe621bb145f8f1ca2
2016-09-12 08:46:16 -07:00
Kongqun Yang c91fe34fbe Add packager/third_party/binutils with build utils
Fixes clang build failure in #140

Change-Id: Iccab0f9792cb03a6bc513aa7c573e00089a82604
2016-09-08 20:10:02 +00:00
Haoming Chen 28828b8a15 Add encryption information in demuxer.
- Add decrypt_config in media sample and stream.
  - Update subsamples when converting NAL unit to bytestream.

Change-Id: I7b8975a453f81b22cf74bee3c9a58b7e458cbaae
2016-09-08 17:13:36 +00:00
Kongqun Yang 6e8aa27e74 Update README and LICENSE
1. Add Windows support in README.
2. Add a useful links section in README.
3. Set line length to 80 characters in README; if exceeded,
   will wrap to a new line. This won't affect the presentation
   for the markdown.
4. Include the content of Chromium.License in License file.

Change-Id: I67f6d5935b46bc05fbcbf0a608aca9b0ae167173
2016-09-07 19:22:41 +00:00
Kongqun Yang 90e3ec3f9a Some misc cleanup
- Replace DCHECK_EQ with DCHECK for compatiblity
- Add ASSERT_FILE_CONTAINS
- Remove unnecessary release on unique_ptrs

Change-Id: I2ec22c52e47cb451479ae9a59818b9df20f62e63
2016-09-07 10:15:50 -07:00
Kongqun Yang c3d1dc1733 Deprecate STLDeleter and string_as_array
1. Replace STLDeleter with unique_ptr in container, which is
   supported in C++11
2. Replace string_as_array with &string[0] which is guaranteed
   to work in C++11

Change-Id: I7f39c0e51fc8a3fcbb41313094a0ca6b33db7bf3
2016-09-01 17:39:11 +00:00
Kongqun Yang ba2a649c00 LOG_TO_SYSTEM_DEBUG_LOG instead of a file
The current behavior of logging to a file in the same directory
as the binary will break if the binary does not have write access
to that directory.

Fixes Issue #139

Change-Id: I11adfaec676fc9bbef2a5caa3261889d1fba3b88
2016-08-31 14:50:23 -07:00
Kongqun Yang 7cbc2720dc Fix docker build failure due to build update
Change-Id: Icc5a31b516e7f5a3baa2713a753c1738ce6c1166
2016-08-29 17:52:53 -07:00
Kongqun Yang 09891dcd9e Fix access unit detection problem for H264
In H264, there may be multiple consecutive video slice NAL units
in the same frame. The original code assigns a new access unit
for every video slice NAL unit, which is incorrect.

Fixes #134.

Change-Id: I4d44271df48cb08867ddd02f7494fb3573af3356
2016-08-29 11:19:52 -07:00
Kongqun Yang 52cbcb321d Add appveyor config for Windows CI
Also fixes additional Windows build failures.

Closes #22

Change-Id: I8bc416f1a44810c438f095ec137d0d102f4e08a5
2016-08-23 12:24:34 -07:00
Kongqun Yang de9667080f Do not partially encrypt a segment
Mimic iso-bmff behavior: either all the samples in a segment are encrypted
or all the samples are clear.

Change-Id: I03bdbbf5a4b690f4d87c4dceb0f8155e6fae941e
2016-08-19 14:22:40 -07:00
Kongqun Yang 23f2913248 Update DEPS to fix mac build failure
Change-Id: I1cf95d5da8e3b950300cd61cd9286e957ef653ce
2016-08-19 13:49:41 -07:00
Kongqun Yang 644629c616 Replace scoped_ptr with std::unique_ptr
Change-Id: I1ed18bf876b6154d08a1f7913aa7e76c525451f9
2016-08-18 17:12:36 -07:00
Kongqun Yang d501b457d0 Fix WebM keyframe detection in BlockGroup
The right way to detect the presence of a keyframe in a BlockGroup
is to look for the absence of the ReferenceBlock element [1].

Closes b/30433206

[1] https://matroska.org/technical/specs/index.html#ReferenceBlock

Change-Id: I2b3c8704cbabcd5cbee38448e5528425865561a4
2016-08-18 23:20:40 +00:00
Thomas Inskip db92c9a22b Implemented WebM VP9 subsample encryption and decryption.
Change-Id: I98f02c05ec8bcc976e01ff41478e92b8809c0076
2016-08-18 13:55:36 -07:00
Thomas Inskip 336ea5cb34 Windows build working
Change-Id: I6d9cfa0a310c4c6125c839e4d6a085903e981c9c
2016-08-18 08:30:26 -07:00
Kongqun Yang 5278f9cb89 Fix docker build break due to unknown curl pathspec
Somehow docker does not like named tag. Replace with sha instead.

Change-Id: I2ad5ba9e6961abcc8c7bc5157c5eeb98b34162d6
2016-08-11 14:48:49 -07:00
Thomas Inskip 224747db0b libcurl build for Windows
Change-Id: Ie14613d36509b3f45220092c5c196b14fd4b0a10
2016-08-03 16:05:40 -07:00
Thomas Inskip d059b27a69 Updated third_party/gflags.
WebRTC portion (gyp build) now checked in because separate repository is no longer available due to transition to git.

Change-Id: I56436cbbc3f02a5f77112917d6229aea69f21d97
2016-08-03 07:52:16 -07:00
Thomas Inskip f169bccdc9 Updated libxml.
Change-Id: I4f2315f10227e6b8c2545b81ea1adcf388c37cee
2016-08-02 19:11:17 -07:00
Thomas Inskip 1fbc410489 Updated protobuf library.
Change-Id: I09705df523ba4d0954925845a1619b25d70fd90f
2016-08-02 19:11:17 -07:00
Kongqun Yang 16d8583735 Update boringssl and curl(v7.50.0)
Change-Id: I89b40cf03d1aab9a13b0df449e540ab73d03451e
2016-08-02 12:00:19 -07:00
Kongqun Yang 2907724416 Merge pull request #131 from PhiloInc/fix-broken-link
Fix broken link to W3C "cenc" Inititialization Data Format documentation
2016-07-26 15:33:40 -07:00
Gabe Kopley 081b6994d6 Fix broken link to "cenc" Init Data Format spec 2016-07-26 14:52:08 -07:00
Kongqun Yang c540e5afa0 Update CHANGELOG for v1.5.1
Change-Id: I5ea7142396ef7d9d81b2aed86b93fd26241641c4
2016-07-26 01:03:31 +00:00
Kongqun Yang 01e53ee946 [pssh script] Fix invalid hex_16_bytes error on lower case input
Change-Id: I274634f9076500156527c04bc9cbb9f86da3c6bd
2016-07-25 17:58:03 -07:00
Kongqun Yang ad95b9d8de Fix text formats not recognized problem
Also updated packager_test not to fill in output_format by default,
which will help catch these kinds of bugs.

Closes #130

Change-Id: I77157317de822d3f543f7e27d94bb4df7a1649d2
2016-07-22 20:51:16 +00:00
Kongqun Yang 2cdd54b6f7 Remove restriction on sample duration to be 0 for mp4
0 sample duration is seen occasionally in the contents in the wild.

Closes #127

Change-Id: I48b9fac4add79f39a83fc571502bedb9f0be71df
2016-07-19 18:56:45 +00:00
Kongqun Yang fae7874c4c Add a runtime flag to use dts in timeline for mp4
This flag is needed to workaround the Chromium bug
https://crbug.com/398130, which uses decoding timestamp
in buffered range.

Closes #113

Change-Id: Ib8f18be7165dd968bdc36c18ce29f694235c0c26
2016-07-19 18:56:08 +00:00
Kongqun Yang a80995538d Remove restriction on sps:gaps_in_frame_num_value_allowed_flag
Packager should not care about this flag, whether it is supported
is up to the decoder.

Closes #126

Change-Id: I5e05d291eab01375f7f11c951b9dc93c1358c38a
2016-07-18 20:25:40 +00:00
Kongqun Yang cf778f7149 Update CHANGELOG for v1.5.0
- Also updated a few wording in README and in the code.

Change-Id: I9adf297c00aee92e61e87effa3bdcfaf402638e5
2016-07-12 12:25:48 -07:00
Kongqun Yang f3d35b730c Add version information to generated HLS manifests
- Also refactor the existing version code.

Change-Id: Ib409630c4f87965a37b1d6a1bcec68178a704ce6
2016-07-11 23:26:36 +00:00
Rintaro Kuroiwa db70721e35 Fix HLS packaging failure with clear lead = 0
- Add MuxerListener::OnEncryptionStart() for notifying that further
  segments are encrypted.

b/29621230

Change-Id: I881b29d55baaf3d04e005a3b95d898071c3f272b
2016-07-11 20:43:01 +00:00
Kongqun Yang e0c5874d31 Update encrypted testing content to use common system id
- Also fix a bug in fixed key rotation with empty pssh_data.

Change-Id: I1110b839fc821c5c4778854c0b29032d3ee2d384
2016-07-11 20:10:31 +00:00
Kongqun Yang ad3c1768bb Fix dependency in hls.gyp
Seeing occasional build breaks when building hls_builder, e.g.
https://travis-ci.org/google/shaka-packager/jobs/143445907
Although hls_builder is dependent on widevine_pssh_data_proto
indirectly (through media_base), it does not work all the time.
Looks like the proto has to be a direct dependency.

Change-Id: Id4d9d0b9e669df0967cc767132ef29717243a722
2016-07-08 14:48:47 -07:00
Kongqun Yang 7cfae3891a Merge pull request #115 from PhiloInc/specify-ubuntu-version-in-dockerfile
Specify Ubuntu 14.04 in Dockerfile to ensure successful build
2016-07-08 14:25:54 -07:00
Gabe Kopley c545c46053 Add self to CONTRIBUTORS and Philo, Inc. to AUTHORS 2016-07-08 13:18:30 -07:00
Gabe Kopley e79115a7bf Specify Ubuntu 14.04 in Dockerfile to ensure successful build
(latest was pulling 16.04 which, while it successfully builds Release, yields an error building Debug: https://github.com/google/shaka-packager/issues/118 )
2016-07-08 13:16:36 -07:00
Kongqun Yang 5f0d138ec9 Adjust hls descriptor validation
- Try to determine container name from segment_template if output is
  not specified
- segment_template descriptor is required for TS
- output descriptor should not be specified for TS
- Generate hls_playlist_name from stream number if not specified
- Update packager_test.py to include playlist validation

b/29551186

Change-Id: Ide7169f1c26c85a6e38272dda0e1af77135b4d90
2016-07-01 14:14:24 -07:00
Rintaro Kuroiwa 1095b73a44 Fix TS and Media Playlist with clear lead
- Cannot include PMT for following encrypted segments in the clear lead.
  Some players consider them as conflicting codecs.
- Add EXT-X-DISCONTINUITY in front of first EXT-X-KEY to notify that the
  codec is switching from e.g. "avc1" to "zavc".

b/29621230

Change-Id: I45c74813630c229d66245e992eb3a5117326bb14
2016-07-01 10:43:11 -07:00
Rintaro Kuroiwa 50fe17fa9f Use max bitrate for MediaPlaylist bandwidth calculation
- HLS expects max for VOD.

Change-Id: I91e9e07a27abe7167efeefc99aaada2acbed9314
2016-06-30 21:58:33 +00:00
Jacob Trimble f9bf197f2b Fix bug in VPx codec configuration.
Before, we converted the WebM configuration to MP4 in the video
client, however this lead to a bug when fields were missing.  So
now don't convert until the cluster parser so the extra info from
the stream can be added.

This also fixes a bug where the value was not printed in the warning
logs.

b/29580732

Change-Id: If0a1a4d135f98292cdaae15a11027f42d844e85d
2016-06-30 19:51:09 +00:00
Kongqun Yang f27960e00d Add fixed key support for HLS sample-aes encryption
Change-Id: I5a18e014f697561e0741b043e91f70fe2f11d2ce
2016-06-30 19:47:00 +00:00
Rintaro Kuroiwa dad07c95d7 Set MediaPlaylist version to 5
- Required for KEYFORMAT and KEYFORAMTVERSIONS attributes.

Change-Id: I834cde6e475e4f1192db0c93c4b88e2ab838532e
2016-06-29 10:15:46 -07:00
Jacob Trimble abb1abf5c5 Rename StreamInfo::extra_data to codec_config.
Since the |extra_data| field contains codec-specific configuration
data, it makes sense to call it |codec_config|.

Change-Id: If9e35165a00fe82628cf931df397a8ef06505b0d
2016-06-27 13:16:47 -07:00
Kongqun Yang ebd76aba27 Update CHANGELOG with proper tag
Change-Id: Ic370c3e429f4a8c91504d74d6eaab62f9a17b8e6
2016-06-23 18:26:36 -07:00
Kongqun Yang 8189ff9da5 Update CHANGELOG for v1.4.1
Change-Id: I65ba19b8f5608bdb77657815031c67b4e91b4dc2
2016-06-24 01:01:58 +00:00
Rintaro Kuroiwa 9198167fd7 Update README for TS and HLS
Change-Id: I0c2730e1975a650c3a885ed7c7789d8ce58dea7c
2016-06-23 17:55:08 +00:00
Rintaro Kuroiwa b07adaeae7 Warn user when single segment and segment template are used
Change-Id: I4b85f50aa0890fb54a642c38520225df9bdbbbef
2016-06-22 15:59:00 -07:00
Jacob Trimble 6550868574 Add codec private data to VP9 in WebM.
b/29009350

Change-Id: Iaafc87340043eff77c3ef7e1c1135d8c4c4287ae
2016-06-22 16:43:57 +00:00