Harlinn.Windows 0.1
|
#include <HWMFObjects.h>
Public Member Functions | |
void | GetSampleFlags (DWORD *sampleFlags) const |
DWORD | GetSampleFlags () const |
void | SetSampleFlags (DWORD sampleFlags) const |
void | GetSampleTime (LONGLONG *sampleTime) const |
TimeSpan | GetSampleTime () const |
void | SetSampleTime (LONGLONG sampleTime) const |
void | SetSampleTime (const TimeSpan &sampleTime) const |
void | GetSampleDuration (LONGLONG *sampleDuration) const |
TimeSpan | GetSampleDuration () const |
void | SetSampleDuration (LONGLONG sampleDuration) const |
void | SetSampleDuration (const TimeSpan &sampleDuration) const |
void | GetBufferCount (DWORD *bufferCount) const |
DWORD | GetBufferCount () const |
void | GetBufferByIndex (DWORD index, IMFMediaBuffer **buffer) const |
MFMediaBuffer | GetBufferByIndex (DWORD index) const |
void | ConvertToContiguousBuffer (IMFMediaBuffer **buffer) const |
MFMediaBuffer | ConvertToContiguousBuffer () const |
void | AddBuffer (IMFMediaBuffer *buffer) const |
void | AddBuffer (const MFMediaBuffer &buffer) const |
void | RemoveBufferByIndex (DWORD index) const |
void | RemoveAllBuffers () const |
void | GetTotalLength (DWORD *totalLength) const |
Retrieves the total length of the valid data in all of the buffers in the sample. The length is calculated as the sum of the values retrieved by the IMFMediaBuffer::GetCurrentLength method. | |
DWORD | GetTotalLength () const |
Retrieves the total length of the valid data in all of the buffers in the sample. The length is calculated as the sum of the values retrieved by the IMFMediaBuffer::GetCurrentLength method. | |
void | CopyToBuffer (IMFMediaBuffer *buffer) const |
void | CopyToBuffer (const MFMediaBuffer &buffer) const |
bool | Get3DVideo () const |
Specifies whether a media sample contains a 3D video frame. | |
void | Set3DVideo (bool value) const |
Specifies whether a media sample contains a 3D video frame. | |
MFVideo3DSampleFormat | Get3DVideoSampleFormat () const |
Specifies how a 3D video frame is stored in a media sample. | |
void | Set3DVideoSampleFormat (MFVideo3DSampleFormat video3DSampleFormat) const |
bool | GetBottomFieldFirst () const |
Specifies the field dominance for an interlaced video frame. This attribute applies to media samples. | |
void | SetBottomFieldFirst (bool value) const |
Media::CameraExtrinsics | GetCameraExtrinsics () const |
Retrieves the camera extrinsics for the sample. | |
void | SetCameraExtrinsics (const Media::CameraExtrinsics &cameraExtrinsics) |
MFAttributes | CaptureMetadata () const |
Retrives the MFAttributes store for all the metadata related to the capture pipeline. | |
bool | GetCleanPoint () const |
Indicates whether a sample is a random access point. | |
void | SetCleanPoint (bool value) const |
bool | IsKeyFrame () const |
Indicates whether a video sample is a key frame. | |
Guid | GetContentKeyId () const |
Retrieves the Key ID for the sample. | |
void | SetContentKeyId (const Guid &keyId) const |
Sets the Key ID for the sample. | |
bool | GetDerivedFromTopField () const |
Specifies whether a deinterlaced video frame was derived from the upper field or the lower field. | |
void | SetDerivedFromTopField (bool value) const |
Specifies whether a deinterlaced video frame was derived from the upper field or the lower field. | |
TimeSpan | GetDeviceTimestamp () const |
Retrieves the time stamp provided by the device driver. | |
void | SetDeviceTimestamp (UInt64 value) |
void | SetDeviceTimestamp (const TimeSpan &value) |
bool | GetDiscontinuity () const |
Specifies whether a media sample is the first sample after a gap in the stream. | |
void | SetDiscontinuity (bool value) const |
UInt32 | GetEncryptionCryptByteBlock () const |
Specifies the encrypted byte block size for sample-based pattern encryption. | |
void | SetEncryptionCryptByteBlock (UInt32 value) const |
Specifies the encrypted byte block size for sample-based pattern encryption. | |
MFSampleEncryptionProtectionScheme | GetEncryptionProtectionScheme () const |
Specifies the protection scheme for encrypted samples. | |
void | SetEncryptionProtectionScheme (MFSampleEncryptionProtectionScheme value) const |
Specifies the protection scheme for encrypted samples. | |
Media::BlobValue< Byte > | GetEncryptionSampleID () const |
Specifies the ID of an encrypted sample. | |
void | SetEncryptionSampleID (const Media::BlobValue< Byte > &value) const |
Specifies the ID of an encrypted sample. | |
UInt32 | GetEncryptionSkipByteBlock () const |
Specifies the clear (non-encrypted) byte block size for sample-based pattern encryption. | |
void | SetEncryptionSkipByteBlock (UInt32 value) const |
Specifies the clear (non-encrypted) byte block size for sample-based pattern encryption. | |
Media::EncryptionSubSampleMappingSplit | GetEncryptionSubSampleMappingSplit () const |
Retrieves the sub-sample mapping for the sample indicating the clear and encrypted bytes in the sample data. | |
void | SetEncryptionSubSampleMappingSplit (const Media::EncryptionSubSampleMappingSplit &value) |
Retrieves the sub-sample mapping for the sample indicating the clear and encrypted bytes in the sample data. | |
void | SetEncryptionSubSampleMappingSplit (const DWORD *values, size_t numberOfValues) |
bool | GetFrameCorruption () const |
Specifies whether a video frame is corrupted. | |
void | SetFrameCorruption (bool value) const |
Specifies whether a video frame is corrupted. | |
MFCollectionT< MFSample > | GetForwardedDecodeUnits () const |
Gets an object of type MFCollectionT<MFSample> containing MFSample objects which contain network abstraction layer units (NALUs) and Supplemental Enhancement Information (SEI) units forwarded by a decoder. | |
MF_CUSTOM_DECODE_UNIT_TYPE | GetForwardedDecodeUnitType () const |
Retrieves the type, NALU or SEI, of a unit attached to an MFSample in a MFSampleExtension_ForwardedDecodeUnits collection. | |
std::optional< bool > | GetInterlaced () const |
Indicates whether a video frame is interlaced or progressive. If true, the frame is interlaced. If false, the frame is progressive. If not set, the media type describes the interlacing. This attribute applies to media samples. | |
UInt32 | GetLongTermReferenceFrameInfo () const |
Specifies Long Term Reference (LTR) frame info and is returned on the output sample. | |
UInt32 | GetMeanAbsoluteDifference () const |
This attribute returns the mean absolute difference (MAD) across all macro-blocks in the Y plane. | |
Media::PacketCrossOffsets | GetPacketCrossOffsets () const |
Retrieves the offsets to the payload boundaries in a frame for protected samples. | |
void | SetPacketCrossOffsets (const Media::PacketCrossOffsets &value) |
Sets the offsets to the payload boundaries in a frame for protected samples. | |
void | SetPacketCrossOffsets (const DWORD *values, size_t numberOfValues) |
![]() | |
template<typename ReaderT > | |
void | Read (ReaderT &reader) const |
template<typename WriterT > | |
void | Write (WriterT &writer) |
bool | GetItem (const Guid &key, PROPVARIANT *value) const |
bool | GetItemType (const Guid &key, MF_ATTRIBUTE_TYPE *type) const |
bool | HasAttribute (const Guid &key) const |
MF_ATTRIBUTE_TYPE | GetItemType (const Guid &key) const |
void | CompareItem (const Guid &key, REFPROPVARIANT value, BOOL *result) const |
bool | CompareItem (const Guid &key, REFPROPVARIANT value) const |
void | Compare (IMFAttributes *other, MF_ATTRIBUTES_MATCH_TYPE matchType, BOOL *result) const |
void | Compare (const MFAttributes &other, MF_ATTRIBUTES_MATCH_TYPE matchType, BOOL *result) const |
bool | Compare (IMFAttributes *other, MF_ATTRIBUTES_MATCH_TYPE matchType) const |
bool | Compare (const MFAttributes &other, MF_ATTRIBUTES_MATCH_TYPE matchType) const |
bool | GetUINT32 (const Guid &key, UINT32 *value) const |
UINT32 | GetUINT32 (const Guid &key) const |
UINT32 | GetUINT32OrDefault (const Guid &key, UINT32 defaultValue=0) const |
bool | GetUINT64 (const Guid &key, UINT64 *value) const |
UINT64 | GetUINT64 (const Guid &key) const |
UINT64 | GetUINT64OrDefault (const Guid &key, UINT64 defaultValue=0) const |
bool | GetDouble (const Guid &key, double *value) const |
double | GetDouble (const Guid &key) const |
double | GetDoubleOrDefault (const Guid &key, double defaultValue=0.0) const |
bool | GetGUID (const Guid &key, Guid *value) const |
Guid | GetGUID (const Guid &key) const |
Guid | GetGUIDOrDefault (const Guid &key, const Guid &defaultValue=Guid()) const |
bool | GetStringLength (const Guid &key, UINT32 *length) const |
UINT32 | GetStringLength (const Guid &key) const |
bool | GetString (const Guid &key, LPWSTR buffer, UINT32 bufferSize, UINT32 *length=nullptr) const |
WideString | GetString (const Guid &key) const |
bool | GetAllocatedString (const Guid &key, LPWSTR *buffer, UINT32 *length) const |
bool | GetBlobSize (const Guid &key, UINT32 *blobSize) const |
UINT32 | GetBlobSize (const Guid &key) const |
bool | GetBlob (const Guid &key, UINT8 *buffer, UINT32 bufferSize, UINT32 *blobSize=nullptr) const |
template<typename T > | |
Media::BlobValue< T > | GetBlob (const Guid &key) const |
bool | GetAllocatedBlob (const Guid &key, UINT8 **buffer, UINT32 *blobSize) const |
bool | GetUnknown (const Guid &key, const Guid &riid, LPVOID *result) const |
template<typename T > requires std::is_base_of_v<Unknown,T> | |
T | GetUnknown (const Guid &key) const |
void | SetItem (const Guid &key, REFPROPVARIANT Value) const |
bool | DeleteItem (const Guid &key) const |
void | DeleteAllItems () const |
void | SetUINT32 (const Guid &key, UINT32 value) const |
void | SetUINT64 (const Guid &key, UINT64 value) const |
void | SetDouble (const Guid &key, double value) const |
void | SetGUID (const Guid &key, const Guid &value) const |
void | SetString (const Guid &key, LPCWSTR value) const |
void | SetString (const Guid &key, const WideString &value) const |
void | SetBlob (const Guid &key, const UINT8 *buffer, UINT32 bufferSize) const |
void | SetBlob (const Guid &key, const std::span< byte > &buffer) const |
void | SetBlob (const Guid &key, const std::vector< byte > &buffer) const |
template<typename T > | |
void | SetBlob (const Guid &key, const Media::BlobValue< T > &blob) const |
void | SetUnknown (const Guid &key, IUnknown *unknown) const |
void | LockStore () const |
void | lock () const |
void | UnlockStore () const |
void | unlock () const |
void | GetCount (UINT32 *result) const |
UInt32 | GetCount () const |
void | GetItemByIndex (UINT32 index, Guid *key, PROPVARIANT *value=nullptr) const |
Guid | GetItemKeyByIndex (UINT32 index) const |
void | CopyAllItems (IMFAttributes *destination) const |
void | CopyAllItems (const MFAttributes &destination) const |
![]() | |
constexpr | Unknown () noexcept |
Unknown (IUnknown *unknown, bool addref=false) noexcept | |
Unknown (REFIID iid, const Unknown &unknown, bool throwIfNoInterface=true) | |
Unknown (const Unknown &other) noexcept | |
Unknown (Unknown &&other) noexcept | |
~Unknown () noexcept | |
constexpr | operator bool () const noexcept |
Unknown & | operator= (const Unknown &other) noexcept |
Unknown & | operator= (Unknown &&other) noexcept |
void | swap (Unknown &other) noexcept |
void | ResetPtr (IUnknown *other=nullptr, bool addRef=false) noexcept |
Unknown & | operator= (nullptr_t) |
IUnknown * | Detach () |
template<typename T > requires std::is_base_of_v<Unknown, T > | |
T | As () const |
template<typename T > requires std::is_base_of_v<Unknown, T> | |
bool | Is () const noexcept |
template<typename T > requires std::is_base_of_v<IUnknown, T> | |
ComPtr< T > | As () const |
template<typename T > requires std::is_base_of_v<IUnknown, T> | |
bool | Is () const noexcept |
This function can be used to detect if an object supports a particular COM interface derived from IUnknown. | |
template<typename T = IUnknown> | |
T * | GetInterfacePointer () const noexcept |
bool | QueryInterface (REFIID riid, void **itf) const |
Queries a COM object for a pointer to one of its interface; identifying the interface by a reference to its interface identifier (IID). If the COM object implements the interface, then it returns a pointer to that interface after calling IUnknown::AddRef on it. | |
template<typename T > requires std::is_base_of_v<IUnknown, T> | |
bool | QueryInterface (T **itf) const |
constexpr bool | operator== (const Unknown &other) const noexcept |
constexpr bool | operator!= (const Unknown &other) const noexcept |
constexpr bool | operator== (const IUnknown *other) const noexcept |
constexpr bool | operator!= (const IUnknown *other) const noexcept |
Static Public Member Functions | |
static MFSample | Create () |
Creates an empty media sample. | |
static MFSample | Create (DWORD maxLength) |
Creates a media sample with a single buffer. | |
![]() | |
static MFAttributes | Create (UInt32 initialSize) |
static MFAttributes | Create (const Media::Attributes &attributes) |
![]() | |
template<typename T > requires std::is_base_of_v<Unknown, T> | |
static T | CoCreateInstanceFromClassId (const CLSID &clsid, DWORD classContext=CLSCTX_INPROC_SERVER) |
template<typename T > requires std::is_base_of_v<Unknown, T> | |
static T | CoCreateInstanceFromClassId (const wchar_t *clsid, DWORD classContext=CLSCTX_INPROC_SERVER) |
template<typename T > requires std::is_base_of_v<Unknown, T> | |
static T | CoCreateInstanceFromClassId (const WideString &clsid, DWORD classContext=CLSCTX_INPROC_SERVER) |
template<typename T > requires std::is_base_of_v<Unknown, T> | |
static T | CoCreateInstanceFromProgId (const wchar_t *progId, DWORD classContext=CLSCTX_INPROC_SERVER) |
template<typename T > requires std::is_base_of_v<Unknown, T> | |
static T | CoCreateInstanceFromProgId (const WideString &progId, DWORD classContext=CLSCTX_INPROC_SERVER) |
template<typename T > requires std::is_base_of_v<Unknown, T> | |
static T | CoCreateInstanceFromDll (const ModuleHandle &dll, const CLSID &clsid) |
Additional Inherited Members | |
![]() | |
typedef IUnknown | InterfaceType |
![]() | |
IUnknown * | unknown_ |
Represents a media sample, which is a container object for media data. For video, a sample typically contains one video frame. For audio data, a sample typically contains multiple audio samples, rather than a single sample of audio.
A media sample contains zero or more buffers. Each buffer manages a block of memory, and is represented by the MFMediaBuffer object. A sample can have multiple buffers. The buffers are kept in an ordered list and accessed by index value. It is also valid to have an empty sample with no buffers.
|
inline |
|
inline |
|
inline |
Retrives the MFAttributes store for all the metadata related to the capture pipeline.
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
Creates an empty media sample.
|
inlinestatic |
Creates a media sample with a single buffer.
|
inline |
Specifies whether a media sample contains a 3D video frame.
|
inline |
Specifies how a 3D video frame is stored in a media sample.
|
inline |
Specifies the field dominance for an interlaced video frame. This attribute applies to media samples.
If the video frame is interlaced and the sample contains two interleaved fields, this attribute indicates which field is displayed first. If true, the bottom field is first in time. If false, the top field is first.
If the frame is interlaced and the sample contains a single field, this attribute indicates which field the sample contains. If true, the sample contains the bottom field. If false, the sample contains the top field.
If the frame is progressive, this attribute describes how the fields should be ordered when the output is interlaced. If true, the bottom field should be output first. If false, the top field should be output first.
If this attribute not set, the media type describes the field dominance.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Retrieves the camera extrinsics for the sample.
|
inline |
Indicates whether a sample is a random access point.
This attribute applies to samples. If the attribute is true, the sample is a random access point and decoding can begin from this sample. Otherwise, the sample is not a random access point.
If this attribute is not set, the default value is FALSE.
|
inline |
Retrieves the Key ID for the sample.
|
inline |
Specifies whether a deinterlaced video frame was derived from the upper field or the lower field.
This attribute is valid for deinterlaced samples only. Set this attribute if the frame was deinterlaced by interpolating one of the fields.
If the value is TRUE, the lower field was interpolated from the upper field. If the value is FALSE, the upper field was interpolated from the lower field.
If the attribute is not set, the frame has not been deinterlaced. The frame is either a true progressive frame, or it is an interlaced frame.
This attribute is informational. A software deinterlacer could set this attribute. If this attribute is set, it provides a hint that you can recover the original field by dropping the interpolated scan lines. For example, if the attribute is TRUE, you can recover the original upper field by dropping the interpolated lower field.
|
inline |
Retrieves the time stamp provided by the device driver.
This attribute is set on media samples created by a media source for a capture device. This attribute's value is in the MFTIME domain, sharing an epoch with query performance counter (QPC) time and always expressed in 100ns units. This attribute is available for MFTs inserted into the capture pipeline.
|
inline |
Specifies whether a media sample is the first sample after a gap in the stream.
This attribute applies to media samples. If this attribute is true, it means there was a discontinuity in the stream and this sample is the first to appear after the gap.
|
inline |
Specifies the encrypted byte block size for sample-based pattern encryption.
The number of clear (non-encrypted) bytes in the subsample mapping block are specified in the MFSampleExtension_Encryption_SkipByteBlock attribute. If either of these attributes are not present or have a value of 0, it means that the sample data is not encrypted. Either both of these values must be non-zero, positive values, or both must have a value of zero.
In cases where the Source is MP4-based, the value is set based off the values of default_crypt_byte_block within the track encryption box (‘tenc’) in the MP4 header.
|
inline |
Specifies the protection scheme for encrypted samples.
The value of this attribute is a member of the MFSampleEncryptionProtectionScheme enumeration. In cases where the media source is MP4-based, the value is set based off the value of the scheme_type field within the scheme type box (‘schm’) in the MP4 header (‘moov’ or ‘moof’).
If the scheme_type field in an MP4-based file, or stream, is set to ‘cenc’ or ‘cbc1’, then the MFSampleExtension_Encryption_ProtectionScheme attribute should be set to PROTECTION_SCHEME_AES_CTR or PROTECTION_SCHEME_CBC, respectively, and no values should be set for MFSampleExtension_Encryption_CryptByteBlock and MFSampleExtension_Encryption_SkipByteBlock.
If the scheme_type field in an MP4-based file, or stream, is set to ‘cens’ or ‘cbcs’, then the MFSampleExtension_Encryption_ProtectionScheme attribute should be set to PROTECTION_SCHEME_AES_CTR or PROTECTION_SCHEME_CBC, respectively, and MFSampleExtension_Encryption_CryptByteBlock and MFSampleExtension_Encryption_SkipByteBlock must be set using the values in the ‘tenc’ box.
|
inline |
Specifies the ID of an encrypted sample.
|
inline |
Specifies the clear (non-encrypted) byte block size for sample-based pattern encryption.
The number of encrypted bytes in the subsample mapping block are specified in the MFSampleExtension_Encryption_CryptByteBlock attribute. If either of these attributes are not present or have a value of 0, it means that the sample data is not encrypted. Either both of these values must be non-zero, positive values, or both must have a value of zero.
In cases where the Source is MP4-based, the value is set based off the values of default_skip_byte_block within the track encryption box (‘tenc’) in the MP4 header.
|
inline |
Retrieves the sub-sample mapping for the sample indicating the clear and encrypted bytes in the sample data.
The BLOB should contain an array of byte ranges as DWORDs where every two DWORDs makes a set. The first DWORD in each set is the number of clear bytes and the second DWORD of the set is the number of encrypted bytes. Note that a pair of 0s is not a valid set (either value can be 0, but not both). The array of byte ranges indicate which ranges to decrypt, including the possibility that the entire sample should not be decrypted. It is recommended that this should not be set on clear samples, though it is possible to achieve the same result by setting it with the appropriate values.
|
inline |
Gets an object of type MFCollectionT<MFSample> containing MFSample objects which contain network abstraction layer units (NALUs) and Supplemental Enhancement Information (SEI) units forwarded by a decoder.
|
inline |
Retrieves the type, NALU or SEI, of a unit attached to an MFSample in a MFSampleExtension_ForwardedDecodeUnits collection.
|
inline |
Specifies whether a video frame is corrupted.
A video decoder can set this attribute on its output samples. If the value is 1, the decoder detected data corruption in the frame. If the value is 0, there is no data corruption, or none was detected.
|
inline |
Indicates whether a video frame is interlaced or progressive. If true, the frame is interlaced. If false, the frame is progressive. If not set, the media type describes the interlacing. This attribute applies to media samples.
|
inline |
Specifies Long Term Reference (LTR) frame info and is returned on the output sample.
H.264/AVC encoders:
Encoders shall return this attribute on the output sample when the application controls LTR frames, which is specified by CODECAPI_AVEncVideoLTRBufferControl.
MFSampleExtension_LongTermReferenceFrameInfo returns up to two fields.
The first field, bits[0..15], is LongTermFrameIdx associated with the output frame if it is marked as a LTR frame. The first value is 0xffff, if this output frame is a short term reference frame or a non-reference frame.
The second field, bits[16..31], is a bitmap consisting of MaxNumLTRFrames many bits that indicate which LTR frame(s) were used for encoding this output frame, starting from bit 16. The rest of bits shall be set to 0. The second value is 0 if this output frame is not encoded using any LTR frames. MaxNumLTRFrames is the maximum number of LTR frames set through CODECAPI_AVEncVideoLTRBufferControl.
|
inline |
This attribute returns the mean absolute difference (MAD) across all macro-blocks in the Y plane.
Application can request encoder to set this attribute on output samples by using CODECAPI_AVEncVideoMeanAbsoluteDifference.
|
inline |
Retrieves the offsets to the payload boundaries in a frame for protected samples.
This attribute applies to media samples protected by Windows Media Digital Rights Management (DRM). The value of the attribute is an array of DWORDs. Each entry in the array is the offset of a payload boundary, relative to the start of the frame. An application can use these values when decrypting and reconstructing the frames.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Retrieves the total length of the valid data in all of the buffers in the sample. The length is calculated as the sum of the values retrieved by the IMFMediaBuffer::GetCurrentLength method.
|
inline |
Retrieves the total length of the valid data in all of the buffers in the sample. The length is calculated as the sum of the values retrieved by the IMFMediaBuffer::GetCurrentLength method.
totalLength | Receives the total length of the valid data, in bytes. |
|
inline |
Indicates whether a video sample is a key frame.
|
inline |
|
inline |
|
inline |
Specifies whether a media sample contains a 3D video frame.
value | Set to true to indicate that this is a video frame that has two or more stereoscopic views. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Sets the Key ID for the sample.
keyId | the Key ID for the sample |
|
inline |
Specifies whether a deinterlaced video frame was derived from the upper field or the lower field.
This attribute is valid for deinterlaced samples only. Set this attribute if the frame was deinterlaced by interpolating one of the fields.
If the value is TRUE, the lower field was interpolated from the upper field. If the value is FALSE, the upper field was interpolated from the lower field.
If the attribute is not set, the frame has not been deinterlaced. The frame is either a true progressive frame, or it is an interlaced frame.
This attribute is informational. A software deinterlacer could set this attribute. If this attribute is set, it provides a hint that you can recover the original field by dropping the interpolated scan lines. For example, if the attribute is TRUE, you can recover the original upper field by dropping the interpolated lower field.
|
inline |
|
inline |
|
inline |
|
inline |
Specifies the encrypted byte block size for sample-based pattern encryption.
The number of clear (non-encrypted) bytes in the subsample mapping block are specified in the MFSampleExtension_Encryption_SkipByteBlock attribute. If either of these attributes are not present or have a value of 0, it means that the sample data is not encrypted. Either both of these values must be non-zero, positive values, or both must have a value of zero.
In cases where the Source is MP4-based, the value is set based off the values of default_crypt_byte_block within the track encryption box (‘tenc’) in the MP4 header.
|
inline |
Specifies the protection scheme for encrypted samples.
The value of this attribute is a member of the MFSampleEncryptionProtectionScheme enumeration. In cases where the media source is MP4-based, the value is set based off the value of the scheme_type field within the scheme type box (‘schm’) in the MP4 header (‘moov’ or ‘moof’).
If the scheme_type field in an MP4-based file, or stream, is set to ‘cenc’ or ‘cbc1’, then the MFSampleExtension_Encryption_ProtectionScheme attribute should be set to PROTECTION_SCHEME_AES_CTR or PROTECTION_SCHEME_CBC, respectively, and no values should be set for MFSampleExtension_Encryption_CryptByteBlock and MFSampleExtension_Encryption_SkipByteBlock.
If the scheme_type field in an MP4-based file, or stream, is set to ‘cens’ or ‘cbcs’, then the MFSampleExtension_Encryption_ProtectionScheme attribute should be set to PROTECTION_SCHEME_AES_CTR or PROTECTION_SCHEME_CBC, respectively, and MFSampleExtension_Encryption_CryptByteBlock and MFSampleExtension_Encryption_SkipByteBlock must be set using the values in the ‘tenc’ box.
|
inline |
Specifies the ID of an encrypted sample.
|
inline |
Specifies the clear (non-encrypted) byte block size for sample-based pattern encryption.
The number of encrypted bytes in the subsample mapping block are specified in the MFSampleExtension_Encryption_CryptByteBlock attribute. If either of these attributes are not present or have a value of 0, it means that the sample data is not encrypted. Either both of these values must be non-zero, positive values, or both must have a value of zero.
In cases where the Source is MP4-based, the value is set based off the values of default_skip_byte_block within the track encryption box (‘tenc’) in the MP4 header.
|
inline |
|
inline |
Retrieves the sub-sample mapping for the sample indicating the clear and encrypted bytes in the sample data.
The BLOB should contain an array of byte ranges as DWORDs where every two DWORDs makes a set. The first DWORD in each set is the number of clear bytes and the second DWORD of the set is the number of encrypted bytes. Note that a pair of 0s is not a valid set (either value can be 0, but not both). The array of byte ranges indicate which ranges to decrypt, including the possibility that the entire sample should not be decrypted. It is recommended that this should not be set on clear samples, though it is possible to achieve the same result by setting it with the appropriate values.
|
inline |
Specifies whether a video frame is corrupted.
A video decoder can set this attribute on its output samples. If the value is 1, the decoder detected data corruption in the frame. If the value is 0, there is no data corruption, or none was detected.
|
inline |
|
inline |
Sets the offsets to the payload boundaries in a frame for protected samples.
This attribute applies to media samples protected by Windows Media Digital Rights Management (DRM). The value of the attribute is an array of DWORDs. Each entry in the array is the offset of a payload boundary, relative to the start of the frame. An application can use these values when decrypting and reconstructing the frames.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |