Condividi tramite


Sample Functions for COPP

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

The sample COPP functions show how to implement COPP processing functionality. These sample functions map to the motion compensation callback functions defined in the DD_MOTIONCOMPCALLBACKS structure. You can implement each sample function and a corresponding COPP I/O control (IOCTL) request, and then use a motion-compensation code template and a video miniport driver template to complete the implementation. For more information, see Example Code for DirectX VA Devices.

COPP Sample Functions

The sample COPP functions in the following table are called by using the COPP device. For more information about the COPP device, see COPP Device Definition Template Code and Defining the COPP Device Class.

Member Function Description

COPPOpenVideoSession

Initializes the COPP device used for the current video session.

COPPGetCertificateLength

Retrieves the size, in bytes, of the certificate used by the graphics hardware.

COPPKeyExchange

Retrieves the digital certificate used by the graphics hardware.

COPPSequenceStart

Sets the current video session to protected mode.

COPPCommand

Sets the protection level on the physical connector associated with the COPP device.

COPPQueryStatus

Retrieves status on a protected video session that is associated with a COPP device.

COPPCloseVideoSession

Closes the COPP device object and instructs the driver to release hardware resources associated with the COPP device.

Mapping Sample Functions to DD_MOTIONCOMPCALLBACKS

The sample functions in this section map to the motion compensation callback functions by using a COPP IOCTL, as follows; that is, each sample function is called within its respective COPP IOCTL, and each COPP IOCTL is passed to the EngDeviceIoControl function within its respective motion-compensation callback function.

Function IOCTL DD_MOTIONCOMPCALLBACKS member

COPPOpenVideoSession

IOCTL_COPP_OpenDevice

CreateMoComp

COPPGetCertificateLength

IOCTL_COPP_GetCertificateLength

RenderMoComp

COPPKeyExchange

IOCTL_COPP_KeyExchange

RenderMoComp

COPPSequenceStart

IOCTL_COPP_StartSequence

RenderMoComp

COPPCommand

IOCTL_COPP_Command

RenderMoComp

COPPQueryStatus

IOCTL_COPP_Status

RenderMoComp

COPPCloseVideoSession

IOCTL_COPP_CloseDevice

DestroyMoComp