ISoftwareBitmapNativeFactory::CreateFromMF2DBuffer2 method (windows.graphics.imaging.interop.h)

Creates an ISoftwareBitmapNative from the provided IMF2DBuffer2.

Syntax

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

Parameters

[in] data

Type: IMF2DBuffer2*

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.

Note  The read-only access applies only to the Windows RuntimeSoftwareBitmap wrapper. Access to the underlying Media Foundation buffer is not restricted.
 

[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] riid

Type: REFIID

The IID of the ISoftwareBitmapNative 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

   
Target Platform Windows
Header windows.graphics.imaging.interop.h
Library Windows.graphics.imaging.interop.lib
DLL Windows.graphics.imaging.interop.dll

See also

ISoftwareBitmapNativeFactory