272 lines
6.2 KiB
C++
272 lines
6.2 KiB
C++
#ifndef _VIDCAP_DRVCAPS_HPP_
|
|
#define _VIDCAP_DRVCAPS_HPP_
|
|
#include <common/vfw.hpp>
|
|
|
|
class DriverCaps : private CAPDRIVERCAPS
|
|
{
|
|
public:
|
|
DriverCaps(void);
|
|
DriverCaps(const DriverCaps &someDriverCaps);
|
|
DriverCaps(const CAPDRIVERCAPS &someCAPDRIVERCAPS);
|
|
virtual ~DriverCaps(void);
|
|
DriverCaps &operator=(const DriverCaps &someDriverCaps);
|
|
DriverCaps &operator=(const CAPDRIVERCAPS &someCAPDRIVERCAPS);
|
|
WORD operator==(const DriverCaps &someDriverCaps)const;
|
|
WORD operator==(const CAPDRIVERCAPS &someCAPDRIVERCAPS)const;
|
|
WORD deviceIndex(void)const;
|
|
void deviceIndex(WORD deviceIndex);
|
|
WORD hasOverlay(void)const;
|
|
void hasOverlay(WORD hasOverlay);
|
|
WORD hasDlgVideoSource(void)const;
|
|
void hasDlgVideoSource(WORD hasDlgVideoSource);
|
|
WORD hasDlgVideoFormat(void)const;
|
|
void hasDlgVideoFormat(WORD hasDlgVideoFormat);
|
|
WORD hasDlgVideoDisplay(void)const;
|
|
void hasDlgVideoDisplay(WORD hasDlgVideoDisplay);
|
|
WORD captureInitialized(void)const;
|
|
void captureInitialized(WORD captureInitialized);
|
|
WORD driverSuppliesPalettes(void)const;
|
|
void driverSuppliesPalettes(WORD driverSuppliesPalettes);
|
|
HANDLE videoIn(void)const;
|
|
void videoIn(HANDLE videoIn);
|
|
HANDLE videoOut(void)const;
|
|
void videoOut(HANDLE videoOut);
|
|
HANDLE videoExtIn(void)const;
|
|
void videoExtIn(HANDLE videoExtIn);
|
|
HANDLE videoExtOut(void)const;
|
|
void videoExtOut(HANDLE videoExtOut);
|
|
private:
|
|
void setZero(void);
|
|
};
|
|
|
|
inline
|
|
DriverCaps::DriverCaps(void)
|
|
{
|
|
setZero();
|
|
}
|
|
|
|
inline
|
|
DriverCaps::DriverCaps(const DriverCaps &someDriverCaps)
|
|
{
|
|
*this=someDriverCaps;
|
|
}
|
|
|
|
inline
|
|
DriverCaps::DriverCaps(const CAPDRIVERCAPS &someCAPDRIVERCAPS)
|
|
{
|
|
*this=someCAPDRIVERCAPS;
|
|
}
|
|
|
|
inline
|
|
DriverCaps::~DriverCaps(void)
|
|
{
|
|
}
|
|
|
|
inline
|
|
DriverCaps &DriverCaps::operator=(const DriverCaps &someDriverCaps)
|
|
{
|
|
deviceIndex(someDriverCaps.deviceIndex());
|
|
hasOverlay(someDriverCaps.hasOverlay());
|
|
hasDlgVideoSource(someDriverCaps.hasDlgVideoSource());
|
|
hasDlgVideoFormat(someDriverCaps.hasDlgVideoFormat());
|
|
hasDlgVideoDisplay(someDriverCaps.hasDlgVideoDisplay());
|
|
captureInitialized(someDriverCaps.captureInitialized());
|
|
driverSuppliesPalettes(someDriverCaps.driverSuppliesPalettes());
|
|
videoIn(someDriverCaps.videoIn());
|
|
videoOut(someDriverCaps.videoOut());
|
|
videoExtIn(someDriverCaps.videoExtIn());
|
|
videoExtOut(someDriverCaps.videoExtOut());
|
|
return *this;
|
|
}
|
|
|
|
inline
|
|
DriverCaps &DriverCaps::operator=(const CAPDRIVERCAPS &someCAPDRIVERCAPS)
|
|
{
|
|
deviceIndex(someCAPDRIVERCAPS.wDeviceIndex);
|
|
hasOverlay(someCAPDRIVERCAPS.fHasOverlay);
|
|
hasDlgVideoSource(someCAPDRIVERCAPS.fHasDlgVideoSource);
|
|
hasDlgVideoFormat(someCAPDRIVERCAPS.fHasDlgVideoFormat);
|
|
hasDlgVideoDisplay(someCAPDRIVERCAPS.fHasDlgVideoDisplay);
|
|
captureInitialized(someCAPDRIVERCAPS.fCaptureInitialized);
|
|
driverSuppliesPalettes(someCAPDRIVERCAPS.fDriverSuppliesPalettes);
|
|
videoIn(someCAPDRIVERCAPS.hVideoIn);
|
|
videoOut(someCAPDRIVERCAPS.hVideoOut);
|
|
videoExtIn(someCAPDRIVERCAPS.hVideoExtIn);
|
|
videoExtOut(someCAPDRIVERCAPS.hVideoExtOut);
|
|
return *this;
|
|
}
|
|
|
|
inline
|
|
WORD DriverCaps::operator==(const DriverCaps &someDriverCaps)const
|
|
{
|
|
return (deviceIndex()==someDriverCaps.deviceIndex()&&
|
|
hasOverlay()==someDriverCaps.hasOverlay()&&
|
|
hasDlgVideoSource()==someDriverCaps.hasDlgVideoSource()&&
|
|
hasDlgVideoFormat()==someDriverCaps.hasDlgVideoFormat()&&
|
|
hasDlgVideoDisplay()==someDriverCaps.hasDlgVideoDisplay()&&
|
|
captureInitialized()==someDriverCaps.captureInitialized()&&
|
|
driverSuppliesPalettes()==someDriverCaps.driverSuppliesPalettes()&&
|
|
videoIn()==someDriverCaps.videoIn()&&
|
|
videoOut()==someDriverCaps.videoOut()&&
|
|
videoExtIn()==someDriverCaps.videoExtIn()&&
|
|
videoExtOut()==someDriverCaps.videoExtOut());
|
|
}
|
|
|
|
inline
|
|
WORD DriverCaps::operator==(const CAPDRIVERCAPS &someCAPDRIVERCAPS)const
|
|
{
|
|
DriverCaps driverCaps(someCAPDRIVERCAPS);
|
|
return *this==driverCaps;
|
|
}
|
|
|
|
inline
|
|
WORD DriverCaps::deviceIndex(void)const
|
|
{
|
|
return CAPDRIVERCAPS::wDeviceIndex;
|
|
}
|
|
|
|
inline
|
|
void DriverCaps::deviceIndex(WORD deviceIndex)
|
|
{
|
|
CAPDRIVERCAPS::wDeviceIndex=deviceIndex;
|
|
}
|
|
|
|
inline
|
|
WORD DriverCaps::hasOverlay(void)const
|
|
{
|
|
return CAPDRIVERCAPS::fHasOverlay;
|
|
}
|
|
|
|
inline
|
|
void DriverCaps::hasOverlay(WORD hasOverlay)
|
|
{
|
|
CAPDRIVERCAPS::fHasOverlay=hasOverlay;
|
|
}
|
|
|
|
inline
|
|
WORD DriverCaps::hasDlgVideoSource(void)const
|
|
{
|
|
return CAPDRIVERCAPS::fHasDlgVideoSource;
|
|
}
|
|
|
|
inline
|
|
void DriverCaps::hasDlgVideoSource(WORD hasDlgVideoSource)
|
|
{
|
|
CAPDRIVERCAPS::fHasDlgVideoSource=hasDlgVideoSource;
|
|
}
|
|
|
|
inline
|
|
WORD DriverCaps::hasDlgVideoFormat(void)const
|
|
{
|
|
return CAPDRIVERCAPS::fHasDlgVideoFormat;
|
|
}
|
|
|
|
inline
|
|
void DriverCaps::hasDlgVideoFormat(WORD hasDlgVideoFormat)
|
|
{
|
|
CAPDRIVERCAPS::fHasDlgVideoFormat=hasDlgVideoFormat;
|
|
}
|
|
|
|
inline
|
|
WORD DriverCaps::hasDlgVideoDisplay(void)const
|
|
{
|
|
return CAPDRIVERCAPS::fHasDlgVideoDisplay;
|
|
}
|
|
|
|
inline
|
|
void DriverCaps::hasDlgVideoDisplay(WORD hasDlgVideoDisplay)
|
|
{
|
|
CAPDRIVERCAPS::fHasDlgVideoDisplay=hasDlgVideoDisplay;
|
|
}
|
|
|
|
inline
|
|
WORD DriverCaps::captureInitialized(void)const
|
|
{
|
|
return CAPDRIVERCAPS::fCaptureInitialized;
|
|
}
|
|
|
|
inline
|
|
void DriverCaps::captureInitialized(WORD captureInitialized)
|
|
{
|
|
CAPDRIVERCAPS::fCaptureInitialized=captureInitialized;
|
|
}
|
|
|
|
inline
|
|
WORD DriverCaps::driverSuppliesPalettes(void)const
|
|
{
|
|
return CAPDRIVERCAPS::fDriverSuppliesPalettes;
|
|
}
|
|
|
|
inline
|
|
void DriverCaps::driverSuppliesPalettes(WORD driverSuppliesPalettes)
|
|
{
|
|
CAPDRIVERCAPS::fDriverSuppliesPalettes=driverSuppliesPalettes;
|
|
}
|
|
|
|
inline
|
|
HANDLE DriverCaps::videoIn(void)const
|
|
{
|
|
return CAPDRIVERCAPS::hVideoIn;
|
|
}
|
|
|
|
inline
|
|
void DriverCaps::videoIn(HANDLE videoIn)
|
|
{
|
|
CAPDRIVERCAPS::hVideoIn=videoIn;
|
|
}
|
|
|
|
inline
|
|
HANDLE DriverCaps::videoOut(void)const
|
|
{
|
|
return CAPDRIVERCAPS::hVideoOut;
|
|
}
|
|
|
|
inline
|
|
void DriverCaps::videoOut(HANDLE videoOut)
|
|
{
|
|
CAPDRIVERCAPS::hVideoOut=videoOut;
|
|
}
|
|
|
|
inline
|
|
HANDLE DriverCaps::videoExtIn(void)const
|
|
{
|
|
return CAPDRIVERCAPS::hVideoExtIn;
|
|
}
|
|
|
|
inline
|
|
void DriverCaps::videoExtIn(HANDLE videoExtIn)
|
|
{
|
|
CAPDRIVERCAPS::hVideoExtIn=videoExtIn;
|
|
}
|
|
|
|
inline
|
|
HANDLE DriverCaps::videoExtOut(void)const
|
|
{
|
|
return CAPDRIVERCAPS::hVideoExtOut;
|
|
}
|
|
|
|
inline
|
|
void DriverCaps::videoExtOut(HANDLE videoExtOut)
|
|
{
|
|
CAPDRIVERCAPS::hVideoExtOut=videoExtOut;
|
|
}
|
|
|
|
inline
|
|
void DriverCaps::setZero(void)
|
|
{
|
|
deviceIndex(0);
|
|
hasOverlay(0);
|
|
hasDlgVideoSource(0);
|
|
hasDlgVideoFormat(0);
|
|
hasDlgVideoDisplay(0);
|
|
captureInitialized(0);
|
|
driverSuppliesPalettes(0);
|
|
videoIn(0);
|
|
videoOut(0);
|
|
videoExtIn(0);
|
|
videoExtOut(0);
|
|
}
|
|
#endif
|
|
|
|
|