330 lines
6.8 KiB
C++
330 lines
6.8 KiB
C++
#ifndef _VIDCAP_CAPSTATUS_HPP_
|
|
#define _VIDCAP_CAPSTATUS_HPP_
|
|
#include <common/point.hpp>
|
|
#include <common/vfw.hpp>
|
|
|
|
class CaptureStatus : private CAPSTATUS
|
|
{
|
|
public:
|
|
CaptureStatus(void);
|
|
CaptureStatus(const CaptureStatus &someCaptureStatus);
|
|
CaptureStatus(const CAPSTATUS &someCAPSTATUS);
|
|
virtual ~CaptureStatus();
|
|
CaptureStatus &operator=(const CaptureStatus &someCaptureStatus);
|
|
CaptureStatus &operator=(const CAPSTATUS &someCAPSTATUS);
|
|
WORD operator==(const CaptureStatus &someCaptureStatus)const;
|
|
WORD operator==(const CAPSTATUS &someCAPSTATUS)const;
|
|
UINT imageWidth(void)const;
|
|
void imageWidth(UINT imageWidth);
|
|
UINT imageHeight(void)const;
|
|
void imageHeight(UINT imageHeight);
|
|
WORD liveWindow(void)const;
|
|
void liveWindow(WORD liveWindow);
|
|
WORD overlayWindow(void)const;
|
|
void overlayWindow(WORD overlayWindow);
|
|
WORD scale(void)const;
|
|
void scale(WORD scale);
|
|
Point pointScroll(void)const;
|
|
void pointScroll(const Point &pointScroll);
|
|
WORD usingDefaultPalette(void)const;
|
|
void usingDefaultPalette(WORD usingDefaultPalette);
|
|
WORD audioHardware(void)const;
|
|
void audioHardware(WORD audioHardware);
|
|
WORD capFileExists(void)const;
|
|
void capFileExists(WORD capFileExists);
|
|
WORD currentVideoFrame(void)const;
|
|
void currentVideoFrame(WORD currentVideoFrame);
|
|
WORD currentVideoFramedDropped(void)const;
|
|
void currentVideoFramesDropped(WORD currentVideoFramesDropped);
|
|
WORD currentWaveSamples(void)const;
|
|
void currentWaveSamples(WORD currentWaveSamples);
|
|
DWORD currentTimeElapsed(void)const;
|
|
void currentTimeElapsed(DWORD currentTimeElapsed);
|
|
HPALETTE currentPalette(void)const;
|
|
void currentPalette(HPALETTE currentPalette);
|
|
WORD capturingNow(void)const;
|
|
void capturingNow(WORD capturingNow);
|
|
DWORD returnVal(void)const;
|
|
void returnVal(DWORD returnVal);
|
|
WORD numVideoAllocated(void)const;
|
|
void numVideoAllocated(WORD numVideoAllocated);
|
|
WORD numAudioAllocated(void)const;
|
|
void numAudioAllocated(WORD numAudioAllocated);
|
|
private:
|
|
void setZero(void);
|
|
};
|
|
|
|
inline
|
|
CaptureStatus::CaptureStatus(void)
|
|
{
|
|
setZero();
|
|
}
|
|
|
|
inline
|
|
CaptureStatus::CaptureStatus(const CaptureStatus &someCaptureStatus)
|
|
{
|
|
*this=someCaptureStatus;
|
|
}
|
|
|
|
inline
|
|
CaptureStatus::CaptureStatus(const CAPSTATUS &someCAPSTATUS)
|
|
{
|
|
*this=someCAPSTATUS;
|
|
}
|
|
|
|
inline
|
|
CaptureStatus::~CaptureStatus()
|
|
{
|
|
}
|
|
|
|
inline
|
|
CaptureStatus &CaptureStatus::operator=(const CaptureStatus &someCaptureStatus)
|
|
{
|
|
::memcpy((char*)&((CAPSTATUS&)*this),(char*)&((CAPSTATUS&)someCaptureStatus),sizeof(CAPSTATUS));
|
|
return *this;
|
|
}
|
|
|
|
inline
|
|
CaptureStatus &CaptureStatus::operator=(const CAPSTATUS &someCAPSTATUS)
|
|
{
|
|
::memcpy((char*)&((CAPSTATUS&)*this),(char*)&someCAPSTATUS,sizeof(CAPSTATUS));
|
|
return *this;
|
|
}
|
|
|
|
inline
|
|
WORD CaptureStatus::operator==(const CaptureStatus &someCaptureStatus)const
|
|
{
|
|
return ::memcmp((char*)&((CAPSTATUS&)*this),(char*)&((CAPSTATUS&)someCaptureStatus),sizeof(CAPSTATUS))?FALSE:TRUE;
|
|
}
|
|
|
|
inline
|
|
WORD CaptureStatus::operator==(const CAPSTATUS &someCAPSTATUS)const
|
|
{
|
|
return *this==CaptureStatus(someCAPSTATUS);
|
|
}
|
|
|
|
inline
|
|
UINT CaptureStatus::imageWidth(void)const
|
|
{
|
|
return CAPSTATUS::uiImageWidth;
|
|
}
|
|
|
|
inline
|
|
void CaptureStatus::imageWidth(UINT imageWidth)
|
|
{
|
|
CAPSTATUS::uiImageWidth=imageWidth;
|
|
}
|
|
|
|
inline
|
|
UINT CaptureStatus::imageHeight(void)const
|
|
{
|
|
return CAPSTATUS::uiImageHeight;
|
|
}
|
|
|
|
inline
|
|
void CaptureStatus::imageHeight(UINT imageHeight)
|
|
{
|
|
CAPSTATUS::uiImageHeight=imageHeight;
|
|
}
|
|
|
|
inline
|
|
WORD CaptureStatus::liveWindow(void)const
|
|
{
|
|
return CAPSTATUS::fLiveWindow;
|
|
}
|
|
|
|
inline
|
|
void CaptureStatus::liveWindow(WORD liveWindow)
|
|
{
|
|
CAPSTATUS::fLiveWindow=liveWindow;
|
|
}
|
|
|
|
inline
|
|
WORD CaptureStatus::overlayWindow(void)const
|
|
{
|
|
return CAPSTATUS::fOverlayWindow;
|
|
}
|
|
|
|
inline
|
|
void CaptureStatus::overlayWindow(WORD overlayWindow)
|
|
{
|
|
CAPSTATUS::fOverlayWindow=overlayWindow;
|
|
}
|
|
|
|
inline
|
|
WORD CaptureStatus::scale(void)const
|
|
{
|
|
return CAPSTATUS::fScale;
|
|
}
|
|
|
|
inline
|
|
void CaptureStatus::scale(WORD scale)
|
|
{
|
|
CAPSTATUS::fScale=scale;
|
|
}
|
|
|
|
inline
|
|
Point CaptureStatus::pointScroll(void)const
|
|
{
|
|
return Point(CAPSTATUS::ptScroll.x,CAPSTATUS::ptScroll.y);
|
|
}
|
|
|
|
inline
|
|
void CaptureStatus::pointScroll(const Point &pointScroll)
|
|
{
|
|
CAPSTATUS::ptScroll.x=pointScroll.x();
|
|
CAPSTATUS::ptScroll.y=pointScroll.y();
|
|
}
|
|
|
|
inline
|
|
WORD CaptureStatus::usingDefaultPalette(void)const
|
|
{
|
|
return CAPSTATUS::fUsingDefaultPalette;
|
|
}
|
|
|
|
inline
|
|
void CaptureStatus::usingDefaultPalette(WORD usingDefaultPalette)
|
|
{
|
|
CAPSTATUS::fUsingDefaultPalette=usingDefaultPalette;
|
|
}
|
|
|
|
inline
|
|
WORD CaptureStatus::audioHardware(void)const
|
|
{
|
|
return CAPSTATUS::fAudioHardware;
|
|
}
|
|
|
|
inline
|
|
void CaptureStatus::audioHardware(WORD audioHardware)
|
|
{
|
|
CAPSTATUS::fAudioHardware=audioHardware;
|
|
}
|
|
|
|
inline
|
|
WORD CaptureStatus::capFileExists(void)const
|
|
{
|
|
return CAPSTATUS::fCapFileExists;
|
|
}
|
|
|
|
inline
|
|
void CaptureStatus::capFileExists(WORD capFileExists)
|
|
{
|
|
CAPSTATUS::fCapFileExists=capFileExists;
|
|
}
|
|
|
|
inline
|
|
WORD CaptureStatus::currentVideoFrame(void)const
|
|
{
|
|
return CAPSTATUS::dwCurrentVideoFrame;
|
|
}
|
|
|
|
inline
|
|
void CaptureStatus::currentVideoFrame(WORD currentVideoFrame)
|
|
{
|
|
CAPSTATUS::dwCurrentVideoFrame=currentVideoFrame;
|
|
}
|
|
|
|
inline
|
|
WORD CaptureStatus::currentVideoFramedDropped(void)const
|
|
{
|
|
return CAPSTATUS::dwCurrentVideoFramesDropped;
|
|
}
|
|
|
|
inline
|
|
void CaptureStatus::currentVideoFramesDropped(WORD currentVideoFramesDropped)
|
|
{
|
|
CAPSTATUS::dwCurrentVideoFramesDropped=currentVideoFramesDropped;
|
|
}
|
|
|
|
inline
|
|
WORD CaptureStatus::currentWaveSamples(void)const
|
|
{
|
|
return CAPSTATUS::dwCurrentWaveSamples;
|
|
}
|
|
|
|
inline
|
|
void CaptureStatus::currentWaveSamples(WORD currentWaveSamples)
|
|
{
|
|
CAPSTATUS::dwCurrentWaveSamples=currentWaveSamples;
|
|
}
|
|
|
|
inline
|
|
DWORD CaptureStatus::currentTimeElapsed(void)const
|
|
{
|
|
return CAPSTATUS::dwCurrentTimeElapsedMS;
|
|
}
|
|
|
|
inline
|
|
void CaptureStatus::currentTimeElapsed(DWORD currentTimeElapsed)
|
|
{
|
|
CAPSTATUS::dwCurrentTimeElapsedMS=currentTimeElapsed;
|
|
}
|
|
|
|
inline
|
|
HPALETTE CaptureStatus::currentPalette(void)const
|
|
{
|
|
return CAPSTATUS::hPalCurrent;
|
|
}
|
|
|
|
inline
|
|
void CaptureStatus::currentPalette(HPALETTE currentPalette)
|
|
{
|
|
CAPSTATUS::hPalCurrent=currentPalette;
|
|
}
|
|
|
|
inline
|
|
WORD CaptureStatus::capturingNow(void)const
|
|
{
|
|
return CAPSTATUS::fCapturingNow;
|
|
}
|
|
|
|
inline
|
|
void CaptureStatus::capturingNow(WORD capturingNow)
|
|
{
|
|
CAPSTATUS::fCapturingNow=capturingNow;
|
|
}
|
|
|
|
inline
|
|
DWORD CaptureStatus::returnVal(void)const
|
|
{
|
|
return CAPSTATUS::dwReturn;
|
|
}
|
|
|
|
inline
|
|
void CaptureStatus::returnVal(DWORD returnVal)
|
|
{
|
|
CAPSTATUS::dwReturn=returnVal;
|
|
}
|
|
|
|
inline
|
|
WORD CaptureStatus::numVideoAllocated(void)const
|
|
{
|
|
return CAPSTATUS::wNumVideoAllocated;
|
|
}
|
|
|
|
inline
|
|
void CaptureStatus::numVideoAllocated(WORD numVideoAllocated)
|
|
{
|
|
CAPSTATUS::wNumVideoAllocated=numVideoAllocated;
|
|
}
|
|
|
|
inline
|
|
WORD CaptureStatus::numAudioAllocated(void)const
|
|
{
|
|
return CAPSTATUS::wNumAudioAllocated;
|
|
}
|
|
|
|
inline
|
|
void CaptureStatus::numAudioAllocated(WORD numAudioAllocated)
|
|
{
|
|
CAPSTATUS::wNumAudioAllocated=numAudioAllocated;
|
|
}
|
|
|
|
inline
|
|
void CaptureStatus::setZero(void)
|
|
{
|
|
::memset((char*)&((CAPSTATUS&)*this),0,sizeof(CAPSTATUS));
|
|
}
|
|
#endif
|
|
|