⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 capturefilter.cpp

📁 完整的基于Conxant平台的USB电视棒的WIN驱动程序。
💻 CPP
📖 第 1 页 / 共 4 页
字号:
        NULL,                                   // Relations
        NULL,                                   // SupportHandler
        sizeof(ULONG)                           // SerializedSize
    ),
    DEFINE_KSPROPERTY_ITEM
    (
        CXPOLARIS_GET_GPIO,
        CxPolarisDiagProp::getGPIO,	    			// GetSupported or Handler
        sizeof(CXPOLARIS_GPIO_STRUCT),		// MinProperty
        sizeof(CXPOLARIS_GPIO_STRUCT),		// MinData
        NULL,									// SetSupported or Handler
        NULL,									// Values
        0,                                      // RelationsCount
        NULL,                                   // Relations
        NULL,                                   // SupportHandler
        sizeof(ULONG)                           // SerializedSize
     )
};

const KSPROPERTY_ITEM g_ir_custom_properties[] =
{
    DEFINE_KSPROPERTY_ITEM
    (
        KSPROPERTY_IRCAPTURE_KEYSTROKES,
        IR_CustomProp::getKeystrokes,		        // GetSupported or Handler
        sizeof(KSPROPERTY_IRCAPTURE_KEYSTROKES_S),  // MinProperty
        sizeof(KSPROPERTY_IRCAPTURE_KEYSTROKES_S),	// MinData
        NULL, 	                                    // SetSupported or Handler
        NULL,									    // Values
        0,                                          // RelationsCount
        NULL,                                       // Relations
        NULL,                                       // SupportHandler
        sizeof(ULONG)                               // SerializedSize
    ),
    DEFINE_KSPROPERTY_ITEM
    (
        KSPROPERTY_IRCAPTURE_COMMAND,
        NULL,		                                // GetSupported or Handler
        sizeof(KSPROPERTY_IRCAPTURE_COMMAND_S),		// MinProperty
        sizeof(KSPROPERTY_IRCAPTURE_COMMAND_S),		// MinData
        IR_CustomProp::setCommand, 	                // SetSupported or Handler
        NULL,									    // Values
        0,                                          // RelationsCount
        NULL,                                       // Relations
        NULL,                                       // SupportHandler
        sizeof(ULONG)                               // SerializedSize
    ),
};

const KSPROPERTY_ITEM AnalogVideoDecoder[] =
{
    DEFINE_KSPROPERTY_ITEM
    (
        KSPROPERTY_VIDEODECODER_CAPS,
        CaptureFilter::getDecoderProp,          // GetSupported or Handler
        sizeof(KSPROPERTY_VIDEODECODER_CAPS_S), // MinProperty
        sizeof(KSPROPERTY_VIDEODECODER_CAPS_S), // MinData
        FALSE,                                  // SetSupported or Handler
        NULL,                                   // Values
        0,                                      // RelationsCount
        NULL,                                   // Relations
        NULL,                                   // SupportHandler
        0                                       // SerializedSize
    ),
    DEFINE_KSPROPERTY_ITEM
    (
        KSPROPERTY_VIDEODECODER_STANDARD,
        CaptureFilter::getDecoderProp,          // GetSupported or Handler
        sizeof(KSPROPERTY_VIDEODECODER_S),      // MinProperty
        sizeof(KSPROPERTY_VIDEODECODER_S),      // MinData
        CaptureFilter::setDecoderProp,          // SetSupported or Handler
        NULL,                                   // Values
        0,                                      // RelationsCount
        NULL,                                   // Relations
        NULL,                                   // SupportHandler
        0                                       // SerializedSize
    ),
    DEFINE_KSPROPERTY_ITEM
    (
        KSPROPERTY_VIDEODECODER_STATUS,
        CaptureFilter::getDecoderProp,           // GetSupported or Handler
        sizeof(KSPROPERTY_VIDEODECODER_STATUS_S),// MinProperty
        sizeof(KSPROPERTY_VIDEODECODER_STATUS_S),// MinData
        FALSE,                                  // SetSupported or Handler
        NULL,                                   // Values
        0,                                      // RelationsCount
        NULL,                                   // Relations
        NULL,                                   // SupportHandler
        0                                       // SerializedSize
    )
};
DEFINE_KSPROPERTY_TABLE(g_cxpolaris_control_properties)
{

	DEFINE_KSPROPERTY_ITEM
    (
        CXPOLARIS_CONTROL_EP1,
        CxPolarisControlProp::static_getEP1AltSetting,         // GetSupported or Handler
        sizeof(CXPOLARIS_ALT_SETTING),			            // MinProperty
        sizeof(CXPOLARIS_ALT_SETTING),			            // MinData
        CxPolarisControlProp::static_setEP1AltSetting,	                                        // SetSupported or Handler
        NULL,                                           // Values
        0,                                              // RelationsCount
        NULL,                                           // Relations
        NULL,                                           // SupportHandler
        0                                               // SerializedSize
    ),
    DEFINE_KSPROPERTY_ITEM
    (
        CXPOLARIS_CONTROL_EP2,
        CxPolarisControlProp::static_getEP2AltSetting,         // GetSupported or Handler
        sizeof(CXPOLARIS_ALT_SETTING),			            // MinProperty
        sizeof(CXPOLARIS_ALT_SETTING),			            // MinData
        CxPolarisControlProp::static_setEP2AltSetting,	                                        // SetSupported or Handler
        NULL,                                           // Values
        0,                                              // RelationsCount
        NULL,                                           // Relations
        NULL,                                           // SupportHandler
        0                                               // SerializedSize
    ),
    DEFINE_KSPROPERTY_ITEM
    (
        CXPOLARIS_CONTROL_EP3,
        CxPolarisControlProp::static_getEP3AltSetting,         // GetSupported or Handler
        sizeof(CXPOLARIS_ALT_SETTING_EP3),			            // MinProperty
        sizeof(CXPOLARIS_ALT_SETTING_EP3),			            // MinData
        CxPolarisControlProp::static_setEP3AltSetting,	                                        // SetSupported or Handler
        NULL,                                           // Values
        0,                                              // RelationsCount
        NULL,                                           // Relations
        NULL,                                           // SupportHandler
        0                                               // SerializedSize
    ),
    DEFINE_KSPROPERTY_ITEM
    (
        CXPOLARIS_CONTROL_EP4,
        CxPolarisControlProp::static_getEP4AltSetting,         // GetSupported or Handler
        sizeof(CXPOLARIS_ALT_SETTING),			            // MinProperty
        sizeof(CXPOLARIS_ALT_SETTING),			            // MinData
        CxPolarisControlProp::static_setEP4AltSetting,	                                        // SetSupported or Handler
        NULL,                                           // Values
        0,                                              // RelationsCount
        NULL,                                           // Relations
        NULL,                                           // SupportHandler
        0                                               // SerializedSize
    ),
    DEFINE_KSPROPERTY_ITEM
    (
        CXPOLARIS_CONTROL_EP5,
        CxPolarisControlProp::static_getEP5AltSetting,         // GetSupported or Handler
        sizeof(CXPOLARIS_ALT_SETTING),			            // MinProperty
        sizeof(CXPOLARIS_ALT_SETTING),			            // MinData
        CxPolarisControlProp::static_setEP5AltSetting,	                                        // SetSupported or Handler
        NULL,                                           // Values
        0,                                              // RelationsCount
        NULL,                                           // Relations
        NULL,                                           // SupportHandler
        0                                               // SerializedSize
    ),
    DEFINE_KSPROPERTY_ITEM
    (
        CXPOLARIS_CONTROL_EP6,
        CxPolarisControlProp::static_getEP6AltSetting,         // GetSupported or Handler
        sizeof(CXPOLARIS_ALT_SETTING),			            // MinProperty
        sizeof(CXPOLARIS_ALT_SETTING),			            // MinData
        CxPolarisControlProp::static_setEP6AltSetting,	                                        // SetSupported or Handler
        NULL,                                           // Values
        0,                                              // RelationsCount
        NULL,                                           // Relations
        NULL,                                           // SupportHandler
        0                                               // SerializedSize
    ),
    DEFINE_KSPROPERTY_ITEM
    (
        CXPOLARIS_CONTROL_EP15,
        CxPolarisControlProp::static_getEP15AltSetting,         // GetSupported or Handler
        sizeof(CXPOLARIS_ALT_SETTING),			            // MinProperty
        sizeof(CXPOLARIS_ALT_SETTING),			            // MinData
        CxPolarisControlProp::static_setEP15AltSetting,	                                        // SetSupported or Handler
        NULL,                                           // Values
        0,                                              // RelationsCount
        NULL,                                           // Relations
        NULL,                                           // SupportHandler
        0                                               // SerializedSize
    ),
    /*
    DEFINE_KSPROPERTY_ITEM
    (
        CXPOLARIS_CONTROL_TS1,
        CxPolarisControlProp::static_getTS1Mpeg,         // GetSupported or Handler
        sizeof(CXPOLARIS_MPEG_SOURCE),			            // MinProperty
        sizeof(CXPOLARIS_MPEG_SOURCE),			            // MinData
        CxPolarisControlProp::static_setTS1Mpeg,	                                        // SetSupported or Handler
        NULL,                                           // Values
        0,                                              // RelationsCount
        NULL,                                           // Relations
        NULL,                                           // SupportHandler
        0                                               // SerializedSize
    ),
    */
    DEFINE_KSPROPERTY_ITEM
    (
        CXPOLARIS_CONTROL_TS2,
        CxPolarisControlProp::static_getTS2Mpeg,         // GetSupported or Handler
        sizeof(CXPOLARIS_MPEG_SOURCE),			            // MinProperty
        sizeof(CXPOLARIS_MPEG_SOURCE),			            // MinData
        CxPolarisControlProp::static_setTS2Mpeg,	                                        // SetSupported or Handler
        NULL,                                           // Values
        0,                                              // RelationsCount
        NULL,                                           // Relations
        NULL,                                           // SupportHandler
        0                                               // SerializedSize
    )




};
DEFINE_KSPROPERTY_TABLE(g_cxpolaris_usb_config_properties)
{
	/*
	 *	USB configuration select
	 */
	 DEFINE_KSPROPERTY_ITEM
	 (
	 CXPOLARIS_USB_COFIG_CONTROL,// property ID
	 CxPolarisControlProp::static_getUsbConfiguraiton,         // GetSupported or Handler
	 sizeof(CXPOLARIS_USB_CONFIG),			            // MinProperty
	 sizeof(CXPOLARIS_USB_CONFIG),			            // MinData
	 CxPolarisControlProp::static_setUsbConfiguraiton,	                                        // SetSupported or Handler
	 NULL,                                           // Values
	 0,                                              // RelationsCount
	 NULL,                                           // Relations
	 NULL,                                           // SupportHandler
	 0                                               // SerializedSize
	 )

};

const KSPROPERTY_SET property_table[] =
{
    DEFINE_KSPROPERTY_SET
    (
        &PROPSETID_VIDCAP_VIDEOPROCAMP,
        SIZEOF_ARRAY(VideoProcAmpProperties),
        VideoProcAmpProperties,
        0,
        NULL
    ),
    DEFINE_KSPROPERTY_SET
    (
        &PROPSETID_VIDCAP_VIDEODECODER,
        SIZEOF_ARRAY(AnalogVideoDecoder),
        AnalogVideoDecoder,
        0,
        NULL
    ),
    DEFINE_KSPROPERTY_SET
    (
        &PROPSETID_CXPOLARIS_CONTROL_PROPERTIES,    //EP alt setting control
        SIZEOF_ARRAY(g_cxpolaris_control_properties),// PropertiesCount
        g_cxpolaris_control_properties,              // PropertyItems
        0,                                          // FastIoCount
        NULL                                        // FastIoTable
    ),   
    DEFINE_KSPROPERTY_SET
    (
        &PROPSETID_CXPOLARIS_DIAG_PROP,         //I2c and Polaris register control
        SIZEOF_ARRAY(g_cxpolaris_diag_properties),
        g_cxpolaris_diag_properties,
        0,
        NULL
    ),
    DEFINE_KSPROPERTY_SET
    (
        &PROPSETID_CXPOLARIS_CONTROL_USB_CONFIG_PROPERTIES, //Polaris config control
        SIZEOF_ARRAY(g_cxpolaris_usb_config_properties),// PropertiesCount
        g_cxpolaris_usb_config_properties,              // PropertyItems
        0,                                          // FastIoCount
        NULL                                        // FastIoTable
    ),
    DEFINE_KSPROPERTY_SET
    (
        &PROPSETID_CX_COPY_PROTECT,
        SIZEOF_ARRAY(g_cx_copy_protect_properties),
        g_cx_copy_protect_properties,
        0,
        NULL
    ),
    DEFINE_KSPROPERTY_SET
    (
        &KSPROPSETID_CopyProt,
        SIZEOF_ARRAY(g_cx_copyProt_mv_properties),
        g_cx_copyProt_mv_properties,
        0,
        NULL
    )
};

extern
const 
KSAUTOMATION_TABLE 
captureFilterAutomationTable =
{
    SIZEOF_ARRAY( property_table ),
    sizeof KSPROPERTY_ITEM,
    property_table,
    DEFINE_KSAUTOMATION_METHODS_NULL,
    DEFINE_KSAUTOMATION_EVENTS_NULL
};


const
KSFILTER_DISPATCH
captureFilterDispatch = 
{
    CaptureFilter::dispatchCreate,          // Filter Create
    CaptureFilter::dispatchClose,           // Filter Close
    NULL,                                   // Filter Process
    NULL                                    // Filter Reset
};


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -