Media Frame Class
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public ref class VideoMediaFrame sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)] /// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)] /// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)] class VideoMediaFrame final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)] [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)] [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)] public sealed class VideoMediaFrame
Public NotInheritable Class VideoMediaFrame
Object Platform::Object IInspectable VideoMediaFrame
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
Windows.Foundation.UniversalApiContract (introduced in v3.0)
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. In that same line of thought, if you have called (GetVideoFrame())[videomediaframe_getvideoframe_824740069.md], then the (VideoFrame)[../windows.media/videoframe.md] retrieved has a reference on the SoftwareBitmap or Direct3DSurface objects provided by the VideoMediaFrame and needs to be disposed of by calling manually its Dispose method to avoid blocking the fow of frames. If you intend to hold on to a VideoFrame retrieved via (GetVideoFrame())[videomediaframe_getvideoframe_824740069.md] for an extended period of time, it may be better to hold on to a copy of it instead.
Gets an object that describes the distortion model of the camera that generated the VideoMediaFrame.
Gets a SoftwareBitmap object containing the image data for the VideoMediaFrame.
Gets an object describing the format of the VideoMediaFrame image data.