DirectX VPE Initialization
To enable VPE functionality, the driver must do the following:
- When DrvGetDirectDrawInfo is called, initialize the following members of the DDCORECAPS structure embedded in the DD_HALINFO structure to which the pHalInfo parameter points:
- Set the DDCAPS2_VIDEOPORT flag in dwCaps2 to indicate that the display hardware contains a hardware video port. The driver should also set any other hardware video-port-related DDCAPS2_Xxx flags to describe the VPE support that the device is capable of.
- Set dwMaxVideoPorts to the number of hardware video ports supported by the device.
- Initialize dwCurrVideoPorts to zero.
Implement a DdGetDriverInfo function and set the GetDriverInfo member of the DD_HALINFO structure to point to this function when DrvGetDirectDrawInfo is called. The driver's DdGetDriverInfo function must parse the GUID_VideoPortCallbacks and GUID_VideoPortCaps GUIDs.
When DdGetDriverInfo is called with the GUID_VideoPortCallbacks GUID, fill in a DD_VIDEOPORTCALLBACKS structure with the appropriate driver callbacks and flags set. These callbacks are listed in VPE Callback Functions. The driver must then copy this initialized structure into the DirectDraw-allocated buffer to which the lpvData member of the DD_GETDRIVERINFODATA structure points, and return the number of bytes written into the buffer in dwActualSize.
When DdGetDriverInfo is called with the GUID_VideoPortCaps GUID, fill in the array of DDVIDEOPORTCAPS structures with the capabilities of each hardware video port. Each hardware video port has an entry in the array, with hardware video port zero specified first, hardware video port one specified next, and so on. If the device supports only one hardware video port, there will only be one DDVIDEOPORTCAPS structure in the array. The driver must then copy this data to the DirectDraw-allocated buffer to which the lpvData member of the DD_GETDRIVERINFODATA structure points and return the number of bytes written into the buffer in dwActualSize.