#include <subsample_generator.h>
Parsing and generating encryption subsamples from bitstreams. Note that the class can be used to generate subsamples from both audio and video bitstreams according to relevant specifications. For example, for video streams, the most notable specifications are Common Encryption v3 spec [1] and Apple SAMPLE AES spec [2]; for audio streams, they are full sample encrypted except for Apple SAMPLE AES spec, which usually contains leading clear bytes. [1] https://www.iso.org/standard/68042.html [2] https://apple.co/2Noi43q
Definition at line 34 of file subsample_generator.h.
◆ SubsampleGenerator()
shaka::media::SubsampleGenerator::SubsampleGenerator |
( |
bool |
vp9_subsample_encryption | ) |
|
|
explicit |
- Parameters
-
vp9_subsample_encryption | determines if subsample encryption or full sample encryption is used for VP9. Only relevant for VP9 codec. |
Definition at line 123 of file subsample_generator.cc.
◆ GenerateSubsamples()
Status shaka::media::SubsampleGenerator::GenerateSubsamples |
( |
const uint8_t * |
frame, |
|
|
size_t |
frame_size, |
|
|
std::vector< SubsampleEntry > * |
subsamples |
|
) |
| |
|
virtual |
Generates subsamples from the bitstream. Note that all frames should be processed by this function even if it is not encrypted as the next (encrypted) frame may be dependent on the previous clear frames.
- Parameters
-
| frame | points to the start of the frame. |
| frame_size | is the size of the frame. |
[out] | subsamples | will contain the output subsamples on success. It will be empty if the frame should be full sample encrypted. |
- Returns
- OK on success, an error status otherwise.
Definition at line 213 of file subsample_generator.cc.
◆ Initialize()
Status shaka::media::SubsampleGenerator::Initialize |
( |
FourCC |
protection_scheme, |
|
|
const StreamInfo & |
stream_info |
|
) |
| |
|
virtual |
Initialize the generator.
- Parameters
-
protection_scheme | is the protection scheme to be used for the encryption. It is used to determine if the protected data should be block aligned. |
stream_info | contains stream information. |
- Returns
- OK on success, an error status otherwise.
Definition at line 128 of file subsample_generator.cc.
The documentation for this class was generated from the following files: