MediaFrameSource MediaFrameSource MediaFrameSource MediaFrameSource MediaFrameSource Class


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

public : sealed class MediaFrameSource : IMediaFrameSource
struct winrt::Windows::Media::Capture::Frames::MediaFrameSource : IMediaFrameSource
public sealed class MediaFrameSource : IMediaFrameSource
Public NotInheritable Class MediaFrameSource Implements IMediaFrameSource
// This class does not provide a public constructor.
Windows 10 requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)


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.


Controller Controller Controller Controller Controller

Gets the MediaFrameSourceController for the MediaFrameSource.

CurrentFormat CurrentFormat CurrentFormat CurrentFormat CurrentFormat

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

Info Info Info Info Info

Gets the MediaFrameSourceInfo object that provides information about the MediaFrameSource.

SupportedFormats SupportedFormats SupportedFormats SupportedFormats SupportedFormats

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


SetFormatAsync(MediaFrameFormat) SetFormatAsync(MediaFrameFormat) SetFormatAsync(MediaFrameFormat) SetFormatAsync(MediaFrameFormat) SetFormatAsync(MediaFrameFormat)

Asynchronously sets the frame format of the MediaFrameSource.

TryGetCameraIntrinsics(MediaFrameFormat) TryGetCameraIntrinsics(MediaFrameFormat) TryGetCameraIntrinsics(MediaFrameFormat) TryGetCameraIntrinsics(MediaFrameFormat) TryGetCameraIntrinsics(MediaFrameFormat)

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


FormatChanged FormatChanged FormatChanged FormatChanged FormatChanged

Occurs when the current frame format of the MediaFrameSource changes.

See Also