|
| | MediaSegment (int32_t sourceId=0, MediaSourceType type=MediaSourceType::UNKNOWN, int64_t timeStamp=0, int64_t duration=0) |
| | Default constructor.
|
| |
|
virtual | ~MediaSegment () |
| | Virtual destructor.
|
| |
| virtual std::unique_ptr< MediaSegment > | copy () const |
| | Makes a shallow copy of the segment.
|
| |
| int32_t | getId () const |
| | Return the source id.
|
| |
| MediaSourceType | getType () const |
| | The source type for the data.
|
| |
| const uint8_t * | getData () const |
| | Returns a pointer to the data.
|
| |
| uint32_t | getDataLength () const |
| | Returns a the data length.
|
| |
| int64_t | getTimeStamp () const |
| | Returns the time stamp.
|
| |
|
void | setTimeStamp (int64_t timeStamp) |
| | Sets the time stamp (value in nanoseconds).
|
| |
| int64_t | getDuration () const |
| | Returns the duration.
|
| |
| const std::vector< uint8_t > & | getExtraData () const |
| | Returns a pointer to the extra data.
|
| |
| bool | isEncrypted () const |
| | Indicates that the data is encrypted.
|
| |
| const int32_t | getMediaKeySessionId () const |
| | Returns the media key session id. Empty if unencrypted.
|
| |
| const std::vector< uint8_t > & | getKeyId () const |
| | Returns the key id. Empty if unencrypted.
|
| |
| const std::vector< uint8_t > & | getInitVector () const |
| | Returns the initialisation vector. Empty if unencrypted.
|
| |
| const std::vector< SubSamplePair > & | getSubSamples () const |
| | Returns the sub samples. Empty if unencrypted.
|
| |
| const uint32_t | getInitWithLast15 () const |
| | Returns the initWithLast15 value.
|
| |
| const SegmentAlignment | getSegmentAlignment () const |
| | Returns the segment alignment.
|
| |
| const std::shared_ptr< CodecData > & | getCodecData () const |
| | Gets the codec data.
|
| |
| const CipherMode & | getCipherMode () const |
| | Gets the cipher mode for common encryption.
|
| |
| const bool | getEncryptionPattern (uint32_t &crypt, uint32_t &skip) const |
| | Gets the crypt & skip byte block for pattern encryption.
|
| |
| std::optional< uint64_t > | getDisplayOffset () const |
| | Gets the display offset.
|
| |
| bool | setData (uint32_t dataLength, const uint8_t *data) |
| | Sets the segment data.
|
| |
| bool | setExtraData (const std::vector< uint8_t > &extraData) |
| | Sets the extra data.
|
| |
| void | setSegmentAlignment (const SegmentAlignment &alignment) |
| | Sets the segment alignment.
|
| |
| void | setCodecData (const std::shared_ptr< CodecData > &codecData) |
| | Sets new codec_data for the segment.
|
| |
| void | setEncrypted (bool encrypted) |
| | Sets the encrypted flag.
|
| |
| void | setMediaKeySessionId (int32_t mksId) |
| | Sets the media key session id.
|
| |
| void | setKeyId (const std::vector< uint8_t > &keyId) |
| | Sets the key id.
|
| |
| void | setInitVector (const std::vector< uint8_t > &initVector) |
| | Sets the encryption initialisation vector.
|
| |
| void | addSubSample (size_t numClearBytes, size_t numEncryptedBytes) |
| | Adds a sub-sample pair to the sub samples.
|
| |
| void | setInitWithLast15 (uint32_t initWithLast15) |
| | Sets initWithLast15 value.
|
| |
| void | setCipherMode (CipherMode cipherMode) |
| | Sets the cipher mode for common encryption.
|
| |
| void | setEncryptionPattern (uint32_t crypt, uint32_t skip) |
| | Sets the crypt & skip byte block for pattern encryption.
|
| |
| void | setDisplayOffset (uint64_t displayOffset) |
| | Sets the display offset.
|
| |
|
void | copy (const MediaSegment &other) |
| | Copies the data from other to this.
|
| |
|
|
int32_t | m_sourceId |
| | The source id.
|
| |
|
MediaSourceType | m_type |
| | The source type.
|
| |
|
const uint8_t * | m_data |
| | The data.
|
| |
|
uint32_t | m_dataLength |
| | The data length.
|
| |
|
int64_t | m_timeStamp |
| | The time stamp.
|
| |
|
int64_t | m_duration |
| | The duration.
|
| |
|
std::shared_ptr< CodecData > | m_codecData |
| | Additional data for decoder.
|
| |
|
std::vector< uint8_t > | m_extraData |
| | The data.
|
| |
|
bool | m_encrypted |
| | Indicates the data is encrypted.
|
| |
|
int32_t | m_mediaKeySessionId |
| | Key session ID to use for decryption - only required for Netflix.
|
| |
|
std::vector< uint8_t > | m_keyId |
| | The encryption key id.
|
| |
|
std::vector< uint8_t > | m_initVector |
| | The encryption key initialisation vector.
|
| |
|
std::vector< SubSamplePair > | m_subSamples |
| | The sub-sample pairs.
|
| |
|
uint32_t | m_initWithLast15 |
| | Whether decryption context needs to be initialized with last 15 bytes. Currently this only applies to PlayReady DRM.
|
| |
|
SegmentAlignment | m_alignment |
| | The alignment of media segment.
|
| |
|
CipherMode | m_cipherMode |
| | Cipher mode of the sample.
|
| |
|
uint32_t | m_crypt |
| | Crypt byte block value.
|
| |
|
uint32_t | m_skip |
| | Skip byte block value.
|
| |
|
bool | m_encryptionPatternSet |
| | Whether the encryption pattern has been set.
|
| |
|
std::optional< uint64_t > | m_displayOffset |
| | The offset in the source file of the beginning of the media segment.
|
| |
A class that represents a media segment.