Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IMFMediaEngine::TransferVideoFrame method

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


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


pDstSurf [in]

A pointer to the IUnknown interface of the destination surface.

pSrc [in]

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

pDst [in]

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

pBorderClr [in]

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.


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.


Minimum supported client

Windows 8 [desktop apps | UWP apps]

Minimum supported server

None supported

Minimum supported phone

Windows Phone 8



See also




© 2018 Microsoft