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

Creates an IVideoFrameNative from the provided IMFSample.

Syntax

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

Parameters

[in] data

Type: IMFSample*

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

[in] subtype

Type: REFGUID

A GUID specifying the video subtype of the source buffer.

[in] width

Type: UINT32

The width of the source surface.

[in] height

Type: UINT32

The height of the source surface.

[in] forceReadOnly

Type: BOOL

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

[in, optional] minDisplayAperture

Type: const MFVideoArea*

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

[in, optional] device

Type: IMFDXGIDeviceManager*

Pointer to the device associated with the image data.

[in] riid

Type: REFIID

The IID of the IVideoFrameNative interface.

[out] ppv

Type: LPVOID*

When this method returns successfully, contains the requested interface.

Return value

Type: HRESULT

Returns S_OK on successful completion.

Requirements

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

See also

IVideoFrameNativeFactory