IVideoFrameNativeFactory::CreateFromMFSample method (windows.media.core.interop.h)

Creates an IVideoFrameNative from the provided IMFSample.

Syntax

HRESULT CreateFromMFSample(
  IMFSample            *data,
  REFGUID              subtype,
  UINT32               width,
  UINT32               height,
  BOOL                 forceReadOnly,
  const MFVideoArea    *minDisplayAperture,
  IMFDXGIDeviceManager *device,
  REFIID               riid,
  LPVOID               *ppv
);

Parameters

data

Type: IMFSample*

The source buffer containing a two-dimensional surface, such as a video frame.

subtype

Type: REFGUID

A GUID specifying the video subtype of the source buffer.

width

Type: UINT32

The width of the source surface.

height

Type: UINT32

The height of the source surface.

forceReadOnly

Type: BOOL

A value indicating whether the created software bitmap is read-only.

minDisplayAperture

Type: const MFVideoArea*

The rectangular area within the surface that contains valid image data. Use NULL if the full frame is valid.

device

Type: IMFDXGIDeviceManager*

Pointer to the device associated with the image data.

riid

Type: REFIID

The IID of the IVideoFrameNative interface.

ppv

Type: LPVOID*

When this method returns successfully, contains the requested interface.

Return value

Type: HRESULT

Returns S_OK on successful completion.

Requirements

   
Target Platform Windows
Header windows.media.core.interop.h

See also

IVideoFrameNativeFactory