VideoFrame.CreateAsDirect3D11SurfaceBacked VideoFrame.CreateAsDirect3D11SurfaceBacked VideoFrame.CreateAsDirect3D11SurfaceBacked VideoFrame.CreateAsDirect3D11SurfaceBacked VideoFrame.CreateAsDirect3D11SurfaceBacked Method

Definition

Overloads

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.

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.

public : static VideoFrame CreateAsDirect3D11SurfaceBacked(DirectXPixelFormat format, int width, int height)
static VideoFrame CreateAsDirect3D11SurfaceBacked(DirectXPixelFormat format, int32_t width, int32_t height) const;
public static VideoFrame CreateAsDirect3D11SurfaceBacked(DirectXPixelFormat format, Int32 width, Int32 height)
Public Shared Function CreateAsDirect3D11SurfaceBacked(format As DirectXPixelFormat, width As Int32, height As Int32) As VideoFrame
var videoFrame = Windows.Media.VideoFrame.createAsDirect3D11SurfaceBacked(format, width, height);

Parameters

format
DirectXPixelFormat DirectXPixelFormat DirectXPixelFormat

A value from the DirectXPixelFormat enumeration, specifying the pixel format of the created VideoFrame. Not all pixel formats are supported. See the Remarks section for more information.

width
Int32 Int32 Int32

The width, in pixels, of the created VideoFrame.

height
Int32 Int32 Int32

The height, in pixels, of the created VideoFrame.

Returns

Additional features and requirements

Device family
Windows 10, version 1803 (introduced v10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v6)

Remarks

The following pixel formats, defined in the DirectXPixelFormat enumeration, are supported by VideoFrame.

  • DirectXPixelFormat_R16G16B16A16UIntNormalized
  • DirectXPixelFormat_R8G8B8A8UIntNormalized
  • DirectXPixelFormat_B8G8R8X8UIntNormalized
  • DirectXPixelFormat_B8G8R8A8UIntNormalized
  • DirectXPixelFormat_NV12
  • DirectXPixelFormat_P010
  • DirectXPixelFormat_Yuy2
  • DirectXPixelFormat_R16UIntNormalized
  • DirectXPixelFormat_R8UIntNormalized

All other formats are unsupported. Attempting to create a VideoFrame with an unsupported format will cause the method to fail with a COM exception.

The overload of this method, CreateAsDirect3D11SurfaceBacked, allows you to supply the IDirect3DDevice that is used to allocate the backing surface of the video frame.

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.

public : static VideoFrame CreateAsDirect3D11SurfaceBacked(DirectXPixelFormat format, int width, int height, IDirect3DDevice device)
static VideoFrame CreateAsDirect3D11SurfaceBacked(DirectXPixelFormat format, int32_t width, int32_t height, IDirect3DDevice device) const;
public static VideoFrame CreateAsDirect3D11SurfaceBacked(DirectXPixelFormat format, Int32 width, Int32 height, IDirect3DDevice device)
Public Shared Function CreateAsDirect3D11SurfaceBacked(format As DirectXPixelFormat, width As Int32, height As Int32, device As IDirect3DDevice) As VideoFrame
var videoFrame = Windows.Media.VideoFrame.createAsDirect3D11SurfaceBacked(format, width, height, device);

Parameters

format
DirectXPixelFormat DirectXPixelFormat DirectXPixelFormat

A value from the DirectXPixelFormat enumeration, specifying the pixel format of the created VideoFrame. Not all pixel formats are supported. See the Remarks section for more information.

width
Int32 Int32 Int32

The width, in pixels, of the created VideoFrame.

height
Int32 Int32 Int32

The height, in pixels, of the created VideoFrame.

device
IDirect3DDevice IDirect3DDevice IDirect3DDevice

An IDirect3DDevice that is used to allocate the backing surface of the video frame.

Returns

Additional features and requirements

Device family
Windows 10, version 1803 (introduced v10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v6)

Remarks

The following pixel formats, defined in the DirectXPixelFormat enumeration, are supported by VideoFrame.

  • DirectXPixelFormat_R16G16B16A16UIntNormalized
  • DirectXPixelFormat_R8G8B8A8UIntNormalized
  • DirectXPixelFormat_B8G8R8X8UIntNormalized
  • DirectXPixelFormat_B8G8R8A8UIntNormalized
  • DirectXPixelFormat_NV12
  • DirectXPixelFormat_P010
  • DirectXPixelFormat_Yuy2
  • DirectXPixelFormat_R16UIntNormalized
  • DirectXPixelFormat_R8UIntNormalized

All other formats are unsupported. Attempting to create a VideoFrame with an unsupported format will cause the method to fail with a COM exception.

If the device parameter is null, the IDXGISurface is allocated using the default Direct3D device.