MediaFrameReader MediaFrameReader MediaFrameReader MediaFrameReader MediaFrameReader Class

Definition

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

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

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.

Properties

AcquisitionMode AcquisitionMode AcquisitionMode AcquisitionMode 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() Close() Close() Close() Close()

Disposes of the object and associated resources.

Dispose() Dispose() Dispose() Dispose() Dispose()

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

StartAsync() StartAsync() StartAsync() StartAsync() StartAsync()

Asynchronously starts the reading of frames from a MediaFrameSource.

StopAsync() StopAsync() StopAsync() StopAsync() StopAsync()

Asynchronously stops the reading of frames from a MediaFrameSource.

TryAcquireLatestFrame() TryAcquireLatestFrame() TryAcquireLatestFrame() TryAcquireLatestFrame() TryAcquireLatestFrame()

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

Events

FrameArrived FrameArrived FrameArrived FrameArrived FrameArrived

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

See Also