Starts a decoding operation to decode a video frame.
HRESULT DecoderBeginFrame( [in] ID3D11VideoDecoder *pDecoder, [in] ID3D11VideoDecoderOutputView *pView, [in] UINT ContentKeySize, [in] const void *pContentKey );
- pDecoder [in]
- 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.
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.
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.
Windows Phone 8: This API is supported.
Minimum supported client
|Windows 8 [desktop apps | Windows Store apps]|
Minimum supported server
|Windows Server 2012 [desktop apps | Windows Store apps]|