Windows apps
Collapse the table of content
Expand the table of content
Information
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.

ID3D11VideoContext::DecoderBeginFrame method

Starts a decoding operation to decode a video frame.

Syntax


HRESULT DecoderBeginFrame(
  [in]       ID3D11VideoDecoder           *pDecoder,
  [in]       ID3D11VideoDecoderOutputView *pView,
  [in]       UINT                         ContentKeySize,
  [inconst void                         *pContentKey
);

Parameters

pDecoder [in]

A pointer to the ID3D11VideoDecoder interface. To get this pointer, call ID3D11VideoDevice::CreateVideoDecoder.

pView [in]

A pointer to the ID3D11VideoDecoderOutputView interface. This interface describes the resource that will receive the decoded frame. To get this pointer, call ID3D11VideoDevice::CreateVideoDecoderOutputView.

ContentKeySize [in]

The size of the content key that is specified in pContentKey. If pContentKey is NULL, set ContentKeySize to zero.

pContentKey [in]

An optional pointer to a content key that was used to encrypt the frame data. If no content key was used, set this parameter to NULL. If the caller provides a content key, the caller must use the session key to encrypt the content key.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. D3DERR_WASSTILLDRAWING or E_PENDING is returned if the harware is busy, in which case the decoder should try to make the call again.

Remarks

After this method is called, call ID3D11VideoContext::SubmitDecoderBuffers to perform decoding operations. When all decoding operations have been executed, call ID3D11VideoContext::DecoderEndFrame.

Each call to DecoderBeginFrame must have a matching call to DecoderEndFrame. In most cases you cannot nest DecoderBeginFrame calls, but some codecs, such as like VC-1, can have nested DecoderBeginFrame calls for special operations like post processing.

The following encryption scenarios are supported through the content key:

  • The decoder can choose to not encrypt every frame, for example it may only encrypt the I frames and not encrypt the P/B frames. In these scenario, the decoder will specify pContentKey = NULL and ContentKeySize = 0 for those frames that it does not encrypt.
  • The decoder can choose to encrypt the compressed buffers using the session key. In this scenario, the decoder will specify a content key containing all zeros.
  • The decoder can choose to encrypt the compressed buffers using a separate content key. In this scenario, the decoder will ECB encrypt the content key using the session key and pass the encrypted content key.

Requirements

Minimum supported client

Windows 8 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8

Header

D3d11.h

See also

ID3D11VideoContext

 

 

Show:
© 2017 Microsoft