ID3D11VideoDevice1::GetCryptoSessionPrivateDataSize method (d3d11_1.h)

Retrieves optional sizes for private driver data.

Syntax

HRESULT GetCryptoSessionPrivateDataSize(
  [in]           const GUID *pCryptoType,
  [in, optional] const GUID *pDecoderProfile,
  [in]           const GUID *pKeyExchangeType,
  [out]          UINT       *pPrivateInputSize,
  [out]          UINT       *pPrivateOutputSize
);

Parameters

[in] pCryptoType

Type: const GUID*

Indicates the crypto type for which the private input and output size is queried.

[in, optional] pDecoderProfile

Type: const GUID*

Indicates the decoder profile for which the private input and output size is queried.

[in] pKeyExchangeType

Type: const GUID*

Indicates the key exchange type for which the private input and output size is queried.

[out] pPrivateInputSize

Type: UINT*

Returns the size of private data that the driver needs for input commands.

[out] pPrivateOutputSize

Type: UINT*

Returns the size of private data that the driver needs for output commands.

Return value

Type: HRESULT

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

Remarks

When pKeyExchangeType is D3D11_KEY_EXCHANGE_HW_PROTECTION, the following behavior is expected in the ID3D11VideoContext::NegotiateCryptoSessionKeyExchange method:

  • The DataSize parameter is set to the size of the D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA structure.
  • pData points to a D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA structure.
    • The pInputData of this structure points to a D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA structure where:
      • pbInput[0] – pbInput[N-1] contains memory reserved for use by the driver. The number of bytes (N) reserved for the driver is determined by the pPrivateInputSize value returned by the ID3D11VideoDevice1::GetCryptoSessionPrivateDataSize function.
      • pbInput[N] contains the first byte of the DRM command packet.
    • The pOutputData of this structure points to a D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA structure where:
      • pbOutput[0] – pbOutput[N-1] contains memory reserved for use by the driver. The number of bytes (N) reserved for the driver is determined by the pPrivateOutputSize value returned by the ID3D11VideoDevice1::GetCryptoSessionPrivateDataSize function.
      • pbOutput[N] contains the first byte of the DRM command packet.

Requirements

Requirement Value
Minimum supported client Windows 10 [desktop apps only]
Minimum supported server Windows Server 2016 [desktop apps only]
Target Platform Windows
Header d3d11_1.h

See also

ID3D11VideoDevice1