VideoFrame VideoFrame VideoFrame VideoFrame VideoFrame Class

Definition

Represents a single frame of video data.

public : sealed class VideoFrame : IClosable, IMediaFrame, IVideoFrame
struct winrt::Windows::Media::VideoFrame : IClosable, IMediaFrame, IVideoFrame
public sealed class VideoFrame : IDisposable, IMediaFrame, IVideoFrame
Public NotInheritable Class VideoFrame Implements IDisposable, IMediaFrame, IVideoFrame
var videoFrame = new videoFrame(format, width, height);
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Constructors

VideoFrame(BitmapPixelFormat, Int32, Int32) VideoFrame(BitmapPixelFormat, Int32, Int32) VideoFrame(BitmapPixelFormat, Int32, Int32) VideoFrame(BitmapPixelFormat, Int32, Int32) VideoFrame(BitmapPixelFormat, Int32, Int32)

Initializes a new instance of the VideoFrame class.

VideoFrame(BitmapPixelFormat, Int32, Int32, BitmapAlphaMode) VideoFrame(BitmapPixelFormat, Int32, Int32, BitmapAlphaMode) VideoFrame(BitmapPixelFormat, Int32, Int32, BitmapAlphaMode) VideoFrame(BitmapPixelFormat, Int32, Int32, BitmapAlphaMode) VideoFrame(BitmapPixelFormat, Int32, Int32, BitmapAlphaMode)

Initializes a new instance of the VideoFrame class.

Properties

Direct3DSurface Direct3DSurface Direct3DSurface Direct3DSurface Direct3DSurface

Gets the IDirect3DSurface object containing the pixel data of the video frame, when one is present.

Duration Duration Duration Duration Duration

Gets or sets the duration of the video frame.

ExtendedProperties ExtendedProperties ExtendedProperties ExtendedProperties ExtendedProperties

Gets the extended property set which enables getting and setting properties on the media frame.

IsDiscontinuous IsDiscontinuous IsDiscontinuous IsDiscontinuous IsDiscontinuous

Gets or sets a value that indicates whether an video frame is the first frame after a gap in the stream.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly IsReadOnly

Gets a value indicating whether the video frame is read-only.

RelativeTime RelativeTime RelativeTime RelativeTime RelativeTime

Gets or sets the relative time of the frame within the video stream.

SoftwareBitmap SoftwareBitmap SoftwareBitmap SoftwareBitmap SoftwareBitmap

Gets the SoftwareBitmap object containing the pixel data of the video frame, when one is present.

SystemRelativeTime SystemRelativeTime SystemRelativeTime SystemRelativeTime SystemRelativeTime

Gets or sets a timestamp that is relative to the system and is correlatable across multiple media sources on the same device.

Type Type Type Type Type

Gets a string indicating the type of video data the video frame contains.

Methods

Close() Close() Close() Close() Close()

Disposes of the object and associated resources.

CopyToAsync(VideoFrame) CopyToAsync(VideoFrame) CopyToAsync(VideoFrame) CopyToAsync(VideoFrame) CopyToAsync(VideoFrame)

Copies the current VideoFrame into a provided VideoFrame object.

CopyToAsync(VideoFrame, IReference<BitmapBounds>, IReference<BitmapBounds>) CopyToAsync(VideoFrame, IReference<BitmapBounds>, IReference<BitmapBounds>) CopyToAsync(VideoFrame, IReference<BitmapBounds>, IReference<BitmapBounds>) CopyToAsync(VideoFrame, IReference<BitmapBounds>, IReference<BitmapBounds>) CopyToAsync(VideoFrame, IReference<BitmapBounds>, IReference<BitmapBounds>)

Copies the specified rectangle in the current VideoFrame into the specified rectangle of a provided VideoFrame object.

CreateAsDirect3D11SurfaceBacked(DirectXPixelFormat, Int32, Int32) CreateAsDirect3D11SurfaceBacked(DirectXPixelFormat, Int32, Int32) CreateAsDirect3D11SurfaceBacked(DirectXPixelFormat, Int32, Int32) CreateAsDirect3D11SurfaceBacked(DirectXPixelFormat, Int32, Int32) CreateAsDirect3D11SurfaceBacked(DirectXPixelFormat, Int32, Int32)

Creates a new instance of the VideoFrame class for which the image data is stored in an IDXGISurface allocated by the default Direct3D device.

CreateAsDirect3D11SurfaceBacked(DirectXPixelFormat, Int32, Int32, IDirect3DDevice) CreateAsDirect3D11SurfaceBacked(DirectXPixelFormat, Int32, Int32, IDirect3DDevice) CreateAsDirect3D11SurfaceBacked(DirectXPixelFormat, Int32, Int32, IDirect3DDevice) CreateAsDirect3D11SurfaceBacked(DirectXPixelFormat, Int32, Int32, IDirect3DDevice) CreateAsDirect3D11SurfaceBacked(DirectXPixelFormat, Int32, Int32, IDirect3DDevice)

Creates a new instance of the VideoFrame class for which the image data is stored in an IDXGISurface allocated by the supplied Direct3D device.

CreateWithDirect3D11Surface(IDirect3DSurface) CreateWithDirect3D11Surface(IDirect3DSurface) CreateWithDirect3D11Surface(IDirect3DSurface) CreateWithDirect3D11Surface(IDirect3DSurface) CreateWithDirect3D11Surface(IDirect3DSurface)

Creates a new instance of the VideoFrame class for which the image data is stored in the provided IDXGISurface.

CreateWithSoftwareBitmap(SoftwareBitmap) CreateWithSoftwareBitmap(SoftwareBitmap) CreateWithSoftwareBitmap(SoftwareBitmap) CreateWithSoftwareBitmap(SoftwareBitmap) CreateWithSoftwareBitmap(SoftwareBitmap)

Creates a new instance of the VideoFrame class from the provided SoftwareBitmap.

Dispose() Dispose() Dispose() Dispose() Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

See Also