Also moved MediaHandler output validation to Initialize instead.
This CL also addresses #122 with consistent chunking.
Change-Id: I60c0da6d1b33421d7828bcb827d18899e71884ce
- WebVttMediaParser uses WebVttSampleConverter to generate non
overlapping media samples.
- The media samples contains ISO BMFF boxes.
- Add kCodecWebVtt to signal that the media is webvtt and
the samples will be in ISO BMFF boxes.
Change-Id: I639902cdba7b04af75428bc20622e26b8203cfb2
Before this, HLS output did not contain language information.
Now, media playlists are properly tagged with a language in the
master playlist.
b/36134267
Change-Id: I172e946dbedd096a44cb2f917b007cc004756228
- Also sets up the packaging and verify it works.
Some of the changes are temporary to get the integration going.
Change-Id: I0cf6c379d185e157808acabb9ef58ff93d4a39ae
The spec actually requires all NAL units to be escaped, so there
is no need to escape it again.
NAL byte stream is one demarcation method; NAL unit stream is another
demarcation method. Regardless of the demarcation method used, the
requirement for NAL unit is the same. See the last paragraph of
7.4.1 NAL unit semantics on the requirement on emulation prevention bytes.
Change-Id: Icc63fcc5cf965632e331f5af5f673164c7c1663a
CENCv3 recommends only encrypting video data in slice NALs. Slice
data partition NALs should not be encrypted.
In the code, differentiate is_vcl and is_video_slice. They are the
same for H265; for H264, vcl NALs include slice data partition NALs
but video_slice NALs do not.
Change-Id: I91f4bdd76d25f0eac50e39aed350ebce3f667121
- Logic for splitting up WebVTT cues into MP4 samples.
- For any cue intervals that overlap, a new sample must be created.
Change-Id: Icf7478f42d8c5790bf6f404d512c1251dd34c405
This handler is a multi-in multi-out handler. If more than one input is
provided, there should be one and only one video stream; also, all inputs
should come from the same thread and are synchronized.
There can be multiple chunking handler running in different threads or even
different processes, we use the "consistent chunking algorithm" to make sure
the chunks in different streams are aligned without explicit communcating
with each other - which is not efficient and often difficult.
Consistent Chunking Algorithm:
1. Find the consistent chunkable boundary
Let the timestamps for video frames be (t1, t2, t3, ...). Then a
consistent chunkable boundary is simply the first chunkable boundary after
(tk / N) != (tk-1 / N), where '/' denotes integer division, and N is the
intended chunk duration.
2. Chunk only at the consistent chunkable boundary
This algorithm will make sure the chunks from different video streams are
aligned if they have aligned GoPs. However, this algorithm will only work
for video streams. To be able to chunk non video streams at similar
positions as video streams, ChunkingHandler is designed to accept one video
input and multiple non video inputs, the non video inputs are chunked when
the video input is chunked. If the inputs are synchronized - which is true
if the inputs come from the same demuxer, the video and non video chunks
are aligned.
Change-Id: Id3bad51ab14f311efdb8713b6cd36d36cf9e4639
This will move ContentProtection element from Representation
to AdaptationSet.
Shaka Player already supports AdaptationSet switching
urn:mpeg:dash:adaptation-set-switching:2016;
ExoPlayer does not support it yet. Filed
https://github.com/google/ExoPlayer/issues/2431 to track the issue.
(ExoPlayer does not like having ContentProtection in Representation
anyway)
Closes b/34691105
Change-Id: I69d0a4d0e15a912a35c8b2686620419a28e4cc99
- Deprecated command line flags --profile and --single_segment.
'segment_template' in stream descriptors implies live profile
and non-single segment.
- Added flag --generate_static_mpd_for_live_profile to generate
static mpd for live profile; if not set, dynamic mpd will be
generated.
Close#142
Change-Id: I78879297ed118f0f246c4753a16ad125bd6b5e4f
- Added two new fields in MpdOptions: dash_profile and mpd_type
- Updated MpdBuilder to support LiveProfile with static mpd
- Command line arguments will be updated in the next CL
Issue #142
Change-Id: Ibd35e5c9e1b1ef98043392e3f04a0af4700135c1
- Add MSVS related patterns to gitignore.
- Removed encryption_modes.h from media_base.gyp. It doesn't exist.
Change-Id: I44bc86ff7e79daf6f7bc61c21a558937530d8e66
Current mechanism of using AdaptationSet @group is not spec compliant.
The spec compliant mechanism is to use supplemental descriptor with
schemeIdUri: urn:mpeg:dash:adaptation-set-switching:2016 as specified
in ISO/IEC 23009-1:2014/Amd.4:2016.
Fixes#156
Change-Id: I4d97648547a23315ba9c09dcadb14e18c99a45fc
- nalu_data points to the beginning of the nalu, instead of
beginning of the slice header which excluded the nalu
header.
- nalu_size is the size of the whole nalu.
- header_bit_size calculation is corrected. The size used to exclude
emulation prevention bytes.
Change-Id: Ic00f42caeddf7b4701f3948e6ef8a3537fd7f770
- If OnEncryptionStart() is called OnMediaStart(), someone should be
calling NotifyEncrytionStart().
Fixes#169
Change-Id: I597f317d2ddeb3091b7e9d238eb9695b4cc9c69d
Three options are supported right now:
- reuse=1|0
Allow or disallow reusing UDP sockets. Default 0.
- interface=a.b.c.d
Address of the interface over which to receive UDP multicast
streams.
- timeout=microseconds
Timeout in microseconds. Default to unlimited.
A UDP url should be of the form udp://ip:port[?options], here
is an example:
udp://224.1.2.30:88?reuse=1&interface=10.11.12.13&timeout=12345
Also deprecate --udp_interface_address flag in favor udp options.
Closes#133
Change-Id: I962d35bfedc1779d67ba20ed910207c66b7c1a15
1. Allow encryption pattern of 0:0, which is treated as 1:0;
2. Remove the special handling of pattern 1:0 in pattern cryptor
which may not always be correct;
3. Allow senc/saio/saiz boxes to be absent.
Change-Id: I372e61182ec577107e39cb601c3aed80616b036d
The original code creates temporary file in the current directory,
which may not always be writable.
Change-Id: Icc278dd5db6be6206ae29defbb7423bae39cc978
- Also import the version of the protobuf bundled in packager first,
this avoids importing the installed version of the protobuf, which
may not be compatible with this script.
- Print help if no argument is supplied.
Fixes#162
Change-Id: I1b5e87ba7fb51e81b0d4dd3791aaeb37ee0fd6ce
Cues used to be generated in the end of the file; if http range
request is not supported, clients have to download the whole
file to get to the cues.
This CL updated TwoPassSingleSegmentSegmenter to write cues
after writing webm header.
This CL also updates libwebm dependency to latest.
Closes#159
Change-Id: Ic73548e1b872e6b13a37627707e7d0ff3e556877
The original code accumulates sample durations in seconds (double)
and then generates new segment / cluster by comparing the accumulated
value with configured value.
There may be loss of precision when accumulating values in double.
For example, with a GOP of 96 frames and frame rate of 24 fps; the
accumulated frame duration for 96 frames is 3.999999999999, which is
very close to 4.0 but not 4.0. Problem would arise if segment
duration is set to 4. The created segments would have a duration of
8 seconds instead of 4 seconds.
The new code accumulates sample durations in uint64_t relative to
input time scale; the configured segment duration will be converted to
timescale for comparison. This avoids loss of precision.
Change-Id: I3ae24be82a7ce45f923a6f90fea495b8b6b2e7ef
Setting this flag will tag any matching tracks with kRoleMain.
The player will then know which tracks should be default when there
is not a language match.
Closes#155
Change-Id: I827304c49e345d07b1e76f7a46421b60f228f0ba
Language tags can have subtags, such as "por-BR". While the base tag
should be 3 characters, the entire tag can be longer. Rather than
parse out the base tag and check that it is size 3 without the subtag,
we can just trust the ISO tag converter to do the right thing.
Change-Id: I2a186b5c8db0f373ee82ef68245ecc33cb068581
Some subtitle files use .webvtt instead of .vtt, probably because
ffmpeg uses -f webvtt when converting from some other format.
Change-Id: If88e8d2b90e5dea6751409568d5191e923dec4aa
- Also regenerated test content to insert an iframe every one
second: ffmpeg -i source.webm -auto-alt-ref 1 -g 30 out.webm
This makes sure the content is actually encrypted with one
second clear lead in end to end test.
Change-Id: I488143c148e2d6c45ba1586f6d0d835dc46db86e
- Add decrypt_config in media sample and stream.
- Update subsamples when converting NAL unit to bytestream.
Change-Id: I7b8975a453f81b22cf74bee3c9a58b7e458cbaae
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
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
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
Mimic iso-bmff behavior: either all the samples in a segment are encrypted
or all the samples are clear.
Change-Id: I03bdbbf5a4b690f4d87c4dceb0f8155e6fae941e
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
WebRTC portion (gyp build) now checked in because separate repository is no longer available due to transition to git.
Change-Id: I56436cbbc3f02a5f77112917d6229aea69f21d97
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
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
Packager should not care about this flag, whether it is supported
is up to the decoder.
Closes#126
Change-Id: I5e05d291eab01375f7f11c951b9dc93c1358c38a
- Add MuxerListener::OnEncryptionStart() for notifying that further
segments are encrypted.
b/29621230
Change-Id: I881b29d55baaf3d04e005a3b95d898071c3f272b
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
- 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
- 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
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
Since the |extra_data| field contains codec-specific configuration
data, it makes sense to call it |codec_config|.
Change-Id: If9e35165a00fe82628cf931df397a8ef06505b0d
Although superframe index is not encrypted, it should still be inserted
into subsamples list (with cipher_bytes as 0).
Change-Id: I06b38f8333a22a31a71cd67e0412218dd3aaa5c3
- Add flags and stream descriptor fields for HLS.
- Remove fields from MuxerOptions. Instead pass them directly to
HlsNotifyMuxerListener.
- Rebase segment names to the master playlist's path where it makes
sense.
Change-Id: If4f54bc56ff46dc6140859a79ed66f7b99112ed7
- Tracks other than video are protected using whole-block full-sample
encryption as specified in ISO/IEC 23001-7:2016(E) 9.7, which is
equivalent to a pattern of 1:0. This is different to the non pattern
encryption counterparts.
- Also updated the code to allow the existence of other protection
schemes in the original content, which will simply be ignored.
- The internal cryptor used by AesPatternCryptor should not use
constant iv, add a DCHECK for that.
- Optimize AesPatternCryptor handling on the special pattern 1:0.
Change-Id: Idc704e7bc6b347741336f38c6d3620fc19392960
This is part of the effort to support Opus in iso-bmff #83.
Changes in this CL:
- Add support for multiple SampleGroupDescription and SampleToGroup
boxes in TrackFragment box;
- Add support for SampleGroupDescription and SampleToGroup boxes
in SampleTable box;
- Add support for AudioRollRecoveryEntry in Sample Group and 'roll'
sample grouping type;
- Also fix a bug that default length was not set correctly in
SampleGroupDescription when constant iv is used.
Change-Id: I7e31386ea6cd17a8ee5e1dca4c1a90937d51368f
- There is a race condition during build. hls_builder should depend on
widevine_pssh_data to remove the race condition.
Change-Id: If9fa8895104a774b8ecc7545a57323ae49274936
- For encrypted segments, PMT specified by SAMPLE-AES specification is
generated.
- Remove time_scale_ field from TsWriter. It is not used.
- Move ContinuityCounter to a separate file.
- Add ProgramMapTableWriter and implementations.
- continuity_counter is incremented for PAT and PMT.
Change-Id: If0dd0990203cb6990f39a6832048bdc3ff08decd
This add several unit tests for EsParserH26x to test the various
NAL unit orders and access unit contents. Some tests are disabled
and will be fixed in another patch.
Change-Id: Id5e3291e22f1fe17ada2c03c42e2cdfe226abcb2
- BytesOfProtectedData in 'cens' SHALL also be 16-byte aligned
- Fix an incorrect box definition bug w.r.t to 'cbcs' and 'cens'
- Also add various protection scheme tests
Close#77Close#78
Change-Id: I63c8d8b01ce16ed60affa97ec95fc62bc2da06df
- The current implementation only handles VOD.
- Add #EXT-X-PLATLIST-TYPE.
- For VOD Add #EXT-X-ENDLIST at the end.
- Append comma at the end of EXTINF.
Change-Id: I16f01da66f8bbf0229395cb380fa125ffd9328a8
- Disallow packager_test.py to be executed from source directory
- Remove the building of packager target from packager_test.py. User
need to make sure packager builds successfully before running
the test.
- Remove build_type parameter which is no longer needed
Change-Id: I479d3c39b8d45730e5388d194069f1320fa5cd75
- These warning messages are not useful since the code needs to
loop through various container types to find a matching one.
Change-Id: I1d8eca563faf24e485ac71cce32e09515c174bf2
Replaces the InitializeFromH264 and InitializeFromH265 methods with
a single Initialize method that accepts a CodecType. Also moves the
CodecType enum from NaluReader to Nalu.
Change-Id: Ie33aa9c0d772a7f3c6a2e9c867e25be3edfe7828
- CBC cryptors should accept IV of size 8 bytes - it will be zero
extended to 16 bytes.
- Fixed iv() not updated problem in AesPatternCryptor.
- Replace kChainAcrossCalls with ConstantIvFlag enum flags.
Change-Id: I3fb4de0e8abbe891e6271e779373ba53f8df660d
- Sample duration wasn't scaled in TsSegmenter to calculate the current
segment's length. So segmenting length did not always respect
segment_duration.
Change-Id: I1ef4747dbd12bde7852ffcbceb971f2775aa18b3
Parsing vui_parameters in the SPS is required to be able to extract
the resolution of the video. This also adds a method to extract
the resolution to the H.265 parser.
Issue #46
Change-Id: Idf498d2afdb36a689490151a4ae6baef0b6b73f6
- Media Playlist that is non-VERSION 1 must have EXT-X-VERSION.
- Attribute for EXTINF should be CODECS instead of CODEC.
- BANDWIDTH attribute expects bitrate (not bytes per second).
- Removed unnecessary check if MediaInfo has media_info_name, in
SimpleHlsNotifier::NotifyNewStream().
Change-Id: Ia63cfa59e5e2ec24bbf1b784164e6e41176fc589
Now Finalize() will close all the files used by the segmenters. This
is important to allow WebMMuxer::FireOnMediaEndEvent to get the
correct size of the media file.
This also changes the WebM muxer to use 64-bit numbers for the init
and index ranges to correctly support >4GB files.
b/28194272
Change-Id: Ia84e4a4b0756f89644efea99a1a51968b22a1338
- Add hls_name and hls_group_id fields to MuxerOptions. This is used to
pass the NAME and GROUP-ID values for EXT-X-MEDIA tag to
MuxerListener.
- Change MuxerListener::OnEncryptionInfoReady() to take an
initialization vector.
- Change MuxerListener::OnNewSegment() to take segment name.
- Reworded and formatted MuxerListener comments to Doxygen style.
Issue #85
Change-Id: Iea06e68552a56ae180177ffd6ca315a7cf39456c
- Fixes Mac build.
- Mapping to scoped_ptr doesn't work, instead use raw pointer and
STLValueDeleter.
Change-Id: If17e43d9d4aba8c92a76d2b1ca99a64c6a2b0e84
- HlsNotifier interface, similar to MpdNotifier.
- SimpleHlsNotifier class can generate playlists.
It can also handle encrypted media with Widevine encryption.
Issue #85
Change-Id: I9305ddf42796370d3e5df360633c80997c909365
- crypt_byte_block and skip_byte_block for pattern-based encryption.
- constant_iv for constant iv (used by 'cbcs' protection scheme).
- Also renamed iv_size to per_sample_iv_size.
- Also changed "bool is_encrypted" to "uint8_t is_protected" to align
with CENC spec.
Issue #78
Change-Id: I2878a91e0ebe536a08a3e3109daf157fe4440e27
- Class to generate Master Playlist.
- Takes multiple Media Playlists to generate all the playlists.
Issue #85
Change-Id: I3e2be8763cc771d468245f64753e8a38b0746686
- Remove EncryptionMode enums
- Remove AesEncryptor::InitializeWithRandomIv, replaced with
a static function AesCryptor::GenerateRandomIv, which should
be called to generate the iv if the iv is empty.
This change is to prepare support for CBCS and CENS pattern-based
protection schemes.
Issue #77
Change-Id: Icba35089d6e451cbea7ebbf5dd5674079f206390
- FOURCC is not a mp4 only concept. It is also used elsewhere.
- RCHECK has been used outside formats/mp4.
Also updated the FOURCC enum names to match the actual fourcc code, e.g.
FOURCC_mdat for "mdat".
Change-Id: I5be02f12695882c0fb41d359305fb8ec01303a06
- Create AesCryptor class as the common base
- AesCryptor::Crypt function will serve as an Encrypt function for
encryptor and a Decrypt function for Decryptor.
Change-Id: Ie91fb14964b5091786705bf510656f40d73af160
- Simple implementation of MPEG2 TS muxer.
- This does not take MuxerListener so a manifest cannot be generated.
- Encryption is not supported.
Issue #84
Change-Id: I117b772dbbce5437398defbd564883ad758916d5
- Segmenter should not finish a segment unless the next sample is a key
frame.
- Renamed PesPacketGenerator::Finalize() to Flush().
- Use duration from the sample instead of the one copied to PesPacket.
- Remove duration field from PesPacket.
Issue #84
Change-Id: Icd90e65fd63fdeb955e7abac3473b0b54db6ac4a
- Multi-file segmenter implementation.
- The samples are passed to PesPacketGenerator to generate PesPackets.
PesPackets are passed to TsWriter to write them to file.
Issue #84
Change-Id: Ia4cae2abe2e7df46016dcdb791baaab2818aea03
The positions in the SeekHead element should be relative to the
Segment payload, not the start of the file. Also added entries for
Tracks and SegmentInfo.
Change-Id: Id692da25fffc27d78e9f1a06d061431aeb6f1e7c
This script can be used to parse and generate PSSH boxes. This
serves two purposes:
* Parse PSSH boxes into a human readable format.
* Take several arguments to generate PSSH boxes.
This is also able to parse Widevine and PlayReady PSSH data and will
print the parsed data instead of the data as binary. This can also
generate Widevine PSSH data instead of having the PSSH data passed
as an argument.
Change-Id: I245bd9abf79a259f6fda01d1fc0489b4a4a73db5
- Optimize and clean up encryption and decryption code.
- Consolidate various CBC encryption/decryption schemes into a
common class.
- Make it a constructor argument whether cipher block chain is
continuous across Encrypt/Decrypt calls.
- Also align protected region size as required in CENC spec.
Issue #77
Change-Id: I533d92ada3cd80933b532b9c3a1cca105ba66f8e
Another feature that the mac build does not support. It incorrectly
uses a copy-constructor when creating new values in a std::map. This
is incorrect and should use an in-place constructor with C++11.
Change-Id: I1e822747e97eb4ae01596d63ea05058cc383cb49
This adds a preliminary H.265 parser. The parser only support
reading the slice header. This also attaches the H.265 parser to the
VideoSliceHeaderReader so H.265 frames can have unencrypted headers.
Issue #46Closes#40
Change-Id: I8b98e1f8bb04e359d9bf896fd5b2939c326b196b
The flag --include_common_pssh will add another PSSH box in addition
to the Widevine one which will contain the key IDs of all the keys.
Closes#88
Change-Id: Ic719b19747530f0e4856cfb36471a644d572a734
- Use 'builddir_name' environment variable to create the output
path in test_env.py
- This allows running the packager test with different build
configs because it doesn't use 'out', e.g. it could use 'out_clang'
for clang builds.
Change-Id: I843343ec8e2d0a64dffbab2fdbd38aead5c97718
The new algorithm will parse NAL unit header and only starts a new
NAL unit if it is valid, otherwise it will be considered part of
the previous NAL unit.
Closes#96
Change-Id: I45f2a0f37d51841ee8345d6d0d38fcda57e0a009
KeySource is now an abstract class that is implemented in two
types WidevineKeySource and FixedKeySource. This also updates
fixed key encryption to use v1 PSSH boxes with the common system
ID.
This also updates the --pssh argument. Now it accepts full PSSH
boxes rather than data. Multiple PSSH boxes can be concatenated
together.
Issue #88
Change-Id: I4bd0290f6d8b965f7d118f075c96e0f267d7e831
- Part 1.
- Add packager command line argument "protection_scheme" to specify
protection scheme. Plumb through packager code to enable CBC
encryption/decryption.
- Add scheme type "cbc1" to sinf.
- Refactor AES encryptor and decryptor.
- Need more work in the subsample handling.
Issue #77
Change-Id: I3a9304d89adf5efbfb226b6e805a3077b6cb8c68
* EncryptionKey now contains them rather than a PSSH box.
* Outputs PSSH boxes for each entry.
* Outputs a ContentProtection element for each entry.
* Removed SystemName and UUID from KeySource.
* Removed --scheme_id_uri packager argument.
Issue #88
Change-Id: I2651784c3220fd64f5b1773fdcd70285690cf8c0
This adds a new function to key AdaptationSets based on the
characteristics that require separate sets.
With this, we are now able to package multi-codec assets at once
(AVC1/MP4 and VP9/WebM in the same manifest, but in different
AdaptationSets).
Fixes b/27534371
Change-Id: Ie82fd096d2ef99fd23e323d60fd0849b1e8d7500
When normalizing language tags to their shortest form, we need to
split off subtags and treat them as separate components that do not
get changed.
Furthermore, MP4 can only store language tags without subtags. So
only store the main language in MP4 output.
Fixes b/27533973
Change-Id: I96049e274aae9841e321c53039ef6464a2e61574
Add another overload to fetch by key ID directly, used by WebM.
Changed the one using PSSH data in favor of the entire PSSH box.
This also moves the Widevine proto to media base. Now, the
Widevine key source handles creating the Widevine specific PSSH
data.
Change-Id: I6f4633facad39207809ffbad970635d1f9d70983
This moves pssh parsing to its own class in media base. This type
can be used to parse and generate pssh boxes. This new type also
supports both v0 an v1 boxes.
This also modifies the pssh box definition to only have the |raw_box|
and moves all pssh parsing and handling into mp4 media parser.
A follow-up change will replace the remaining usages of 'raw' pssh
box data with the new type.
Issue #88
Change-Id: Ic2436ecb5df8b3558b81e600dc095b0efd122ab1
This moves common parsing code out of the H.264 parser. This is in
preparation for the H.265 parser to use.
Change-Id: Id05b55f6adc2ea31e97c8a9f22023e851808a8a7
Now the AVCDecoderConfiguration and HEVCDecoderConfiguration classes
will read the Nalu from the blocks, meaning they will store a
vector of Nalu objects for the data.
Also added H.265 to the Nalu class and added argument to NaluReader
to read H.264 vs H.265 Nalus.
Change-Id: I8d8194a90fd72a30af66e9776e01379f8428542c
This is needed to test encryption in end to end test since the video
is segmented in gop boundary by default. Due to the existence of clear
lead, the first segment is always left in clear.
Change-Id: Ie8d37a1740f9061515298cb9fb7b58983592cc5b
This member refers to the size of the payload (the data after the
header). Since the pointer is called |data|, calling this size
|data_size| is confusing.
Change-Id: I9174cf6c5c402beddaebbce7c16514470ba0c3da
Now the Nalu data pointer points to the start of the NALU header
rather than pointing to the start code. Added a new method on
NaluReader to check whether the stream starts with a start code.
Change-Id: Ifaecbe0c911aa5cffdf0a966028e6cada8621cc3
For non-video slices, the data is not encrypted. This also skips the
frame headers for H.264; support for H.265 will be added later.
Issue #40
Change-Id: Id0cb0fb9ddb6adedf63ef4aef6b3a26260a21654
Removed the code for NALU splitting in the H.264 parser and moved
it to its own class. Also added support for length-prefixed
NALU splitting for use with the encrypting fragmenter.
Change-Id: I1e91266681f1b117fb2382cf80590651efc06619
Parse channel layout value from dec3 box. Pass it through audio stream
info. MPD builder forms audio channel configuration to signal ec-3
codec.
Specs: 1) ETSI TS 102 366 V1.3.1 Digital Audio Compression (AC-3,
Enhanced AC-3) Standard E.1.3.1.8.
2) DASH-IF Interoperability Points v3.0 9.2.1.2.
Issue #64
Change-Id: Ia2c22dd3d82e757ba5a88ba1de35c5d593f5005e
Before this change, the media file will fail to be parsed if it contains
non-wvtt text streams. This change allows demuxing of video and audio
streams in these media files even though the text stream is ignored.
Fixes#74.
Change-Id: I7ef108a51125c4965fe48c39efe9638f3a0e4759
This also changes the way frames are written in the WebM muxer. Now,
frames are stored and written on the next call to AddSample. So each
call to AddSample will write the previous frame. This is needed to
determine whether the given frame is the last one in the cluster.
Closes#70
Change-Id: Ic69ebad3c4729cdaa2017c9c7f497048501ac907
Create a new MacOSX configuration for curl:
- Add a curl_config.h created on MacOSX
- Add a find_curl_ca_bundle.sh that searches default folder from Homebrew and MacPorts for a ca bundle.
To find the files either install OpenSSL from Homebrew or MacPorts, or Curl from MacPorts.
When generating ninja files we end up with two libwebm targets.
packager/media/formats/webm/webm.gyp:webm -> becomes target libwebm
packager/third_party/libwebm/libwebm.gyp:libwebm -> becomes target libwebm
Solve this conflict by renaming libwebm.gyp:libwebm to mkvmuxer.
There is a target name conflict between packager/base/base.gyp:run_all_unittests and
media_test.gyp:run_all_unittests. Change to media_test.gyp:run_tests_with_atexit_manager to
resolve the conflict.
On Linux the generated ninja files use path/libbase.a as target name.
In the Mac ninja file the target is just libbase.a.
As we have two libbase.a (base/base.gyp and media/base/media_base.gyp) the linking stage fails to include both libs.
Solve by renaming media_base.gyp's base target to media_base
For WebM contents, it is possible that we may receive some NewSampleEvent
before receiving ParserInitEvent. This is because init event is fired
after analyzing a video block which could come after an audio block.
Also modified Flush() function to return a bool to indicate whether the
the flush is successful and whether the samples are handled correctly.
And added macro to ensure Flush() and Parse() results are handled.
Fixes#71
Change-Id: I2294d6f529f54e4578344916559bb1bc116c745a
Now outputs cenc:default_KID attributes on all ContentProtection
elements for non-MP4 streams. For MP4 streams, it will still output
the default ContentProtection element.
Closes#69
Change-Id: I38b24297aa3c2ccbcbde38b44279b56c37a388f7