Udostępnij za pośrednictwem


MediaFrameReader.AcquisitionMode Property

Definition

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.

public:
 property MediaFrameReaderAcquisitionMode AcquisitionMode { MediaFrameReaderAcquisitionMode get(); void set(MediaFrameReaderAcquisitionMode value); };
MediaFrameReaderAcquisitionMode AcquisitionMode();

void AcquisitionMode(MediaFrameReaderAcquisitionMode value);
public MediaFrameReaderAcquisitionMode AcquisitionMode { get; set; }
var mediaFrameReaderAcquisitionMode = mediaFrameReader.acquisitionMode;
mediaFrameReader.acquisitionMode = mediaFrameReaderAcquisitionMode;
Public Property AcquisitionMode As MediaFrameReaderAcquisitionMode

Property Value

A value that specifies the frame reader's acquisition mode.

Windows requirements

Device family
Windows 10 Fall Creators Update (introduced in 10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v5.0)

Remarks

If this property is set to Realtime, frames that arrive while the app's FrameArrived event handler is executing are dropped. This mode works well for scenarios where processing the most current frame is prioritized, such as real-time computer vision applications.

If this property is set to Buffered, frames that arrive while the app's FrameArrived event handler is executing are buffered in memory by the system. The FrameArrived event is raised for each buffered frame when the event handler for the previous frame has completed. This mode is intended for apps for which the sequence of frames is critical and for which dropped frames will break the scenario. Note that once the system's memory limit for buffered frames has been reached, no more frames will be acquired until the app processes buffered frames, freeing memory for the acquisition of additional frames.

Applies to

See also