VideoMediaFrame VideoMediaFrame VideoMediaFrame VideoMediaFrame VideoMediaFrame Class

Definition

Represents a frame from a MediaFrameSource that provides data in a video frame represented by a IDirect3DSurface or SoftwareBitmap.

public : sealed class VideoMediaFrame : IVideoMediaFrame
struct winrt::Windows::Media::Capture::Frames::VideoMediaFrame : IVideoMediaFrame
public sealed class VideoMediaFrame : IVideoMediaFrame
Public NotInheritable Class VideoMediaFrame Implements IVideoMediaFrame
// 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 VideoMediaFrame property of a MediaFrameReference object that was obtained from a media frame source.

Important

If you access the SoftwareBitmap or Direct3DSurface objects provided by the VideoMediaFrame property of a MediaFrameReference, the system creates a strong reference to these objects, which means that they will not be disposed when you call Dispose on the containing MediaFrameReference. You must explicitly call the Dispose method of the SoftwareBitmap or Direct3DSurface directly for the objects to be immediately disposed. Otherwise, the garbage collector will eventually free the memory for these objects, but you can't know when this will occur, and if the number of allocated bitmaps or surfaces exceeds the maximum amount allowed by the system, the flow of new frames will stop.

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

Properties

CameraIntrinsics CameraIntrinsics CameraIntrinsics CameraIntrinsics CameraIntrinsics

Gets an object that describes the distortion model of the camera that generated the VideoMediaFrame.

DepthMediaFrame DepthMediaFrame DepthMediaFrame DepthMediaFrame DepthMediaFrame

Gets a DepthMediaFrame containing depth data for the VideoMediaFrame, if the frame contains depth data.

Direct3DSurface Direct3DSurface Direct3DSurface Direct3DSurface Direct3DSurface

Gets an IDirect3DSurface object containing the image data for the VideoMediaFrame.

FrameReference FrameReference FrameReference FrameReference FrameReference

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

InfraredMediaFrame InfraredMediaFrame InfraredMediaFrame InfraredMediaFrame InfraredMediaFrame

Gets an InfraredMediaFrame containing depth data for the VideoMediaFrame, if the frame contains infrared data.

SoftwareBitmap SoftwareBitmap SoftwareBitmap SoftwareBitmap SoftwareBitmap

Gets a SoftwareBitmap object containing the image data for the VideoMediaFrame.

VideoFormat VideoFormat VideoFormat VideoFormat VideoFormat

Gets an object describing the format of the VideoMediaFrame image data.

Methods

GetVideoFrame() GetVideoFrame() GetVideoFrame() GetVideoFrame() GetVideoFrame()

Creates a copy of the VideoMediaFrame as a VideoFrame object.

See Also