Sdílet prostřednictvím


MediaCapture.CreateFrameReaderAsync Method

Definition

Overloads

CreateFrameReaderAsync(MediaFrameSource)

Creates a MediaFrameReader that is used to acquire frames from a MediaFrameSource.

CreateFrameReaderAsync(MediaFrameSource, String)

Creates a MediaFrameReader that is used to acquire frames with the specified media encoding subtype from a MediaFrameSource.

CreateFrameReaderAsync(MediaFrameSource, String, BitmapSize)

Creates a MediaFrameReader that is used to acquire frames with the specified media encoding subtype and size from a MediaFrameSource.

CreateFrameReaderAsync(MediaFrameSource)

Creates a MediaFrameReader that is used to acquire frames from a MediaFrameSource.

public:
 virtual IAsyncOperation<MediaFrameReader ^> ^ CreateFrameReaderAsync(MediaFrameSource ^ inputSource) = CreateFrameReaderAsync;
/// [Windows.Foundation.Metadata.Overload("CreateFrameReaderAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<MediaFrameReader> CreateFrameReaderAsync(MediaFrameSource const& inputSource);
[Windows.Foundation.Metadata.Overload("CreateFrameReaderAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<MediaFrameReader> CreateFrameReaderAsync(MediaFrameSource inputSource);
function createFrameReaderAsync(inputSource)
Public Function CreateFrameReaderAsync (inputSource As MediaFrameSource) As IAsyncOperation(Of MediaFrameReader)

Parameters

inputSource
MediaFrameSource

The media frame source from which the reader will acquire frames.

Returns

An asynchronous operation that returns a MediaFrameReader on completion.

Attributes

Windows requirements

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

Examples

A MediaFrameReader created with this overload of the CreateFrameReaderAsync method returns frames for which the data is stored in a constrained pool of memory. When this pool of memory has been filled, no more frames will be read until you manually free previously obtained frames by calling Close (or Dispose in C#). The other two overloads of this method, CreateFrameReaderAsync(Windows.Media.Capture.Frames.MediaFrameSource inputSource, System.String outputSubtype, Windows.Graphics.Imaging.BitmapSize outputSize) and CreateFrameReaderAsync(Windows.Media.Capture.Frames.MediaFrameSource inputSource, System.String outputSubtype), return copies of the original frame data and so they do not cause frame acquisition to halt when they are retained.

See also

Applies to

CreateFrameReaderAsync(MediaFrameSource, String)

Creates a MediaFrameReader that is used to acquire frames with the specified media encoding subtype from a MediaFrameSource.

public:
 virtual IAsyncOperation<MediaFrameReader ^> ^ CreateFrameReaderAsync(MediaFrameSource ^ inputSource, Platform::String ^ outputSubtype) = CreateFrameReaderAsync;
/// [Windows.Foundation.Metadata.Overload("CreateFrameReaderWithSubtypeAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<MediaFrameReader> CreateFrameReaderAsync(MediaFrameSource const& inputSource, winrt::hstring const& outputSubtype);
[Windows.Foundation.Metadata.Overload("CreateFrameReaderWithSubtypeAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<MediaFrameReader> CreateFrameReaderAsync(MediaFrameSource inputSource, string outputSubtype);
function createFrameReaderAsync(inputSource, outputSubtype)
Public Function CreateFrameReaderAsync (inputSource As MediaFrameSource, outputSubtype As String) As IAsyncOperation(Of MediaFrameReader)

Parameters

inputSource
MediaFrameSource

The media frame source from which the reader will acquire frames.

outputSubtype
String

Platform::String

winrt::hstring

A string specifying the requested media encoding subtype for the frames acquired by the frame reader. This value must be one of the strings defined by the properties of the MediaEncodingSubtypes class.

Returns

An asynchronous operation that returns a MediaFrameReader on completion.

Attributes

Windows requirements

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

See also

Applies to

CreateFrameReaderAsync(MediaFrameSource, String, BitmapSize)

Creates a MediaFrameReader that is used to acquire frames with the specified media encoding subtype and size from a MediaFrameSource.

public:
 virtual IAsyncOperation<MediaFrameReader ^> ^ CreateFrameReaderAsync(MediaFrameSource ^ inputSource, Platform::String ^ outputSubtype, BitmapSize outputSize) = CreateFrameReaderAsync;
/// [Windows.Foundation.Metadata.Overload("CreateFrameReaderWithSubtypeAndSizeAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<MediaFrameReader> CreateFrameReaderAsync(MediaFrameSource const& inputSource, winrt::hstring const& outputSubtype, BitmapSize const& outputSize);
[Windows.Foundation.Metadata.Overload("CreateFrameReaderWithSubtypeAndSizeAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<MediaFrameReader> CreateFrameReaderAsync(MediaFrameSource inputSource, string outputSubtype, BitmapSize outputSize);
function createFrameReaderAsync(inputSource, outputSubtype, outputSize)
Public Function CreateFrameReaderAsync (inputSource As MediaFrameSource, outputSubtype As String, outputSize As BitmapSize) As IAsyncOperation(Of MediaFrameReader)

Parameters

inputSource
MediaFrameSource

The media frame source from which the reader will acquire frames.

outputSubtype
String

Platform::String

winrt::hstring

A string specifying the requested media encoding subtype for the frames acquired by the frame reader. This value must be one of the strings defined by the properties of the MediaEncodingSubtypes class.

outputSize
BitmapSize

An object specifying the requested size for the frames acquired by the frame reader.

Returns

An asynchronous operation that returns a MediaFrameReader on completion.

Attributes

Windows requirements

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

See also

Applies to