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
- Add MuxerListener::OnEncryptionStart() for notifying that further
segments are encrypted.
b/29621230
Change-Id: I881b29d55baaf3d04e005a3b95d898071c3f272b
- 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
- 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
- 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
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
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
- 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
- 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