- 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