/******************************************************************** created: 2011/08/05 created: 5:8:2011 9:31 filename: .\libDXCap\datastru.h file path: .\libDXCap purpose: *********************************************************************/ #ifndef __LIBDXCAP_DATASTRU__20110805__ #define __LIBDXCAP_DATASTRU__20110805__ #include"..\VideocardCommonDefine.h" typedef void* device_handle; typedef void* image_handle; //static const long BrightnessDefault = 5000; //static const long ContrastDefault = 5000; //static const long SaturationDefault = 5000; //static const long HueDefault = 5000; //static const long SharpnessDefault = 4; #define MIN_BRIGHTNESS 0 #define MAX_BRIGHTNESS 10000 #define MIN_CONTRAST 0 #define MAX_CONTRAST 10000 #define MIN_SATURATION 0 #define MAX_SATURATION 10000 #define MIN_HUE 0 #define MAX_HUE 10000 #define MIN_SHARPNESS 0 #define MAX_SHARPNESS 7 //视频制式 //typedef enum //{ // VideoStandard_None = 0x00000000, // VideoStandard_NTSC_M = 0x00000001, // VideoStandard_NTSC_M_J = 0x00000002, // VideoStandard_NTSC_433 = 0x00000004, // VideoStandard_PAL_B = 0x00000010, // VideoStandard_PAL_D = 0x00000020, // VideoStandard_PAL_H = 0x00000080, // VideoStandard_PAL_I = 0x00000100, // VideoStandard_PAL_M = 0x00000200, // VideoStandard_PAL_N = 0x00000400, // VideoStandard_PAL_60 = 0x00000800, // VideoStandard_SECAM_B = 0x00001000, // VideoStandard_SECAM_D = 0x00002000, // VideoStandard_SECAM_G = 0x00004000, // VideoStandard_SECAM_H = 0x00008000, // VideoStandard_SECAM_K = 0x00010000, // VideoStandard_SECAM_K1 = 0x00020000, // VideoStandard_SECAM_L = 0x00040000, // VideoStandard_SECAM_L1 = 0x00080000, //} VideoStandard; //ERROR MEAASGE enum RETERRNO { RET_NOERROR = 0, /* no error */ RET_EXCEPTION, /* sdk exception error */ RET_ERR_INIT, /* do not initialize or initialize failed */ RET_INVALID_DEV, /* do not find valid media device */ RET_INVALID_CHANNEL, /* invalid channel */ RET_BAD_POINTER, /* invalid or Null pointer param */ RET_NO_MATCH, /* do not match the compatiple object */ RET_DX_FAILED, /* fail from direct show */ RET_INVALID_HANDLE, /* find null handle */ RET_INVALID_PARAM, /* invalid function param */ RET_GDI_ERROR, /* GDI error */ RET_IO_ERROR, /* common io read or write error */ RET_FAILED, /* common error */ RET_VIDFMT_ERROR, /* Video format selected do not support */ }; // 运行状态 enum {state_stopped, state_paused, state_running}; // 去隔行模式 enum {di_none, di_weave, di_blend, di_bob}; // 降噪模式 enum {dn_none, dn_b}; // 视频颜色空间 enum {cs_rgb24, cs_rgb32, cs_yuy2}; // 设备属性页 enum {attr_video, attr_audio, attr_encode}; // 设备信息 #define MAX_DEVICE_NAME 128 typedef struct _device_tag { unsigned idx; // 过滤器在枚举过程中的序号 TCHAR deviceName[MAX_DEVICE_NAME]; // 过滤器的名称 } DEVICE_TAG, *PDEVICE_TAG; // 录像通知 EXTERN_C const IID IID_ISaveNotify; /* // {BAE74021-AFEC-4336-8497-658ED4432F65} DEFINE_GUID(IID_ISaveNotify, 0xbae74021, 0xafec, 0x4336, 0x84, 0x97, 0x65, 0x8e, 0xd4, 0x43, 0x2f, 0x65); // */ class ISaveNotify : public IUnknown// 录像的事件通知 { public: virtual HRESULT foo() = 0; }; // isp接口 //EXTERN_C const IID IID_IispTask; /* /// {BC7DE54C-F483-4768-9CBA-3228D81600CD} DEFINE_GUID(IID_IispTask, 0xbc7de54c, 0xf483, 0x4768, 0x9c, 0xba, 0x32, 0x28, 0xd8, 0x16, 0x0, 0xcd); // */ //class IispTask : public IUnknown // 视频处理接口 //{ //public: // virtual HRESULT QueryAccept(/*AM_MEDIA_TYPE**/void* mt) = 0; // virtual HRESULT BeginIsp() = 0; // virtual HRESULT IspTask(/*IMediaSample**/void* pMS) = 0; // virtual HRESULT EndIsp() = 0; //}; EXTERN_C const IID IID_IispTask; class IispTask : public IUnknown { public: virtual /* [local][id] */ HRESULT STDMETHODCALLTYPE QueryAccept( void *mt) = 0; virtual /* [id] */ HRESULT STDMETHODCALLTYPE BeginIsp( void) = 0; virtual /* [local][id] */ HRESULT STDMETHODCALLTYPE IspTask( void *pMS) = 0; virtual /* [id] */ HRESULT STDMETHODCALLTYPE EndIsp( void) = 0; }; #endif // __LIBDXCAP_DATASTRU__20110805__