MediaSampleAttributeKeys Enumeration
Microsoft Silverlight will reach end of support after October 2021. Learn more.
This enumeration is used in a dictionary of attributes for media samples.
Namespace: System.Windows.Media
Assembly: System.Windows (in System.Windows.dll)
Syntax
'Declaration
Public Enumeration MediaSampleAttributeKeys
public enum MediaSampleAttributeKeys
Members
Member name | Description | |
---|---|---|
KeyFrameFlag | For video samples, the presence of this attribute indicates the sample is a key frame. For audio samples, the presence of this attribute indicates a discontinuity (Silverlight for Windows Phone only). | |
DRMInitializationVector | Provides data about the media sample that is needed to decrypt it. | |
FrameWidth | The width of the video frame. For more information, see the Remarks section. | |
FrameHeight | The height of the video frame. For more information, see the Remarks section. | |
DRMSubSampleMapping | Provides data about which portions of a media sample are encrypted. For more information, see the Remarks section. | |
DRMKeyIdentifier | Provides data about the key identifier to decrypt the media sample. For more information, see the Remarks section. | |
DRMAlgorithmID | Provides data about the algorithm to decrypt the media sample. For more information, see the Remarks section. |
Remarks
Values of this enumeration are used when calling a MediaStreamSample constructor, in order to populate IDictionary<TKey, TValue> with keyed values describing the media sample.
The following table contains additional information about the values of this enumeration.
Enumeration Value |
Additional Information |
---|---|
DRMAlgorithmID |
Provides data about the algorithm to decrypt the media sample. This attribute should be used in the following situations:
Valid values for the DRMAlgorithmID are:
"Aes128Ctr" should be set for traditional PlayReady content. "Unprotected" means the sample is not protected with any DRM system. |
DRMInitializationVector |
Provides data about the media sample that is needed to decrypt it. |
DRMKeyIdentifier |
Provides data about the key identifier to decrypt the media sample. This attribute should be used in the following situations:
The value of the DRMKeyIdentifier attribute should be set to the GUID.ToString for the KID GUID object whose license should correctly decrypt the sample. The format of the string is: "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx". |
DRMSubSampleMapping |
Provides data about which portions of a media sample are encrypted. This value is a B64 encoded array of one or more 32bit pairs. The first value in a pair is the length of encrypted data, the second is the length of clear (non-encrypted) data. If supplied, the array values must total to the length of the entire sample. If not supplied, any encryption is assumed to cover the entire sample, the length of encrypted data and clear data (not encrypted data) in an H264 media sample. This attribute is supported for H.264 on both Windows Phone and Silverlight 4 or later. |
FrameHeight |
The height of the video frame. If this attribute is not specified, the width of the sample is assumed to be the height value defined on the MediaStreamAttributeKeys passed into to the ReportOpenMediaCompleted method. |
FrameWidth |
The width of the video frame. If this attribute is not specified, the width of the sample is assumed to be the width value defined on the MediaStreamAttributeKeys passed into to the ReportOpenMediaCompleted method. |
KeyFrameFlag |
For video samples, the presence of this attribute indicates the sample is a key frame. Silverlight for Windows Phone For audio samples, the presence of this attribute indicates a discontinuity (Silverlight for Windows Phone only). |
Version Information
Silverlight
Supported in: 5, 4, 3
Silverlight for Windows Phone
Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
See Also