#ifndef _CAPSERVER_WDMCAP_HPP_ #define _CAPSERVER_WDMCAP_HPP_ #ifndef _COMMON_SMARTPOINTER_HPP_ #include #endif #ifndef _COMMON_BLOCK_HPP_ #include #endif #ifndef _COMMON_CONTROL_HPP_ #include #endif #ifndef _THREAD_EVENT_HPP_ #include #endif #ifndef _VIDCAP_BMPCAP_HPP_ #include #endif class WDMCap : private BmpCap { public: WDMCap(int deviceIndex=0); virtual ~WDMCap(); bool grabFrame(void); bool grabFrameNoStop(void); bool dialogVideoSource(void); bool isConnected(void)const; bool getDriverCaps(DriverCaps &someDriverCaps); bool getCaptureParams(CaptureParams &someCaptureParams); void setCaptureFileName(const String &strPathCaptureFile); const String &getCaptureFileName(void)const; protected: virtual void frameHandler(VIDEOHDR &videoHeader); private: enum{ControlID=100}; bool initialize(void); void showSettings(void); void message(const String &message); void message(const String &message,const String &arg); void message(const String &message,int arg); SmartPointer mControl; Block mDriverInfoBlock; Event mFrameEvent; DWORD mDriverIndex; DWORD mGrabTime; }; inline bool WDMCap::dialogVideoSource(void) { return BmpCap::dialogVideoSource(); } inline bool WDMCap::isConnected(void)const { return BmpCap::isConnected(); } inline bool WDMCap::getDriverCaps(DriverCaps &someDriverCaps) { return BmpCap::getDriverCaps(someDriverCaps); } inline bool WDMCap::getCaptureParams(CaptureParams &someCaptureParams) { return BmpCap::getCaptureParams(someCaptureParams); } inline void WDMCap::message(const String &message,int arg) { ::printf("%s=%d\n",message.str(),arg); } inline void WDMCap::message(const String &message,const String &arg) { ::printf("%s=%s\n",message.str(),arg.str()); } inline void WDMCap::message(const String &message) { ::printf("%s\n",message.str()); } #endif