Udostępnij za pośrednictwem


MediaFrameSource.SetFormatAsync(MediaFrameFormat) Method

Definition

Asynchronously sets the frame format of the MediaFrameSource.

public:
 virtual IAsyncAction ^ SetFormatAsync(MediaFrameFormat ^ format) = SetFormatAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncAction SetFormatAsync(MediaFrameFormat const& format);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncAction SetFormatAsync(MediaFrameFormat format);
function setFormatAsync(format)
Public Function SetFormatAsync (format As MediaFrameFormat) As IAsyncAction

Parameters

format
MediaFrameFormat

The new frame format for the media frame source.

Returns

An asynchronous action.

Attributes

Remarks

This method is an alternative to MediaCapture.SetEncodingPropertiesAsync, but unlike SetEncodingPropertiesAsync, this method can be used with any stream, not just the color camera preview, record, and photo capture streams.

Get the list of supported frame formats for a media frame source by accessing the SupportedFormats property.

Get the current frame format of the media frame source by accessing the CurrentFormat property.

Applies to