IMFMediaEngine::TransferVideoFrame method

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

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.

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.

Windows Phone 8: This API is supported.

Requirements

Minimum supported client

Windows 8 [desktop apps | Windows Store apps]

Minimum supported server

None supported [desktop apps | Windows Store apps]

Header

Mfmediaengine.h

See also

IMFMediaEngine

 

 

Community Additions

ADD
Show:
© 2014 Microsoft