Starting a Protected Video Session

This section applies only to Windows Server 2003 SP1 and later, and Windows XP SP2 and later.

To start a protected video session, the VMR should initiate operations on the DirectX VA COPP device in a specific order. If this order is not followed, the video miniport driver should return error code E_UNEXPECTED. The video miniport driver can determine that the correct operation order is followed by assigning a unique device-state constant to the COPP device when an operation is performed, and then by verifying the device-state constant before performing a subsequent operation.

To start the protected video session, calls should be made to the COPP device's functions in the following order:

  1. The COPPOpenVideoSession function to initialize the COPP device. Before returning, the driver should set the device-state constant to COPP_OPENED.

  2. The COPPGetCertificateLength function to retrieve the size, in bytes, of the certificate used by the graphics hardware. The driver should first verify that the device-state constant is currently set to COPP_OPENED. If it is not, the driver should return E_UNEXPECTED. Before returning, the driver should set the device-state constant to COPP_CERT_LENGTH_RETURNED.

  3. The COPPKeyExchange function to retrieve the digital certificate used by the graphics hardware. The driver should first verify that the device-state constant is currently set to COPP_CERT_LENGTH_RETURNED. If it is not, the driver should return E_UNEXPECTED. Before returning, the driver should set the device-state constant to COPP_KEY_EXCHANGED.

  4. The COPPSequenceStart function to set the video session to protected mode. The driver should first verify that the device-state constant is currently set to COPP_KEY_EXCHANGED. If it is not, the driver should return E_UNEXPECTED. Before returning, the driver should set the device-state constant to COPP_SESSION_ACTIVE to show that the video session is in the protected mode.

After the video session is set to protected mode, the video miniport driver can process COPP commands and requests for COPP status, and pass COPP status events.