VideoFrame.CreateWithDirect3D11Surface(IDirect3DSurface) VideoFrame.CreateWithDirect3D11Surface(IDirect3DSurface) VideoFrame.CreateWithDirect3D11Surface(IDirect3DSurface) VideoFrame.CreateWithDirect3D11Surface(IDirect3DSurface) VideoFrame.CreateWithDirect3D11Surface(IDirect3DSurface) Method

Definition

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

public : static VideoFrame CreateWithDirect3D11Surface(IDirect3DSurface surface)
static VideoFrame CreateWithDirect3D11Surface(IDirect3DSurface surface) const;
public static VideoFrame CreateWithDirect3D11Surface(IDirect3DSurface surface)
Public Shared Function CreateWithDirect3D11Surface(surface As IDirect3DSurface) As VideoFrame
var videoFrame = Windows.Media.VideoFrame.createWithDirect3D11Surface(surface);

Parameters

surface
IDirect3DSurface IDirect3DSurface IDirect3DSurface

The IDXGISurface in which the image data is stored.

Returns

Additional features and requirements

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

Remarks

If the surface parameter is null, an argument exception will occur. The supplied IDXGISurface must use one of the supported pixel formats. VideoFrame supports the formats corresponding to the following DirectXPixelFormat values:

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

All other formats are unsupported. If a surface with an unsupported format is specified, a COM exception will be thrown.