Share via


MultiSourceMediaFrameReader Class

Definition

Provides access to time-correlated frames from multiple MediaFrameSource and provides notifications when new frames arrive. This is useful if you need to process frames from different sources, such as a depth camera and an rbg camera, and you need to make sure that the frames from each source were captured close to each other in time.

public ref class MultiSourceMediaFrameReader sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class MultiSourceMediaFrameReader final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class MultiSourceMediaFrameReader : System.IDisposable
Public NotInheritable Class MultiSourceMediaFrameReader
Implements IDisposable
Inheritance
Object Platform::Object IInspectable MultiSourceMediaFrameReader
Attributes
Implements

Windows requirements

Device family
Windows 10 Creators Update (introduced in 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v4.0)

Remarks

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

To read frames from one or more MediaFrameSource objects without time correlation between different sources, you can use MediaFrameReader.

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

Specifies the way that the system should manage frames acquired from a MultiSourceMediaFrameReader 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 time-corellated frames from one or more MediaFrameSource objects.

StopAsync()

Asynchronously stops the reading of time-corellated frames from one or more MediaFrameSource objects.

TryAcquireLatestFrame()

Attempts to obtain a MultiSourceMediaFrameReference object which provides access to the latest time-correlated frames from one or more MediaFrameSource objects.

Events

FrameArrived

Occurs when a new frame arrives from all of the media frame sources associated with the MultiSourceMediaFrameReader.

Applies to