다음을 통해 공유


Defining DirectX VA Device Classes

Use the example code in this section to define device classes for the deinterlace container device, ProcAmp control device, deinterlace mode device (for example, bob), and COPP device. These device classes contain declarations for member functions that comprise the ProcAmp Control DDI and Deinterlace DDI. These device class definitions can be declared in a driver-supplied header file.

Use the following example code to define each device type and a base class that applies to each device type:

// These enumerated types specify the DirectX VA device class.
enum DXVA_DeviceType {
    DXVA_DeviceContainer        = 0x0001,
    DXVA_DeviceDecoder          = 0x0002,
    DXVA_DeviceDeinterlacer     = 0x0003,
     DXVA_DeviceProcAmpControl   = 0x0004,
    DXVA_DeviceCOPP             = 0x0005
};
// Other DirectX VA device classes inherit from this base class, 
struct DXVA_DeviceBaseClass {
    GUID            m_DeviceGUID;
    DXVA_DeviceType m_DeviceType;

    DXVA_DeviceBaseClass(const GUID& guid, DXVA_DeviceType Type) :
        m_DeviceGUID(guid), m_DeviceType(Type)
    {}
};

The following topics contain example code that defines classes for the deinterlace container device, ProcAmp control device, deinterlace bob device, and COPP device:

Defining the Deinterlace Container Device Class

Defining the ProcAmp Control Device Class

Defining the Deinterlace Bob Device Class

Defining the COPP Device Class