Jaa


MediaFrameSource Class

Definition

Represents a source of media frames, such as a color or infrared camera.

public ref class MediaFrameSource sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class MediaFrameSource final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class MediaFrameSource
Public NotInheritable Class MediaFrameSource
Inheritance
Object Platform::Object IInspectable MediaFrameSource
Attributes

Windows requirements

Device family
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v3.0)

Remarks

To get an instance of MediaFrameSource, you must first initialize the MediaCapture object with a MediaFrameSourceGroup that includes your desired media frame source. You do this by setting the SourceGroup of the MediaCaptureInitializationSettings object you pass into MediaCapture.InitializeAsync. Next, use the MediaFrameSourceInfo.Id property associated with the desired frame source as the key in the MediaCapture object's FrameSources dictionary to get an instance of the MediaFrameSource object.

For how-to guidance on using MediaFrameSource to capture frames, see Process media frames with MediaFrameReader.

Properties

Controller

Gets the MediaFrameSourceController for the MediaFrameSource.

CurrentFormat

Gets a value indicating the current frame format of the MediaFrameSource.

Info

Gets the MediaFrameSourceInfo object that provides information about the MediaFrameSource.

SupportedFormats

Gets a read-only list of MediaFrameFormat objects representing the frame formats supported by the MediaFrameSource.

Methods

SetFormatAsync(MediaFrameFormat)

Asynchronously sets the frame format of the MediaFrameSource.

TryGetCameraIntrinsics(MediaFrameFormat)

Attempts to retrieve the media frame source's camera intrinsics, which describe a camera's distortion model, for the specified MediaFrameFormat.

Events

FormatChanged

Occurs when the current frame format of the MediaFrameSource changes.

Applies to

See also