Initial
This commit is contained in:
90
CapServer/WDMCap.hpp
Normal file
90
CapServer/WDMCap.hpp
Normal file
@@ -0,0 +1,90 @@
|
||||
#ifndef _CAPSERVER_WDMCAP_HPP_
|
||||
#define _CAPSERVER_WDMCAP_HPP_
|
||||
#ifndef _COMMON_SMARTPOINTER_HPP_
|
||||
#include <common/pointer.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_BLOCK_HPP_
|
||||
#include <common/block.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_CONTROL_HPP_
|
||||
#include <common/control.hpp>
|
||||
#endif
|
||||
#ifndef _THREAD_EVENT_HPP_
|
||||
#include <thread/event.hpp>
|
||||
#endif
|
||||
#ifndef _VIDCAP_BMPCAP_HPP_
|
||||
#include <VidCap/BmpCap.hpp>
|
||||
#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<Control> mControl;
|
||||
Block<DriverInfo> 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
|
||||
Reference in New Issue
Block a user