MFSampleExtension_Encryption_SubSampleMappingSplit attribute
Sets the sub-sample mapping for the sample indicating the clear and encrypted bytes in the sample data.
Data type
BLOB
Remarks
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.
Examples
The following example shows how to set MFSampleExtension_Encryption_SubSampleMappingSplit.
// m_spSample is a IMFSample
// pdwSubSampleMap is a DWORD*
// dwSubSampleMapSize is a DWORD
m_spSample->SetBlob( MFSampleExtension_Encryption_SubSampleMappingSplit,
(BYTE*)pdwSubSampleMap,
dwSubSampleMapSize * sizeof(DWORD) );
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 8.1 [desktop apps | UWP apps] |
Minimum supported server |
Windows Server 2012 R2 [desktop apps | UWP apps] |
Header |
|
See also