MediaFrameFormat MediaFrameFormat MediaFrameFormat MediaFrameFormat Class

Definition

Describes the format of a media frame obtained from a MediaFrameSource and represented by a MediaFrameReference.

public : sealed class MediaFrameFormat : IMediaFrameFormatpublic sealed class MediaFrameFormat : IMediaFrameFormatPublic NotInheritable Class MediaFrameFormat Implements IMediaFrameFormat// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Remarks

The MediaFrameSource class uses this object to specify the current format of the media frames it generates. Get the current format of a media frame source by accessing the CurrentFormat property. Set the current format of a media frame source by calling SetFormatAsync.

Get the format of a media frame represented by a MediaFrameReference by accessing the Format property.

Get the format of a video frame represented by a VideoMediaFrame by accessing the VideoFormat property and then using the returned object's MediaFrameFormat property.

Properties

FrameRate FrameRate FrameRate FrameRate

Gets the frame rate of the media frame.

public : MediaRatio FrameRate { get; }public MediaRatio FrameRate { get; }Public ReadOnly Property FrameRate As MediaRatio// You can use this property in JavaScript.
Value
MediaRatio MediaRatio MediaRatio MediaRatio

The frame rate, in frames per second.

Remarks

The frame rate is expressed as a ratio. For example, if the frame rate is 30 frames per second (fps), the ratio is 30/1. If the frame rate is 29.97 fps, the ratio is 30,000/1001.

MajorType MajorType MajorType MajorType

Gets a string identifying the major type of a media frame.

public : PlatForm::String MajorType { get; }public string MajorType { get; }Public ReadOnly Property MajorType As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

A string identifying the major type of a media frame.

Remarks

The value of this property is one of the following strings:

"audio"The frame contains audio data.
"video"The frame contains video data, which may represent color, depth, infrared, or other content.
"perception"The frame contains perception data such as skeletal or facial data.

Properties Properties Properties Properties

Gets a map of properties for the frame format.

public : IMapView<Guid, object> Properties { get; }public IReadOnlyDictionary<Guid, object> Properties { get; }Public ReadOnly Property Properties As IReadOnlyDictionary<Guid, object>// You can use this property in JavaScript.
Value
IMapView<PlatForm::Guid, PlatForm::Object> IReadOnlyDictionary<Guid, object> IReadOnlyDictionary<Guid, object> IReadOnlyDictionary<Guid, object>

A map of properties for the frame format.

Subtype Subtype Subtype Subtype

Gets a string identifying the subtype of a media frame.

public : PlatForm::String Subtype { get; }public string Subtype { get; }Public ReadOnly Property Subtype As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

A string identifying the subtype of a media frame.

Remarks

The value of this property is one of the strings defined by the properties of the MediaEncodingSubtypes class. If the friendly name for the subtype can't be found, the GUID for the subtype is returned in plain-text format.

VideoFormat VideoFormat VideoFormat VideoFormat

Gets an object describing the image format of a video media frame.

public : VideoMediaFrameFormat VideoFormat { get; }public VideoMediaFrameFormat VideoFormat { get; }Public ReadOnly Property VideoFormat As VideoMediaFrameFormat// You can use this property in JavaScript.
Value
VideoMediaFrameFormat VideoMediaFrameFormat VideoMediaFrameFormat VideoMediaFrameFormat

An object describing the image format of a video media frame.

Remarks

If a media frame does not contain video data, such as a BufferMediaFrame, this property is null.