Delen via


MediaFrameReader Class

Definition

Provides access to frames from a MediaFrameSource and notification when a new frame arrives.

public ref class MediaFrameReader sealed : IClosable
/// [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 MediaFrameReader final : IClosable
[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 MediaFrameReader : System.IDisposable
Public NotInheritable Class MediaFrameReader
Implements IDisposable
Inheritance
Object Platform::Object IInspectable MediaFrameReader
Attributes
Implements

Windows requirements

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

Remarks

Get an instance of this class by calling CreateFrameReaderAsync on a MediaCapture object that has been initialized to use the desired media frame source.

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

Version history

Windows version SDK version Value added
1709 16299 AcquisitionMode

Properties

AcquisitionMode

Gets or sets a value that specifies the way that the system should manage frames acquired from a MediaFrameReader when a new frame arrives before the app has finished processing the previous frame.

Methods

Close()

Disposes of the object and associated resources.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

StartAsync()

Asynchronously starts the reading of frames from a MediaFrameSource.

StopAsync()

Asynchronously stops the reading of frames from a MediaFrameSource.

TryAcquireLatestFrame()

Attempts to obtain a MediaFrameReference object representing the latest frame from the MediaFrameSource.

Events

FrameArrived

Occurs when a new frame arrives from the media frame source associated with the MediaFrameReader.

Applies to

See also