BufferMediaFrame BufferMediaFrame BufferMediaFrame BufferMediaFrame BufferMediaFrame Class

Definition

Represents a frame from a MediaFrameSource that provides data in an IBuffer.

public : sealed class BufferMediaFrame
struct winrt::Windows::Media::Capture::Frames::BufferMediaFrame
public sealed class BufferMediaFrame
Public NotInheritable Class BufferMediaFrame
// 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 accessing the BufferMediaFrame property of a MediaFrameReference object that was obtained from a media frame source. The BufferMediaFrame property of a MediaFrameReference will always be non-null. This is not true for other frame types, such as VideoMediaFrame, which will be null if the buffer doesn't contain 2D image data or contains data in an unknown format.

A BufferMediaFrame represents the 1D buffer. If the underlying sample returned by the pipeline contains non-consecutive data, the system uses IMFMediaBuffer.Lock to copy the 2D buffer into the 1D buffer. For this reason, it is recommended that you use BufferMediaFrame for arbitrary buffers, such as skeleton or body tracking data, but that you use VideoMediaFrame for 2D buffers to avoid extra copy operations.

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

Properties

Buffer Buffer Buffer Buffer Buffer

Gets the buffer that contains the data for the BufferMediaFrame.

FrameReference FrameReference FrameReference FrameReference FrameReference

Gets the MediaFrameReference wrapper object associated with the BufferMediaFrame, which provides access to format information and other properties of the media frame.

See also