IMFMediaEngine::TransferVideoFrame method (mfmediaengine.h)

Copies the current video frame to a DXGI surface or WIC bitmap.

Syntax

HRESULT TransferVideoFrame(
  [in] IUnknown                    *pDstSurf,
  [in] const MFVideoNormalizedRect *pSrc,
  [in] const RECT                  *pDst,
  [in] const MFARGB                *pBorderClr
);

Parameters

[in] pDstSurf

A pointer to the IUnknown interface of the destination surface.

[in] pSrc

A pointer to an MFVideoNormalizedRect structure that specifies the source rectangle.

[in] pDst

A pointer to a RECT structure that specifies the destination rectangle.

[in] pBorderClr

A pointer to an MFARGB structure that specifies the border color.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

In frame-server mode, call this method to blit the video frame to a DXGI or WIC surface. The application can call this method at any time after the Media Engine loads a video resource. Typically, however, the application calls IMFMediaEngine::OnVideoStreamTick first, to determine whether a new frame is available. If OnVideoStreamTick returns S_OK, the application then calls TransferVideoFrame.

The Media Engine scales and letterboxes the video to fit the destination rectangle. It fills the letterbox area with the border color.

For protected content, call the IMFMediaEngineProtectedContent::TransferVideoFrame method instead of this method.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps | UWP apps]
Minimum supported server None supported
Target Platform Windows
Header mfmediaengine.h

See also

IMFMediaEngine