Initial
This commit is contained in:
BIN
vidcap/AVICAP.RES
Normal file
BIN
vidcap/AVICAP.RES
Normal file
Binary file not shown.
BIN
vidcap/AVICAP.RWS
Normal file
BIN
vidcap/AVICAP.RWS
Normal file
Binary file not shown.
184
vidcap/BMPCAP.CPP
Normal file
184
vidcap/BMPCAP.CPP
Normal file
@@ -0,0 +1,184 @@
|
||||
#include <vidcap/bmpcap.hpp>
|
||||
#include <vidcap/vidreg.hpp>
|
||||
#include <common/bitmap.hpp>
|
||||
#include <common/purepal.hpp>
|
||||
#include <common/systime.hpp>
|
||||
#include <jpeg-6b/bmpjpg.hpp>
|
||||
|
||||
BmpCap::BmpCap()
|
||||
: mSequence(0), mSaveFrames(0), mUseSequence(false)
|
||||
{
|
||||
}
|
||||
|
||||
BmpCap::BmpCap(HWND hParentWnd,DWORD driverIndex)
|
||||
: mSequence(0), mSaveFrames(false), mUseSequence(false)
|
||||
{
|
||||
initialize(hParentWnd,driverIndex);
|
||||
}
|
||||
|
||||
BmpCap::~BmpCap()
|
||||
{
|
||||
// mVideoCodec.driverEnable(false);
|
||||
}
|
||||
|
||||
void BmpCap::initialize(HWND hParentWnd,DWORD driverIndex)
|
||||
{
|
||||
DWORD previewWidth;
|
||||
DWORD previewHeight;
|
||||
DriverCaps driverCaps;
|
||||
ICMOpen icmOpen;
|
||||
VidReg vidReg;
|
||||
|
||||
mUseSequence=vidReg.getSequencing();
|
||||
mCaptureWidth=vidReg.getCaptureWidth();
|
||||
mCaptureHeight=vidReg.getCaptureHeight();
|
||||
mCaptureFile=vidReg.getCaptureFile();
|
||||
mQuality=vidReg.getQuality();
|
||||
previewWidth=vidReg.getPreviewWidth();
|
||||
previewHeight=vidReg.getPreviewHeight();
|
||||
create(hParentWnd,vidReg.getPreviewWidth(),vidReg.getPreviewHeight());
|
||||
connect(driverIndex);
|
||||
if(!isConnected())return;
|
||||
getDriverCaps(driverCaps);
|
||||
getVideoFormat(mBitmapInfo);
|
||||
mBitmapInfo.width(previewWidth);
|
||||
mBitmapInfo.height(previewHeight);
|
||||
setVideoFormat(mBitmapInfo);
|
||||
if(mVideoCodec.openDriver(mBitmapInfo.compression()))message("[BmpCap::initialize]Failed to open decompressor.");
|
||||
icmOpen.fccType(FOURCC("vidc"));
|
||||
icmOpen.fccHandler(mBitmapInfo.compression());
|
||||
icmOpen.flags(ICMOpen::DeCompress);
|
||||
icmOpen.version(0);
|
||||
if(!mVideoCodec.driverProc(icmOpen)){message("[BmpCap::initialize]ICMOpen failed");return;};
|
||||
if(!mVideoCodec.driverEnable()){message("[BmpCap::initialize]DriverEnable failed");return;}
|
||||
getVideoFormat(mBitmapInfo);
|
||||
}
|
||||
|
||||
// virtuals
|
||||
|
||||
#if 0
|
||||
void BmpCap::frameHandler(VIDEOHDR &videoHeader)
|
||||
{
|
||||
if(!saveFrames())return;
|
||||
MovieData movieData(MovieData::DIBCompressed);
|
||||
MovieData dstMovieData;
|
||||
DiskInfo diskInfo;
|
||||
String srcPathFileName;
|
||||
String dstPathFileName;
|
||||
String dstPathFileTempName;
|
||||
String strTime;
|
||||
SystemTime systemTime;
|
||||
|
||||
strTime.reserve(512);
|
||||
::sprintf(strTime,"%04d%02d%02d%02d%02d%02d%02d",
|
||||
systemTime.year(),systemTime.month(),systemTime.day(),
|
||||
systemTime.hour(),systemTime.minute(),systemTime.second(),
|
||||
systemTime.milliseconds());
|
||||
srcPathFileName=strTime+".bmp";
|
||||
dstPathFileTempName=strTime+"tmp.jpg";
|
||||
if(mUseSequence)dstPathFileName=mCaptureFile.betweenString(0,'.')+String().fromInt(mSequence++)+String(".jpg");
|
||||
else dstPathFileName=mCaptureFile;
|
||||
movieData.size(videoHeader.dwBufferLength);
|
||||
::memcpy((BYTE*)&movieData[0],videoHeader.lpData,videoHeader.dwBufferLength);
|
||||
if(!mVideoCodec.getFormat(mBitmapInfo,mDstBitmapInfo))return;
|
||||
mDstBitmapInfo.width(mCaptureWidth);
|
||||
mDstBitmapInfo.height(mCaptureHeight);
|
||||
if(!mVideoCodec.decompressFrame(mBitmapInfo,mDstBitmapInfo,movieData,dstMovieData))
|
||||
{
|
||||
if(!mVideoCodec.decompressFrame(mBitmapInfo,movieData,dstMovieData))return;
|
||||
if(!mVideoCodec.getFormat(mBitmapInfo,mDstBitmapInfo))return;
|
||||
}
|
||||
Bitmap frameBitmap(srcPathFileName,mDstBitmapInfo,dstMovieData);
|
||||
if(BitmapInfo::Bit8==mDstBitmapInfo.bitCount())
|
||||
{
|
||||
PurePalette purePalette(mCaptureStatus.currentPalette());
|
||||
frameBitmap.setPalette(purePalette.getPalette(),FALSE);
|
||||
}
|
||||
frameBitmap.saveBitmap();
|
||||
ImageConverter::convert(srcPathFileName,dstPathFileTempName,mQuality);
|
||||
diskInfo.rename(dstPathFileTempName,dstPathFileName);
|
||||
diskInfo.unlink(srcPathFileName);
|
||||
}
|
||||
#endif
|
||||
|
||||
void BmpCap::frameHandler(VIDEOHDR &videoHeader)
|
||||
{
|
||||
if(!saveFrames())return;
|
||||
MovieData movieData(MovieData::DIBCompressed);
|
||||
|
||||
|
||||
MovieData dstMovieData;
|
||||
DiskInfo diskInfo;
|
||||
String srcPathFileName;
|
||||
String dstPathFileName;
|
||||
String dstPathFileTempName;
|
||||
String strTime;
|
||||
SystemTime systemTime;
|
||||
|
||||
DWORD elapsedTime;
|
||||
String strMessage;
|
||||
strMessage.reserve(512);
|
||||
|
||||
elapsedTime=::GetTickCount();
|
||||
|
||||
strTime.reserve(512);
|
||||
::sprintf(strTime,"%04d%02d%02d%02d%02d%02d%02d",
|
||||
systemTime.year(),systemTime.month(),systemTime.day(),
|
||||
systemTime.hour(),systemTime.minute(),systemTime.second(),
|
||||
systemTime.milliseconds());
|
||||
srcPathFileName=strTime+".bmp";
|
||||
dstPathFileTempName=strTime+"tmp.jpg";
|
||||
if(mUseSequence)dstPathFileName=mCaptureFile.betweenString(0,'.')+String().fromInt(mSequence++)+String(".jpg");
|
||||
else dstPathFileName=mCaptureFile;
|
||||
movieData.size(videoHeader.dwBufferLength);
|
||||
::memcpy((BYTE*)&movieData[0],videoHeader.lpData,videoHeader.dwBufferLength);
|
||||
// if(!mVideoCodec.getFormat(mBitmapInfo,mDstBitmapInfo))return;
|
||||
|
||||
if(!(ICERR_OK==mVideoCodec.getFormat(mBitmapInfo,mDstBitmapInfo)))return;
|
||||
|
||||
mDstBitmapInfo.width(mCaptureWidth);
|
||||
mDstBitmapInfo.height(mCaptureHeight);
|
||||
|
||||
elapsedTime=::GetTickCount()-elapsedTime;
|
||||
::sprintf(strMessage,"[BmpCap::frameHandler] Prologue took (ms) "+String().fromInt(elapsedTime));
|
||||
message(strMessage);
|
||||
elapsedTime=::GetTickCount();
|
||||
|
||||
if(ICERR_OK!=mVideoCodec.decompressFrame(mBitmapInfo,mDstBitmapInfo,movieData,dstMovieData))
|
||||
{
|
||||
if(ICERR_OK!=mVideoCodec.decompressFrame(mBitmapInfo,movieData,dstMovieData))return;
|
||||
if(ICERR_OK!=mVideoCodec.getFormat(mBitmapInfo,mDstBitmapInfo))return;
|
||||
}
|
||||
|
||||
elapsedTime=::GetTickCount()-elapsedTime;
|
||||
::sprintf(strMessage,"[BmpCap::frameHandler] Decompress frame took (ms) "+String().fromInt(elapsedTime));
|
||||
message(strMessage);
|
||||
elapsedTime=::GetTickCount();
|
||||
|
||||
Bitmap frameBitmap(srcPathFileName,mDstBitmapInfo,dstMovieData);
|
||||
if(BitmapInfo::Bit8==mDstBitmapInfo.bitCount())
|
||||
{
|
||||
PurePalette purePalette(mCaptureStatus.currentPalette());
|
||||
frameBitmap.setPalette(purePalette.getPalette(),FALSE);
|
||||
}
|
||||
frameBitmap.saveBitmap();
|
||||
|
||||
elapsedTime=::GetTickCount()-elapsedTime;
|
||||
::sprintf(strMessage,"[BmpCap::frameHandler] Save bitmap took (ms) "+String().fromInt(elapsedTime));
|
||||
message(strMessage);
|
||||
elapsedTime=::GetTickCount();
|
||||
|
||||
ImageConverter::convert(srcPathFileName,dstPathFileTempName,mQuality);
|
||||
|
||||
elapsedTime=::GetTickCount()-elapsedTime;
|
||||
::sprintf(strMessage,"[BmpCap::frameHandler] Convert to jpeg took (ms) "+String().fromInt(elapsedTime));
|
||||
message(strMessage);
|
||||
|
||||
diskInfo.rename(dstPathFileTempName,dstPathFileName);
|
||||
diskInfo.unlink(srcPathFileName);
|
||||
}
|
||||
|
||||
void BmpCap::message(const String &message)
|
||||
{
|
||||
return;
|
||||
}
|
||||
70
vidcap/BMPCAP.HPP
Normal file
70
vidcap/BMPCAP.HPP
Normal file
@@ -0,0 +1,70 @@
|
||||
#ifndef _VIDCAP_BMPCAP_HPP_
|
||||
#define _VIDCAP_BMPCAP_HPP_
|
||||
#ifndef _COMMON_BITMAPINFO_HPP_
|
||||
#include <common/bminfo.hpp>
|
||||
#endif
|
||||
|
||||
#ifndef _CODEC_VIDEOCODEC_HPP_
|
||||
#include <codec/vidc.hpp>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef _VIDCAP_VIDCAP_HPP_
|
||||
#include <vidcap/vidcap.hpp>
|
||||
#endif
|
||||
|
||||
|
||||
class BmpCap : public VidCap
|
||||
{
|
||||
public:
|
||||
BmpCap(HWND hParentWnd,DWORD driverIndex);
|
||||
BmpCap(void);
|
||||
virtual ~BmpCap();
|
||||
void initialize(HWND hParentWnd,DWORD driverIndex);
|
||||
bool saveFrames(void)const;
|
||||
void saveFrames(bool saveFrames);
|
||||
const String &getCaptureFileName(void)const;
|
||||
void setCaptureFileName(const String &strPathCaptureFile);
|
||||
protected:
|
||||
virtual void message(const String &message);
|
||||
virtual void frameHandler(VIDEOHDR &videoHeader);
|
||||
private:
|
||||
BitmapInfo mBitmapInfo;
|
||||
BitmapInfo mDstBitmapInfo;
|
||||
CaptureStatus mCaptureStatus;
|
||||
VideoCodec mVideoCodec;
|
||||
int mSequence;
|
||||
bool mSaveFrames;
|
||||
bool mUseSequence;
|
||||
DWORD mCaptureWidth;
|
||||
DWORD mCaptureHeight;
|
||||
DWORD mQuality;
|
||||
String mCaptureFile;
|
||||
};
|
||||
|
||||
inline
|
||||
bool BmpCap::saveFrames(void)const
|
||||
{
|
||||
return mSaveFrames;
|
||||
}
|
||||
|
||||
inline
|
||||
void BmpCap::saveFrames(bool saveFrames)
|
||||
{
|
||||
mSaveFrames=saveFrames;
|
||||
}
|
||||
|
||||
inline
|
||||
const String &BmpCap::getCaptureFileName(void)const
|
||||
{
|
||||
return mCaptureFile;
|
||||
}
|
||||
|
||||
inline
|
||||
void BmpCap::setCaptureFileName(const String &strPathCaptureFile)
|
||||
{
|
||||
mCaptureFile=strPathCaptureFile;
|
||||
}
|
||||
#endif
|
||||
20
vidcap/BMPCAP.INI
Normal file
20
vidcap/BMPCAP.INI
Normal file
@@ -0,0 +1,20 @@
|
||||
[OPTIONS]
|
||||
RATE=50
|
||||
SAVE=FRAME.BMP
|
||||
|
||||
[SITES]
|
||||
S1=SITE1
|
||||
S2=SITE2
|
||||
|
||||
[SITE1]
|
||||
NAME=EUROPA.DEV.COM
|
||||
USER=SEAN
|
||||
PASSWORD=KESSLER
|
||||
DIRECTORY=C:\WORK
|
||||
|
||||
[SITE2]
|
||||
NAME=CNCT.COM
|
||||
USER=SEAN
|
||||
PASSWORD=CYGNUS-X1
|
||||
DIRECTORY=/NEWS
|
||||
|
||||
413
vidcap/CAPPARMS.HPP
Normal file
413
vidcap/CAPPARMS.HPP
Normal file
@@ -0,0 +1,413 @@
|
||||
#ifndef _VIDCAP_CAPTUREPARAMS_HPP_
|
||||
#define _VIDCAP_CAPTUREPARAMS_HPP_
|
||||
#include <memory.h>
|
||||
#include <common/vfw.hpp>
|
||||
|
||||
class CaptureParams : private CAPTUREPARMS
|
||||
{
|
||||
public:
|
||||
CaptureParams(void);
|
||||
CaptureParams(const CaptureParams &someCaptureParams);
|
||||
CaptureParams(const CAPTUREPARMS &someCAPTUREPARMS);
|
||||
virtual ~CaptureParams(void);
|
||||
CaptureParams &operator=(const CaptureParams &someCaptureParams);
|
||||
CaptureParams &operator=(const CAPTUREPARMS &someCAPTUREPARMS);
|
||||
WORD operator==(const CaptureParams &someCaptureParams);
|
||||
WORD operator==(const CAPTUREPARMS &someCAPTUREPARMS);
|
||||
DWORD requestMicroSecondsPerFrame(void)const;
|
||||
void requestMicroSecondsPerFrame(DWORD requestMicroSecondsPerFrame);
|
||||
WORD hitOkToCapture(void)const;
|
||||
void hitOkToCapture(WORD hitOkToCapture);
|
||||
WORD percentDropForError(void)const;
|
||||
void percentDropForError(WORD percentDropForError);
|
||||
WORD yield(void)const;
|
||||
void yield(WORD yield);
|
||||
DWORD sizeIndex(void)const;
|
||||
void sizeIndex(DWORD sizeIndex);
|
||||
WORD chunkGranularity(void)const;
|
||||
void chunkGranularity(WORD chunkGranularity);
|
||||
WORD usingDOSMemory(void)const;
|
||||
void usingDOSMemory(WORD usingDOSMemory);
|
||||
WORD numVideoRequested(void)const;
|
||||
void numVideoRequested(WORD numVideoRequested);
|
||||
WORD captureAudio(void)const;
|
||||
void captureAudio(WORD captureAudio);
|
||||
WORD numAudioRequested(void)const;
|
||||
void numAudioRequested(WORD numAudioRequested);
|
||||
WORD keyAbort(void)const;
|
||||
void keyAbort(WORD keyAbort);
|
||||
WORD abortLeftMouse(void)const;
|
||||
void abortLeftMouse(WORD abortLeftMouse);
|
||||
WORD abortRightMouse(void)const;
|
||||
void abortRightMouse(WORD abortRightMouse);
|
||||
WORD limitEnabled(void)const;
|
||||
void limitEnabled(WORD limitEnabled);
|
||||
WORD timeLimit(void)const;
|
||||
void timeLimit(WORD timeLimit);
|
||||
WORD mciControl(void)const;
|
||||
void mciControl(WORD mciControl);
|
||||
WORD stepMCIDevice(void)const;
|
||||
void stepMCIDevice(WORD stepMCIDevice);
|
||||
DWORD mciStartTime(void)const;
|
||||
void mciStartTime(DWORD mciStartTime);
|
||||
DWORD mciStopTime(void)const;
|
||||
void mciStopTime(DWORD mciStopTime);
|
||||
WORD stepCaptureAt2x(void)const;
|
||||
void stepCaptureAt2x(WORD stepCaptureAt2x);
|
||||
WORD stepCaptureAverageFrames(void)const;
|
||||
void stepCaptureAverageFrames(WORD stepCaptureAverageFrames);
|
||||
DWORD audioBufferSize(void)const;
|
||||
void audioBufferSize(DWORD audioBufferSize);
|
||||
WORD disableWriteCache(void)const;
|
||||
void disableWriteCache(WORD disableWriteCache);
|
||||
UINT streamMaster(void)const;
|
||||
void streamMaster(UINT streamMaster);
|
||||
private:
|
||||
void setZero(void);
|
||||
};
|
||||
|
||||
inline
|
||||
CaptureParams::CaptureParams(void)
|
||||
{
|
||||
setZero();
|
||||
}
|
||||
|
||||
inline
|
||||
CaptureParams::CaptureParams(const CaptureParams &someCaptureParams)
|
||||
{
|
||||
*this=someCaptureParams;
|
||||
}
|
||||
|
||||
inline
|
||||
CaptureParams::CaptureParams(const CAPTUREPARMS &someCAPTUREPARMS)
|
||||
{
|
||||
*this=someCAPTUREPARMS;
|
||||
}
|
||||
|
||||
inline
|
||||
CaptureParams::~CaptureParams(void)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
CaptureParams &CaptureParams::operator=(const CaptureParams &someCaptureParams)
|
||||
{
|
||||
::memcpy((char*)&((CAPTUREPARMS&)*this),(char*)&((CAPTUREPARMS&)someCaptureParams),sizeof(CAPTUREPARMS));
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
CaptureParams &CaptureParams::operator=(const CAPTUREPARMS &someCAPTUREPARMS)
|
||||
{
|
||||
::memcpy((char*)&((CAPTUREPARMS&)*this),(char*)&someCAPTUREPARMS,sizeof(CAPTUREPARMS));
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD CaptureParams::operator==(const CaptureParams &someCaptureParams)
|
||||
{
|
||||
return ::memcmp((char*)&((CAPTUREPARMS&)*this),(char*)&((CAPTUREPARMS&)someCaptureParams),sizeof(CAPTUREPARMS))?FALSE:TRUE;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD CaptureParams::operator==(const CAPTUREPARMS &someCAPTUREPARMS)
|
||||
{
|
||||
return ::memcmp((char*)&((CAPTUREPARMS&)*this),(char*)&someCAPTUREPARMS,sizeof(CAPTUREPARMS))?FALSE:TRUE;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD CaptureParams::requestMicroSecondsPerFrame(void)const
|
||||
{
|
||||
return CAPTUREPARMS::dwRequestMicroSecPerFrame;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::requestMicroSecondsPerFrame(DWORD requestMicroSecondsPerFrame)
|
||||
{
|
||||
CAPTUREPARMS::dwRequestMicroSecPerFrame=requestMicroSecondsPerFrame;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD CaptureParams::hitOkToCapture(void)const
|
||||
{
|
||||
return CAPTUREPARMS::fMakeUserHitOKToCapture;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::hitOkToCapture(WORD hitOkToCapture)
|
||||
{
|
||||
CAPTUREPARMS::fMakeUserHitOKToCapture=hitOkToCapture;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD CaptureParams::percentDropForError(void)const
|
||||
{
|
||||
return CAPTUREPARMS::wPercentDropForError;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::percentDropForError(WORD percentDropForError)
|
||||
{
|
||||
CAPTUREPARMS::wPercentDropForError=percentDropForError;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD CaptureParams::yield(void)const
|
||||
{
|
||||
return CAPTUREPARMS::fYield;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::yield(WORD yield)
|
||||
{
|
||||
CAPTUREPARMS::fYield=yield;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD CaptureParams::sizeIndex(void)const
|
||||
{
|
||||
return CAPTUREPARMS::dwIndexSize;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::sizeIndex(DWORD sizeIndex)
|
||||
{
|
||||
CAPTUREPARMS::dwIndexSize=sizeIndex;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD CaptureParams::chunkGranularity(void)const
|
||||
{
|
||||
return CAPTUREPARMS::wChunkGranularity;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::chunkGranularity(WORD chunkGranularity)
|
||||
{
|
||||
CAPTUREPARMS::wChunkGranularity=chunkGranularity;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD CaptureParams::usingDOSMemory(void)const
|
||||
{
|
||||
return CAPTUREPARMS::fUsingDOSMemory;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::usingDOSMemory(WORD usingDOSMemory)
|
||||
{
|
||||
CAPTUREPARMS::fUsingDOSMemory=usingDOSMemory;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD CaptureParams::numVideoRequested(void)const
|
||||
{
|
||||
return CAPTUREPARMS::wNumVideoRequested;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::numVideoRequested(WORD numVideoRequested)
|
||||
{
|
||||
CAPTUREPARMS::wNumVideoRequested=numVideoRequested;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD CaptureParams::captureAudio(void)const
|
||||
{
|
||||
return CAPTUREPARMS::fCaptureAudio;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::captureAudio(WORD captureAudio)
|
||||
{
|
||||
CAPTUREPARMS::fCaptureAudio=captureAudio;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD CaptureParams::numAudioRequested(void)const
|
||||
{
|
||||
return CAPTUREPARMS::wNumAudioRequested;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::numAudioRequested(WORD numAudioRequested)
|
||||
{
|
||||
CAPTUREPARMS::wNumAudioRequested=numAudioRequested;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD CaptureParams::keyAbort(void)const
|
||||
{
|
||||
return CAPTUREPARMS::vKeyAbort;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::keyAbort(WORD keyAbort)
|
||||
{
|
||||
CAPTUREPARMS::vKeyAbort=keyAbort;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD CaptureParams::abortLeftMouse(void)const
|
||||
{
|
||||
return CAPTUREPARMS::fAbortLeftMouse;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::abortLeftMouse(WORD abortLeftMouse)
|
||||
{
|
||||
CAPTUREPARMS::fAbortLeftMouse=abortLeftMouse;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD CaptureParams::abortRightMouse(void)const
|
||||
{
|
||||
return CAPTUREPARMS::fAbortRightMouse;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::abortRightMouse(WORD abortRightMouse)
|
||||
{
|
||||
CAPTUREPARMS::fAbortRightMouse=abortRightMouse;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD CaptureParams::limitEnabled(void)const
|
||||
{
|
||||
return CAPTUREPARMS::fLimitEnabled;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::limitEnabled(WORD limitEnabled)
|
||||
{
|
||||
CAPTUREPARMS::fLimitEnabled=limitEnabled;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD CaptureParams::timeLimit(void)const
|
||||
{
|
||||
return CAPTUREPARMS::wTimeLimit;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::timeLimit(WORD timeLimit)
|
||||
{
|
||||
CAPTUREPARMS::wTimeLimit=timeLimit;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD CaptureParams::mciControl(void)const
|
||||
{
|
||||
return CAPTUREPARMS::fMCIControl;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::mciControl(WORD mciControl)
|
||||
{
|
||||
CAPTUREPARMS::fMCIControl=mciControl;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD CaptureParams::stepMCIDevice(void)const
|
||||
{
|
||||
return CAPTUREPARMS::fStepMCIDevice;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::stepMCIDevice(WORD stepMCIDevice)
|
||||
{
|
||||
CAPTUREPARMS::fStepMCIDevice=stepMCIDevice;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD CaptureParams::mciStartTime(void)const
|
||||
{
|
||||
return CAPTUREPARMS::dwMCIStartTime;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::mciStartTime(DWORD mciStartTime)
|
||||
{
|
||||
CAPTUREPARMS::dwMCIStartTime=mciStartTime;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD CaptureParams::mciStopTime(void)const
|
||||
{
|
||||
return CAPTUREPARMS::dwMCIStopTime;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::mciStopTime(DWORD mciStopTime)
|
||||
{
|
||||
CAPTUREPARMS::dwMCIStopTime=mciStopTime;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD CaptureParams::stepCaptureAt2x(void)const
|
||||
{
|
||||
return CAPTUREPARMS::fStepCaptureAt2x;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::stepCaptureAt2x(WORD stepCaptureAt2x)
|
||||
{
|
||||
CAPTUREPARMS::fStepCaptureAt2x=stepCaptureAt2x;
|
||||
}
|
||||
|
||||
|
||||
inline
|
||||
WORD CaptureParams::stepCaptureAverageFrames(void)const
|
||||
{
|
||||
return CAPTUREPARMS::wStepCaptureAverageFrames;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::stepCaptureAverageFrames(WORD stepCaptureAverageFrames)
|
||||
{
|
||||
CAPTUREPARMS::wStepCaptureAverageFrames=stepCaptureAverageFrames;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD CaptureParams::audioBufferSize(void)const
|
||||
{
|
||||
return CAPTUREPARMS::dwAudioBufferSize;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::audioBufferSize(DWORD audioBufferSize)
|
||||
{
|
||||
CAPTUREPARMS::dwAudioBufferSize=audioBufferSize;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD CaptureParams::disableWriteCache(void)const
|
||||
{
|
||||
return CAPTUREPARMS::fDisableWriteCache;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::disableWriteCache(WORD disableWriteCache)
|
||||
{
|
||||
CAPTUREPARMS::fDisableWriteCache=disableWriteCache;
|
||||
}
|
||||
|
||||
inline
|
||||
UINT CaptureParams::streamMaster(void)const
|
||||
{
|
||||
return CAPTUREPARMS::AVStreamMaster;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::streamMaster(UINT streamMaster)
|
||||
{
|
||||
CAPTUREPARMS::AVStreamMaster=streamMaster;
|
||||
}
|
||||
|
||||
inline
|
||||
void CaptureParams::setZero(void)
|
||||
{
|
||||
::memset((char*)&((CAPTUREPARMS&)*this),0,sizeof(CAPTUREPARMS));
|
||||
}
|
||||
#endif
|
||||
|
||||
329
vidcap/CAPSTAT.HPP
Normal file
329
vidcap/CAPSTAT.HPP
Normal file
@@ -0,0 +1,329 @@
|
||||
#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
|
||||
|
||||
271
vidcap/DRVCAPS.HPP
Normal file
271
vidcap/DRVCAPS.HPP
Normal file
@@ -0,0 +1,271 @@
|
||||
#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
|
||||
|
||||
|
||||
89
vidcap/DRVINFO.HPP
Normal file
89
vidcap/DRVINFO.HPP
Normal file
@@ -0,0 +1,89 @@
|
||||
#ifndef _VIDCAP_DRVINFO_HPP_
|
||||
#define _VIDCAP_DRVINFO_HPP_
|
||||
#ifndef _COMMON_STRING_HPP_
|
||||
#include <common/string.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_BLOCK_HPP_
|
||||
#include <common/block.hpp>
|
||||
#endif
|
||||
|
||||
class DriverInfo
|
||||
{
|
||||
public:
|
||||
DriverInfo(void);
|
||||
DriverInfo(const String &nameString,const String &versionString);
|
||||
DriverInfo(const DriverInfo &someDriverInfo);
|
||||
virtual ~DriverInfo();
|
||||
DriverInfo &operator=(const DriverInfo &someDriverInfo);
|
||||
WORD operator==(const DriverInfo &someDriverInfo)const;
|
||||
void driverName(const String &driverName);
|
||||
String driverName(void)const;
|
||||
void driverVersion(const String &driverVersion);
|
||||
String driverVersion(void)const;
|
||||
private:
|
||||
String mDriverName;
|
||||
String mDriverVersion;
|
||||
};
|
||||
|
||||
inline
|
||||
DriverInfo::DriverInfo(void)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
DriverInfo::DriverInfo(const String &nameString,const String &versionString)
|
||||
{
|
||||
driverName(nameString);
|
||||
driverVersion(versionString);
|
||||
}
|
||||
|
||||
inline
|
||||
DriverInfo::DriverInfo(const DriverInfo &someDriverInfo)
|
||||
{
|
||||
*this=someDriverInfo;
|
||||
}
|
||||
|
||||
inline
|
||||
DriverInfo::~DriverInfo()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
DriverInfo &DriverInfo::operator=(const DriverInfo &someDriverInfo)
|
||||
{
|
||||
driverName(someDriverInfo.driverName());
|
||||
driverVersion(someDriverInfo.driverVersion());
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD DriverInfo::operator==(const DriverInfo &someDriverInfo)const
|
||||
{
|
||||
return (driverName()==someDriverInfo.driverName()&&
|
||||
driverVersion()==someDriverInfo.driverVersion());
|
||||
}
|
||||
|
||||
inline
|
||||
void DriverInfo::driverName(const String &driverName)
|
||||
{
|
||||
mDriverName=driverName;
|
||||
}
|
||||
|
||||
inline
|
||||
String DriverInfo::driverName(void)const
|
||||
{
|
||||
return mDriverName;
|
||||
}
|
||||
|
||||
inline
|
||||
void DriverInfo::driverVersion(const String &driverVersion)
|
||||
{
|
||||
mDriverVersion=driverVersion;
|
||||
}
|
||||
|
||||
inline
|
||||
String DriverInfo::driverVersion(void)const
|
||||
{
|
||||
return mDriverVersion;
|
||||
}
|
||||
#endif
|
||||
BIN
vidcap/Debug/BMPCAP.obj
Normal file
BIN
vidcap/Debug/BMPCAP.obj
Normal file
Binary file not shown.
BIN
vidcap/Debug/VIDCAP.obj
Normal file
BIN
vidcap/Debug/VIDCAP.obj
Normal file
Binary file not shown.
BIN
vidcap/Debug/VidReg.obj
Normal file
BIN
vidcap/Debug/VidReg.obj
Normal file
Binary file not shown.
BIN
vidcap/Debug/vc60.idb
Normal file
BIN
vidcap/Debug/vc60.idb
Normal file
Binary file not shown.
BIN
vidcap/Debug/vc60.pdb
Normal file
BIN
vidcap/Debug/vc60.pdb
Normal file
Binary file not shown.
BIN
vidcap/Debug/vidcaplib.lib
Normal file
BIN
vidcap/Debug/vidcaplib.lib
Normal file
Binary file not shown.
BIN
vidcap/Debug/vidcaplib.pch
Normal file
BIN
vidcap/Debug/vidcaplib.pch
Normal file
Binary file not shown.
9
vidcap/MAIN.CPP
Normal file
9
vidcap/MAIN.CPP
Normal file
@@ -0,0 +1,9 @@
|
||||
#include <common/windows.hpp>
|
||||
#include <vidcap/mainwnd.hpp>
|
||||
|
||||
int PASCAL WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR /*lpszCmdLine*/,int nCmdShow)
|
||||
{
|
||||
MainWindow applicationWindow(hInstance);
|
||||
return applicationWindow.messageLoop();
|
||||
}
|
||||
|
||||
65
vidcap/MAIN.HPP
Normal file
65
vidcap/MAIN.HPP
Normal file
@@ -0,0 +1,65 @@
|
||||
#ifndef _VIDCAP_MAIN_HPP_
|
||||
#define _VIDCAP_MAIN_HPP_
|
||||
#include <common/windows.hpp>
|
||||
|
||||
class Main
|
||||
{
|
||||
public:
|
||||
static HINSTANCE processInstance(HWND hWnd);
|
||||
static HINSTANCE processInstance(void);
|
||||
static HINSTANCE previousProcessInstance(void);
|
||||
static void processInstance(HINSTANCE processInstance);
|
||||
static void previousProcessInstance(HINSTANCE previousProcessInstance);
|
||||
static void cmdShow(int nCmdShow);
|
||||
private:
|
||||
static HINSTANCE smhInstance;
|
||||
static HINSTANCE smhPrevInstance;
|
||||
static int smnCmdShow;
|
||||
};
|
||||
|
||||
inline
|
||||
void Main::processInstance(HINSTANCE hProcessInstance)
|
||||
{
|
||||
smhInstance=hProcessInstance;
|
||||
}
|
||||
|
||||
inline
|
||||
void Main::previousProcessInstance(HINSTANCE previousProcessInstance)
|
||||
{
|
||||
smhPrevInstance=previousProcessInstance;
|
||||
}
|
||||
|
||||
inline
|
||||
void Main::cmdShow(int nCmdShow)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
HINSTANCE Main::processInstance(void)
|
||||
{
|
||||
return smhInstance;
|
||||
}
|
||||
|
||||
inline
|
||||
HINSTANCE Main::previousProcessInstance(void)
|
||||
{
|
||||
return smhPrevInstance;
|
||||
}
|
||||
|
||||
#if defined(__FLAT__)
|
||||
inline
|
||||
HINSTANCE Main::processInstance(HWND hWnd)
|
||||
{
|
||||
return (HINSTANCE)::GetWindowLong(hWnd,GWL_HINSTANCE);
|
||||
}
|
||||
#else
|
||||
inline
|
||||
HINSTANCE Main::processInstance(HWND hWnd)
|
||||
{
|
||||
return (HINSTANCE)::GetWindowWord(hWnd,GWW_HINSTANCE);
|
||||
}
|
||||
#endif
|
||||
#define WM_REACTIVATE WM_USER+1
|
||||
#endif
|
||||
|
||||
|
||||
246
vidcap/MAINWND.CPP
Normal file
246
vidcap/MAINWND.CPP
Normal file
@@ -0,0 +1,246 @@
|
||||
#include <vidcap/mainwnd.hpp>
|
||||
#include <vidcap/rsrc.hpp>
|
||||
#include <vidcap/entrydlg.hpp>
|
||||
#include <vidcap/srcdlg.hpp>
|
||||
#include <vidcap/vidreg.hpp>
|
||||
#include <common/assert.hpp>
|
||||
#include <common/profile.hpp>
|
||||
|
||||
char MainWindow::szClassName[]="Video Capture";
|
||||
char MainWindow::szMenuName[]="CAPMENU";
|
||||
|
||||
MainWindow::MainWindow(HINSTANCE hInstance)
|
||||
: mPaintHandler(this,&MainWindow::paintHandler),
|
||||
mDestroyHandler(this,&MainWindow::destroyHandler),
|
||||
mCommandHandler(this,&MainWindow::commandHandler),
|
||||
mKeyDownHandler(this,&MainWindow::keyDownHandler),
|
||||
mSizeHandler(this,&MainWindow::sizeHandler),
|
||||
mCreateHandler(this,&MainWindow::createHandler),
|
||||
mTimerHandler(this,&MainWindow::timerHandler),
|
||||
mhInstance(hInstance)
|
||||
{
|
||||
insertHandlers();
|
||||
registerClass();
|
||||
::CreateWindow(szClassName,szClassName,
|
||||
WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_DLGFRAME|WS_CLIPCHILDREN|WS_SIZEBOX,
|
||||
CW_USEDEFAULT,CW_USEDEFAULT,
|
||||
DefaultWidth,DefaultHeight,
|
||||
NULL,NULL,mhInstance,(LPSTR)this);
|
||||
mStatusBar=new StatusBarEx(*this,StatusBarID);
|
||||
mStatusBar.disposition(PointerDisposition::Delete);
|
||||
show(SW_SHOW);
|
||||
update();
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
destroy();
|
||||
}
|
||||
|
||||
void MainWindow::insertHandlers(void)
|
||||
{
|
||||
insertHandler(VectorHandler::DestroyHandler,&mDestroyHandler);
|
||||
insertHandler(VectorHandler::PaintHandler,&mPaintHandler);
|
||||
insertHandler(VectorHandler::CommandHandler,&mCommandHandler);
|
||||
insertHandler(VectorHandler::SizeHandler,&mSizeHandler);
|
||||
insertHandler(VectorHandler::KeyDownHandler,&mKeyDownHandler);
|
||||
insertHandler(VectorHandler::CreateHandler,&mCreateHandler);
|
||||
insertHandler(VectorHandler::TimerHandler,&mTimerHandler);
|
||||
}
|
||||
|
||||
void MainWindow::removeHandlers(void)
|
||||
{
|
||||
removeHandler(VectorHandler::DestroyHandler,&mDestroyHandler);
|
||||
removeHandler(VectorHandler::PaintHandler,&mPaintHandler);
|
||||
removeHandler(VectorHandler::CommandHandler,&mCommandHandler);
|
||||
removeHandler(VectorHandler::SizeHandler,&mSizeHandler);
|
||||
removeHandler(VectorHandler::KeyDownHandler,&mKeyDownHandler);
|
||||
removeHandler(VectorHandler::CreateHandler,&mCreateHandler);
|
||||
removeHandler(VectorHandler::TimerHandler,&mTimerHandler);
|
||||
}
|
||||
|
||||
void MainWindow::registerClass(void)const
|
||||
{
|
||||
WNDCLASS wndClass;
|
||||
|
||||
if(::GetClassInfo(mhInstance,className(),(WNDCLASS FAR*)&wndClass))return;
|
||||
wndClass.style =CS_HREDRAW|CS_VREDRAW|CS_DBLCLKS|CS_OWNDC;
|
||||
wndClass.lpfnWndProc =(WNDPROC)Window::WndProc;
|
||||
wndClass.cbClsExtra =0;
|
||||
wndClass.cbWndExtra =sizeof(MainWindow*);
|
||||
wndClass.hInstance =mhInstance;
|
||||
wndClass.hIcon =::LoadIcon(NULL,IDI_APPLICATION);
|
||||
wndClass.hCursor =::LoadCursor(NULL,IDC_ARROW);
|
||||
wndClass.hbrBackground =(HBRUSH)::GetStockObject(GRAY_BRUSH);
|
||||
wndClass.lpszMenuName =szMenuName;
|
||||
wndClass.lpszClassName =szClassName;
|
||||
::RegisterClass(&wndClass);
|
||||
assert(0!=::GetClassInfo(mhInstance,className(),(WNDCLASS FAR*)&wndClass));
|
||||
}
|
||||
|
||||
CallbackData::ReturnType MainWindow::createHandler(CallbackData &/*someCallbackData*/)
|
||||
{
|
||||
mMainMenu=new PureMenu(::GetMenu(*this));
|
||||
mMainMenu.disposition(PointerDisposition::Delete);
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType MainWindow::destroyHandler(CallbackData &/*someCallbackData*/)
|
||||
{
|
||||
removeHandlers();
|
||||
::PostQuitMessage(0);
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType MainWindow::sizeHandler(CallbackData &/*someCallbackData*/)
|
||||
{
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType MainWindow::keyDownHandler(CallbackData &/*someCallbackData*/)
|
||||
{
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType MainWindow::paintHandler(CallbackData &/*someCallbackData*/)
|
||||
{
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType MainWindow::timerHandler(CallbackData &/*someCallbackData*/)
|
||||
{
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType MainWindow::commandHandler(CallbackData &someCallbackData)
|
||||
{
|
||||
switch(someCallbackData.wmCommandID())
|
||||
{
|
||||
case FILE_EXIT :
|
||||
close();
|
||||
destroy();
|
||||
break;
|
||||
case FILE_OPEN :
|
||||
handleFileOpen();
|
||||
break;
|
||||
case FILE_CLOSE :
|
||||
handleFileClose();
|
||||
break;
|
||||
case CAPMENU_OPTIONS_SAVE_FRAMES :
|
||||
handleSaveFrames();
|
||||
break;
|
||||
case CAPMENU_OPTIONS_PREVIEW :
|
||||
handlePreview();
|
||||
break;
|
||||
case CAPMENU_OPTIONS_GRABFRAME :
|
||||
mBitmapCapture->grabFrame();
|
||||
break;
|
||||
case CAPMENU_OPTIONS_GRABFRAMENOSTOP :
|
||||
mBitmapCapture->grabFrameNoStop();
|
||||
break;
|
||||
case CAPMENU_DIALOGVIDEODISPLAY :
|
||||
mBitmapCapture->dialogVideoDisplay();
|
||||
break;
|
||||
case CAPMENU_DIALOGVIDEOSOURCE :
|
||||
mBitmapCapture->dialogVideoSource();
|
||||
break;
|
||||
case CAPMENU_DIALOGVIDEOFORMAT :
|
||||
mBitmapCapture->dialogVideoFormat();
|
||||
break;
|
||||
case CAPMENU_SETTINGS :
|
||||
handleSettings();
|
||||
break;
|
||||
}
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
void MainWindow::checkDriverOptions(void)
|
||||
{
|
||||
DriverCaps driverCaps;
|
||||
|
||||
mBitmapCapture->getDriverCaps(driverCaps);
|
||||
|
||||
if(!driverCaps.hasDlgVideoDisplay())mMainMenu->checkMenuItem(CAPMENU_DIALOGVIDEODISPLAY,MF_BYCOMMAND|MF_GRAYED);
|
||||
else mMainMenu->enableMenuItem(CAPMENU_DIALOGVIDEODISPLAY,PureMenu::ByCommand,PureMenu::ItemEnabled);
|
||||
if(!driverCaps.hasDlgVideoFormat())mMainMenu->checkMenuItem(CAPMENU_DIALOGVIDEOFORMAT,MF_BYCOMMAND|MF_GRAYED);
|
||||
else mMainMenu->enableMenuItem(CAPMENU_DIALOGVIDEOFORMAT,PureMenu::ByCommand,PureMenu::ItemEnabled);
|
||||
if(!driverCaps.hasDlgVideoSource())mMainMenu->checkMenuItem(CAPMENU_DIALOGVIDEOSOURCE,MF_BYCOMMAND|MF_GRAYED);
|
||||
else mMainMenu->enableMenuItem(CAPMENU_DIALOGVIDEOSOURCE,PureMenu::ByCommand,PureMenu::ItemEnabled);
|
||||
}
|
||||
|
||||
void MainWindow::handleFileOpen(void)
|
||||
{
|
||||
LRESULT driverIndex;
|
||||
SourceDialog sourceDialog(*this);
|
||||
driverIndex=sourceDialog.perform();
|
||||
if(-1!=driverIndex)
|
||||
{
|
||||
if(mBitmapCapture.isOkay())mBitmapCapture.destroy();
|
||||
mBitmapCapture=new BmpCap(*this,driverIndex); //,vidReg.getPreviewWidth(),vidReg.getPreviewHeight(),vidReg.getCaptureWidth(),vidReg.getCaptureHeight(),vidReg.getCaptureFile());
|
||||
mBitmapCapture.disposition(PointerDisposition::Delete);
|
||||
if(!mBitmapCapture->isConnected()){::MessageBox(*this,"Failed to connect to device","Device Connect",MB_ICONSTOP);return;}
|
||||
else
|
||||
{
|
||||
mMainMenu->enableMenuItem(FILE_CLOSE,PureMenu::ByCommand,PureMenu::ItemEnabled);
|
||||
mMainMenu->enableMenuItem(CAPMENU_OPTIONS_SAVE_FRAMES,PureMenu::ByCommand,PureMenu::ItemEnabled);
|
||||
mMainMenu->checkMenuItem(CAPMENU_OPTIONS_SAVE_FRAMES,MF_BYPOSITION|MF_UNCHECKED);
|
||||
mMainMenu->enableMenuItem(CAPMENU_OPTIONS_GRABFRAME,PureMenu::ByCommand,PureMenu::ItemEnabled);
|
||||
mMainMenu->enableMenuItem(CAPMENU_OPTIONS_GRABFRAMENOSTOP,PureMenu::ByCommand,PureMenu::ItemEnabled);
|
||||
mMainMenu->enableMenuItem(CAPMENU_OPTIONS_PREVIEW,PureMenu::ByCommand,PureMenu::ItemEnabled);
|
||||
checkDriverOptions();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::handleFileClose(void)
|
||||
{
|
||||
if(mBitmapCapture.isOkay())mBitmapCapture.destroy();
|
||||
mMainMenu->enableMenuItem(FILE_CLOSE,PureMenu::ByCommand,PureMenu::InsertFlags(PureMenu::ItemDisabled|PureMenu::ItemGrayed));
|
||||
mMainMenu->enableMenuItem(CAPMENU_DIALOGVIDEODISPLAY,PureMenu::ByCommand,PureMenu::InsertFlags(PureMenu::ItemDisabled|PureMenu::ItemGrayed));
|
||||
mMainMenu->enableMenuItem(CAPMENU_DIALOGVIDEOFORMAT,PureMenu::ByCommand,PureMenu::InsertFlags(PureMenu::ItemDisabled|PureMenu::ItemGrayed));
|
||||
mMainMenu->enableMenuItem(CAPMENU_DIALOGVIDEOSOURCE,PureMenu::ByCommand,PureMenu::InsertFlags(PureMenu::ItemDisabled|PureMenu::ItemGrayed));
|
||||
mMainMenu->enableMenuItem(CAPMENU_OPTIONS_SAVE_FRAMES,PureMenu::ByCommand,PureMenu::InsertFlags(PureMenu::ItemDisabled|PureMenu::ItemGrayed));
|
||||
mMainMenu->checkMenuItem(CAPMENU_OPTIONS_SAVE_FRAMES,MF_BYCOMMAND|MF_UNCHECKED);
|
||||
mMainMenu->enableMenuItem(CAPMENU_OPTIONS_GRABFRAME,PureMenu::ByCommand,PureMenu::InsertFlags(PureMenu::ItemDisabled|PureMenu::ItemGrayed));
|
||||
mMainMenu->enableMenuItem(CAPMENU_OPTIONS_GRABFRAMENOSTOP,PureMenu::ByCommand,PureMenu::InsertFlags(PureMenu::ItemDisabled|PureMenu::ItemGrayed));
|
||||
mMainMenu->enableMenuItem(CAPMENU_OPTIONS_PREVIEW,PureMenu::ByCommand,PureMenu::InsertFlags(PureMenu::ItemDisabled|PureMenu::ItemGrayed));
|
||||
mMainMenu->checkMenuItem(CAPMENU_OPTIONS_PREVIEW,MF_BYCOMMAND|MF_UNCHECKED);
|
||||
}
|
||||
|
||||
void MainWindow::handleSaveFrames(void)
|
||||
{
|
||||
if(!mBitmapCapture->isConnected())return;
|
||||
if(MF_CHECKED==mMainMenu->getMenuState(CAPMENU_OPTIONS_SAVE_FRAMES,PureMenu::ByCommand))
|
||||
{
|
||||
mBitmapCapture->saveFrames(false);
|
||||
mMainMenu->checkMenuItem(CAPMENU_OPTIONS_SAVE_FRAMES,MF_BYCOMMAND|MF_UNCHECKED);
|
||||
}
|
||||
else
|
||||
{
|
||||
mBitmapCapture->saveFrames(true);
|
||||
mMainMenu->checkMenuItem(CAPMENU_OPTIONS_SAVE_FRAMES,MF_BYCOMMAND|MF_CHECKED);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::handlePreview(void)
|
||||
{
|
||||
if(!mBitmapCapture->isConnected())return;
|
||||
if(MF_CHECKED==mMainMenu->getMenuState(CAPMENU_OPTIONS_PREVIEW,PureMenu::ByCommand))
|
||||
{
|
||||
mMainMenu->checkMenuItem(CAPMENU_OPTIONS_PREVIEW,MF_BYCOMMAND|MF_UNCHECKED);
|
||||
mBitmapCapture->preview(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
VidReg vidReg;
|
||||
mMainMenu->checkMenuItem(CAPMENU_OPTIONS_PREVIEW,MF_BYCOMMAND|MF_CHECKED);
|
||||
mBitmapCapture->setPreviewRate(vidReg.getPreviewRate());
|
||||
mBitmapCapture->preview(true);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::handleSettings()
|
||||
{
|
||||
EntryDialog entryDialog(*this);
|
||||
entryDialog.perform();
|
||||
}
|
||||
77
vidcap/MAINWND.HPP
Normal file
77
vidcap/MAINWND.HPP
Normal file
@@ -0,0 +1,77 @@
|
||||
#ifndef _VIDCAP_MAINWINDOW_HPP_
|
||||
#define _VIDCAP_MAINWINDOW_HPP_
|
||||
#ifndef _COMMON_WINDOW_HPP_
|
||||
#include <common/window.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_STRING_HPP_
|
||||
#include <common/string.hpp>
|
||||
#endif
|
||||
|
||||
#ifndef _VIDCAP_BMPCAP_HPP_
|
||||
#include <vidcap/bmpcap.hpp>
|
||||
#endif
|
||||
|
||||
#ifndef _COMMON_AVICAP_HPP_
|
||||
#include <common/avicap.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_SMARTPOINTER_HPP_
|
||||
#include <common/pointer.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_PUREMENU_HPP_
|
||||
#include <common/puremenu.hpp>
|
||||
#endif
|
||||
#ifndef _STATBAR_STATUSBAREX_HPP_
|
||||
#include <statbar/statbarx.hpp>
|
||||
#endif
|
||||
|
||||
class MainWindow : public Window
|
||||
{
|
||||
public:
|
||||
MainWindow(HINSTANCE hInstance);
|
||||
virtual ~MainWindow();
|
||||
static String className(void);
|
||||
private:
|
||||
enum{StatusBarID=101};
|
||||
enum{DefaultWidth=640,DefaultHeight=480};
|
||||
void registerClass(void)const;
|
||||
void insertHandlers(void);
|
||||
void removeHandlers(void);
|
||||
void createPropertySheet(void);
|
||||
void checkDriverOptions(void);
|
||||
|
||||
CallbackData::ReturnType paintHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType destroyHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType commandHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType keyDownHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType sizeHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType timerHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType createHandler(CallbackData &someCallbackData);
|
||||
void handleFileOpen(void);
|
||||
void handleFileClose(void);
|
||||
void handlePreview(void);
|
||||
void handleSaveFrames(void);
|
||||
void handleSettings(void);
|
||||
|
||||
Callback<MainWindow> mPaintHandler;
|
||||
Callback<MainWindow> mDestroyHandler;
|
||||
Callback<MainWindow> mCommandHandler;
|
||||
Callback<MainWindow> mKeyDownHandler;
|
||||
Callback<MainWindow> mSizeHandler;
|
||||
Callback<MainWindow> mTimerHandler;
|
||||
Callback<MainWindow> mCreateHandler;
|
||||
static char szClassName[];
|
||||
static char szMenuName[];
|
||||
HINSTANCE mhInstance;
|
||||
SmartPointer<BmpCap> mBitmapCapture;
|
||||
SmartPointer<PureMenu> mMainMenu;
|
||||
SmartPointer<StatusBarEx> mStatusBar;
|
||||
};
|
||||
|
||||
inline
|
||||
String MainWindow::className(void)
|
||||
{
|
||||
return String(szClassName);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
28
vidcap/RSRC.H
Normal file
28
vidcap/RSRC.H
Normal file
@@ -0,0 +1,28 @@
|
||||
#define FILE_EXIT 200
|
||||
#define FILE_OPEN 201
|
||||
#define FILE_CLOSE 202
|
||||
|
||||
#define SOURCE_LIST 1000
|
||||
|
||||
#define CAPMENU_DIALOGVIDEODISPLAY 101
|
||||
#define CAPMENU_DIALOGVIDEOSOURCE 102
|
||||
#define CAPMENU_DIALOGVIDEOFORMAT 103
|
||||
|
||||
#define CAPMENU_OPTIONS_GRABFRAME 107
|
||||
#define CAPMENU_OPTIONS_GRABFRAMENOSTOP 108
|
||||
#define CAPMENU_OPTIONS_PREVIEW 109
|
||||
#define CAPMENU_SETTINGS 110
|
||||
#define CAPMENU_OPTIONS_SAVE_FRAMES 111
|
||||
|
||||
|
||||
#define SETTINGS_BROWSE 101
|
||||
#define SETTINGS_USESEQUENCING 102
|
||||
#define SETTINGS_CAPTUREFILE 103
|
||||
#define SETTINGS_CAPTURE_320x240 104
|
||||
#define SETTINGS_CAPTURE_640x480 105
|
||||
#define SETTINGS_PREVIEW_320x240 106
|
||||
#define SETTINGS_PREVIEW_640x480 107
|
||||
#define SETTINGS_PREVIEW_RATE 108
|
||||
|
||||
|
||||
|
||||
4
vidcap/RSRC.HPP
Normal file
4
vidcap/RSRC.HPP
Normal file
@@ -0,0 +1,4 @@
|
||||
#ifndef _VIDCAP_RSRC_HPP_
|
||||
#define _VIDCAP_RSRC_HPP_
|
||||
#include <vidcap/rsrc.h>
|
||||
#endif
|
||||
209
vidcap/SCRAPS.TXT
Normal file
209
vidcap/SCRAPS.TXT
Normal file
@@ -0,0 +1,209 @@
|
||||
#define capSetCallbackOnError(hwnd, fpProc) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_CALLBACK_ERROR, 0, (LPARAM)(LPVOID)(fpProc)))
|
||||
#define capSetCallbackOnStatus(hwnd, fpProc) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_CALLBACK_STATUS, 0, (LPARAM)(LPVOID)(fpProc)))
|
||||
#define capSetCallbackOnYield(hwnd, fpProc) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_CALLBACK_YIELD, 0, (LPARAM)(LPVOID)(fpProc)))
|
||||
#define capSetCallbackOnFrame(hwnd, fpProc) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_CALLBACK_FRAME, 0, (LPARAM)(LPVOID)(fpProc)))
|
||||
#define capSetCallbackOnVideoStream(hwnd, fpProc) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_CALLBACK_VIDEOSTREAM, 0, (LPARAM)(LPVOID)(fpProc)))
|
||||
#define capSetCallbackOnWaveStream(hwnd, fpProc) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_CALLBACK_WAVESTREAM, 0, (LPARAM)(LPVOID)(fpProc)))
|
||||
#define capSetCallbackOnCapControl(hwnd, fpProc) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_CALLBACK_CAPCONTROL, 0, (LPARAM)(LPVOID)(fpProc)))
|
||||
|
||||
#define capSetUserData(hwnd, lUser) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_USER_DATA, 0, (LPARAM)lUser))
|
||||
#define capGetUserData(hwnd) (AVICapSM(hwnd, WM_CAP_GET_USER_DATA, 0, 0))
|
||||
|
||||
#define capDriverConnect(hwnd, i) ((BOOL)AVICapSM(hwnd, WM_CAP_DRIVER_CONNECT, (WPARAM)(i), 0L))
|
||||
#define capDriverDisconnect(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_DRIVER_DISCONNECT, (WPARAM)0, 0L))
|
||||
#define capDriverGetName(hwnd, szName, wSize) ((BOOL)AVICapSM(hwnd, WM_CAP_DRIVER_GET_NAME, (WPARAM)(wSize), (LPARAM)(LPVOID)(LPTSTR)(szName)))
|
||||
#define capDriverGetVersion(hwnd, szVer, wSize) ((BOOL)AVICapSM(hwnd, WM_CAP_DRIVER_GET_VERSION, (WPARAM)(wSize), (LPARAM)(LPVOID)(LPTSTR)(szVer)))
|
||||
#define capDriverGetCaps(hwnd, s, wSize) ((BOOL)AVICapSM(hwnd, WM_CAP_DRIVER_GET_CAPS, (WPARAM)(wSize), (LPARAM)(LPVOID)(LPCAPDRIVERCAPS)(s)))
|
||||
|
||||
#define capFileSetCaptureFile(hwnd, szName) ((BOOL)AVICapSM(hwnd, WM_CAP_FILE_SET_CAPTURE_FILE, 0, (LPARAM)(LPVOID)(LPTSTR)(szName)))
|
||||
#define capFileGetCaptureFile(hwnd, szName, wSize) ((BOOL)AVICapSM(hwnd, WM_CAP_FILE_GET_CAPTURE_FILE, (WPARAM)(wSize), (LPARAM)(LPVOID)(LPTSTR)(szName)))
|
||||
#define capFileAlloc(hwnd, dwSize) ((BOOL)AVICapSM(hwnd, WM_CAP_FILE_ALLOCATE, 0, (LPARAM)(DWORD)(dwSize)))
|
||||
#define capFileSaveAs(hwnd, szName) ((BOOL)AVICapSM(hwnd, WM_CAP_FILE_SAVEAS, 0, (LPARAM)(LPVOID)(LPTSTR)(szName)))
|
||||
#define capFileSetInfoChunk(hwnd, lpInfoChunk) ((BOOL)AVICapSM(hwnd, WM_CAP_FILE_SET_INFOCHUNK, (WPARAM)0, (LPARAM)(LPCAPINFOCHUNK)(lpInfoChunk)))
|
||||
#define capFileSaveDIB(hwnd, szName) ((BOOL)AVICapSM(hwnd, WM_CAP_FILE_SAVEDIB, 0, (LPARAM)(LPVOID)(LPTSTR)(szName)))
|
||||
|
||||
#define capEditCopy(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_EDIT_COPY, 0, 0L))
|
||||
|
||||
#define capSetAudioFormat(hwnd, s, wSize) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_AUDIOFORMAT, (WPARAM)(wSize), (LPARAM)(LPVOID)(LPWAVEFORMATEX)(s)))
|
||||
#define capGetAudioFormat(hwnd, s, wSize) ((DWORD)AVICapSM(hwnd, WM_CAP_GET_AUDIOFORMAT, (WPARAM)(wSize), (LPARAM)(LPVOID)(LPWAVEFORMATEX)(s)))
|
||||
#define capGetAudioFormatSize(hwnd) ((DWORD)AVICapSM(hwnd, WM_CAP_GET_AUDIOFORMAT, (WPARAM)0, (LPARAM)0L))
|
||||
|
||||
#define capDlgVideoFormat(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_DLG_VIDEOFORMAT, 0, 0L))
|
||||
#define capDlgVideoSource(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_DLG_VIDEOSOURCE, 0, 0L))
|
||||
#define capDlgVideoDisplay(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_DLG_VIDEODISPLAY, 0, 0L))
|
||||
#define capDlgVideoCompression(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_DLG_VIDEOCOMPRESSION, 0, 0L))
|
||||
|
||||
#define capGetVideoFormat(hwnd, s, wSize) ((DWORD)AVICapSM(hwnd, WM_CAP_GET_VIDEOFORMAT, (WPARAM)(wSize), (LPARAM)(LPVOID)(s)))
|
||||
#define capGetVideoFormatSize(hwnd) ((DWORD)AVICapSM(hwnd, WM_CAP_GET_VIDEOFORMAT, 0, 0L))
|
||||
#define capSetVideoFormat(hwnd, s, wSize) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_VIDEOFORMAT, (WPARAM)(wSize), (LPARAM)(LPVOID)(s)))
|
||||
|
||||
|
||||
#define capOverlay(hwnd, f) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_OVERLAY, (WPARAM)(BOOL)(f), 0L))
|
||||
#define capPreviewScale(hwnd, f) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_SCALE, (WPARAM)(BOOL)f, 0L))
|
||||
#define capGetStatus(hwnd, s, wSize) ((BOOL)AVICapSM(hwnd, WM_CAP_GET_STATUS, (WPARAM)(wSize), (LPARAM)(LPVOID)(LPCAPSTATUS)(s)))
|
||||
#define capSetScrollPos(hwnd, lpP) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_SCROLL, (WPARAM)0, (LPARAM)(LPPOINT)(lpP)))
|
||||
|
||||
#define capGrabFrame(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_GRAB_FRAME, (WPARAM)0, (LPARAM)0L))
|
||||
#define capGrabFrameNoStop(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_GRAB_FRAME_NOSTOP, (WPARAM)0, (LPARAM)0L))
|
||||
|
||||
#define capCaptureSequence(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_SEQUENCE, (WPARAM)0, (LPARAM)0L))
|
||||
#define capCaptureSequenceNoFile(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_SEQUENCE_NOFILE, (WPARAM)0, (LPARAM)0L))
|
||||
#define capCaptureStop(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_STOP, (WPARAM)0, (LPARAM)0L))
|
||||
#define capCaptureAbort(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_ABORT, (WPARAM)0, (LPARAM)0L))
|
||||
|
||||
#define capCaptureSingleFrameOpen(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_SINGLE_FRAME_OPEN, (WPARAM)0, (LPARAM)0L))
|
||||
#define capCaptureSingleFrameClose(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_SINGLE_FRAME_CLOSE, (WPARAM)0, (LPARAM)0L))
|
||||
#define capCaptureSingleFrame(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_SINGLE_FRAME, (WPARAM)0, (LPARAM)0L))
|
||||
|
||||
#define capCaptureGetSetup(hwnd, s, wSize) ((BOOL)AVICapSM(hwnd, WM_CAP_GET_SEQUENCE_SETUP, (WPARAM)(wSize), (LPARAM)(LPVOID)(LPCAPTUREPARMS)(s)))
|
||||
#define capCaptureSetSetup(hwnd, s, wSize) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_SEQUENCE_SETUP, (WPARAM)(wSize), (LPARAM)(LPVOID)(LPCAPTUREPARMS)(s)))
|
||||
|
||||
#define capSetMCIDeviceName(hwnd, szName) ((BOOL)AVICapSM(hwnd, WM_CAP_SET_MCI_DEVICE, 0, (LPARAM)(LPVOID)(LPTSTR)(szName)))
|
||||
#define capGetMCIDeviceName(hwnd, szName, wSize) ((BOOL)AVICapSM(hwnd, WM_CAP_GET_MCI_DEVICE, (WPARAM)(wSize), (LPARAM)(LPVOID)(LPTSTR)(szName)))
|
||||
|
||||
#define capPaletteOpen(hwnd, szName) ((BOOL)AVICapSM(hwnd, WM_CAP_PAL_OPEN, 0, (LPARAM)(LPVOID)(LPTSTR)(szName)))
|
||||
#define capPaletteSave(hwnd, szName) ((BOOL)AVICapSM(hwnd, WM_CAP_PAL_SAVE, 0, (LPARAM)(LPVOID)(LPTSTR)(szName)))
|
||||
#define capPalettePaste(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_PAL_PASTE, (WPARAM) 0, (LPARAM)0L))
|
||||
#define capPaletteAuto(hwnd, iFrames, iColors) ((BOOL)AVICapSM(hwnd, WM_CAP_PAL_AUTOCREATE, (WPARAM)(iFrames), (LPARAM)(DWORD)(iColors)))
|
||||
#define capPaletteManual(hwnd, fGrab, iColors) ((BOOL)AVICapSM(hwnd, WM_CAP_PAL_MANUALCREATE, (WPARAM)(fGrab), (LPARAM)(DWORD)(iColors)))
|
||||
|
||||
|
||||
#if 0
|
||||
if(mhCaptureWnd)
|
||||
{
|
||||
::SendMessage(mhCaptureWnd,WM_CAP_STOP,0,0L);
|
||||
::SendMessage(mhCaptureWnd,WM_CAP_DRIVER_DISCONNECT,0,0L);
|
||||
::DestroyWindow(mhCaptureWnd);
|
||||
}
|
||||
mhCaptureWnd=capCreateCaptureWindow("My Capture Window",WS_CHILD|WS_VISIBLE,0,0,160,120,*this,101);
|
||||
::SendMessage(mhCaptureWnd,WM_CAP_DRIVER_CONNECT,0,0L);
|
||||
::SendMessage(mhCaptureWnd,WM_CAP_SEQUENCE_NOFILE,0,0L);
|
||||
::SendMessage(mhCaptureWnd,WM_CAP_SEQUENCE,0,0L);
|
||||
|
||||
#define capGrabFrame(hwnd) ((BOOL)AVICapSM(hwnd, WM_CAP_GRAB_FRAME, (WPARAM)0, (LPARAM)0L))
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if 0
|
||||
BITMAPINFOHEADER bitmapInfoHeader;
|
||||
bitmapInfoHeader.biSize = sizeof(BITMAPINFOHEADER);
|
||||
bitmapInfoHeader.biCompression = BI_RGB;
|
||||
bitmapInfoHeader.biWidth = 160;
|
||||
bitmapInfoHeader.biHeight = 120;
|
||||
bitmapInfoHeader.biPlanes = 1;
|
||||
bitmapInfoHeader.biBitCount = 8;
|
||||
bitmapInfoHeader.biSizeImage = bitmapInfoHeader.biWidth * bitmapInfoHeader.biHeight *
|
||||
bitmapInfoHeader.biPlanes * bitmapInfoHeader.biBitCount / 8;
|
||||
bitmapInfoHeader.biXPelsPerMeter = 0;
|
||||
bitmapInfoHeader.biYPelsPerMeter = 0;
|
||||
bitmapInfoHeader.biClrUsed = 0;
|
||||
bitmapInfoHeader.biClrImportant = 0;
|
||||
return ::SendMessage(mhCaptureWnd,WM_CAP_SET_VIDEOFORMAT,(WPARAM)sizeof(BITMAPINFOHEADER),(LPARAM)&bitmapInfoHeader);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BmpCap::BmpCap(HWND hParentWnd)
|
||||
: mSequence(0)
|
||||
{
|
||||
ICMOpen icmOpen;
|
||||
create(hParentWnd,320,200);
|
||||
connect(0);
|
||||
getVideoFormat(mBitmapInfo);
|
||||
if(!mVideoCodec.openDriver(mBitmapInfo.compression()))::OutputDebugString("Failed to open decompressor\n");
|
||||
icmOpen.fccType(CFOURCC("vidc"));
|
||||
icmOpen.fccHandler(mBitmapInfo.compression());
|
||||
icmOpen.flags(ICMOpen::DeCompress);
|
||||
icmOpen.version(0);
|
||||
if(!mVideoCodec.driverProc(icmOpen)){::OutputDebugString("ICMOpen failed\n");return;};
|
||||
// if(!mVideoCodec.driverLoad())::OutputDebugString("Failed to load driver\n");
|
||||
if(!mVideoCodec.driverEnable(true)){::OutputDebugString("DriverEnable failed\n");return;}
|
||||
getVideoFormat(mBitmapInfo);
|
||||
// setPreviewRate(500);
|
||||
// preview(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
STRING_OPTIONS "OPTIONS"
|
||||
STRING_RATE "RATE"
|
||||
STRING_SAVE "SAVE"
|
||||
STRING_SITES "SITES"
|
||||
STRING_NAME "NAME"
|
||||
STRING_USER "USER"
|
||||
STRING_PASSWORD "PASSWORD"
|
||||
STRING_DIRECTORY "DIRECTORY"
|
||||
STRING_INIFILENAME "BMPCAP.INI"
|
||||
STRING_UNSET "UNSET"
|
||||
STRING_DEFAULTRATE "50"
|
||||
END
|
||||
|
||||
|
||||
#define STRING_OPTIONS 101
|
||||
#define STRING_RATE 102
|
||||
#define STRING_SAVE 103
|
||||
#define STRING_SITES 104
|
||||
#define STRING_NAME 105
|
||||
#define STRING_USER 106
|
||||
#define STRING_PASSWORD 107
|
||||
#define STRING_DIRECTORY 108
|
||||
#define STRING_INIFILENAME 109
|
||||
#define STRING_UNSET 110
|
||||
#define STRING_DEFAULTRATE 111
|
||||
#define STRING_DEFAULTSAVEFILE 112
|
||||
|
||||
|
||||
|
||||
void BmpCap::frameHandler(VIDEOHDR &videoHeader)
|
||||
{
|
||||
if(!saveFrames())return;
|
||||
MovieData movieData(MovieData::DIBCompressed);
|
||||
MovieData dstMovieData;
|
||||
DiskInfo diskInfo;
|
||||
String srcPathFileName;
|
||||
String dstPathFileName;
|
||||
String dstPathFileTempName;
|
||||
String strTime;
|
||||
SystemTime systemTime;
|
||||
|
||||
strTime.reserve(512);
|
||||
// srcPathFileName.reserve(1024);
|
||||
::sprintf(strTime,"%04d%02d%02d%02d%02d%02d%02d",
|
||||
systemTime.year(),systemTime.month(),systemTime.day(),
|
||||
systemTime.hour(),systemTime.minute(),systemTime.second(),
|
||||
systemTime.milliseconds());
|
||||
// ::sprintf(srcPathFileName,"%04d%02d%02d%02d%02d%02d%02d.BMP",
|
||||
// systemTime.year(),systemTime.month(),systemTime.day(),
|
||||
// systemTime.hour(),systemTime.minute(),systemTime.second(),
|
||||
// systemTime.milliseconds());
|
||||
srcPathFileName=strTime+".bmp";
|
||||
dstPathFileTempName=strTime+"tmp.jpg";
|
||||
if(mUseSequence)dstPathFileName=mCaptureFile.betweenString(0,'.')+String().fromInt(mSequence++)+String(".jpg");
|
||||
else dstPathFileName=mCaptureFile;
|
||||
movieData.size(videoHeader.dwBufferLength);
|
||||
::memcpy((BYTE*)&movieData[0],videoHeader.lpData,videoHeader.dwBufferLength);
|
||||
if(!mVideoCodec.getFormat(mBitmapInfo,mDstBitmapInfo))return;
|
||||
mDstBitmapInfo.width(mCaptureWidth);
|
||||
mDstBitmapInfo.height(mCaptureHeight);
|
||||
if(!mVideoCodec.decompressFrame(mBitmapInfo,mDstBitmapInfo,movieData,dstMovieData))
|
||||
{
|
||||
if(!mVideoCodec.decompressFrame(mBitmapInfo,movieData,dstMovieData))return;
|
||||
if(!mVideoCodec.getFormat(mBitmapInfo,mDstBitmapInfo))return;
|
||||
}
|
||||
Bitmap frameBitmap(srcPathFileName,mDstBitmapInfo,dstMovieData);
|
||||
if(BitmapInfo::Bit8==mDstBitmapInfo.bitCount())
|
||||
{
|
||||
PurePalette purePalette(mCaptureStatus.currentPalette());
|
||||
frameBitmap.setPalette(purePalette.getPalette(),FALSE);
|
||||
}
|
||||
frameBitmap.saveBitmap();
|
||||
// ImageConverter::convert(srcPathFileName,dstPathFileName,mQuality);
|
||||
ImageConverter::convert(srcPathFileName,dstPathFileTempName,mQuality);
|
||||
diskInfo.rename(dstPathFileTempName,dstPathFileName);
|
||||
diskInfo.unlink(srcPathFileName);
|
||||
}
|
||||
25
vidcap/STDTMPL.CPP
Normal file
25
vidcap/STDTMPL.CPP
Normal file
@@ -0,0 +1,25 @@
|
||||
#define _EXPAND_VECTOR_TEMPLATES_
|
||||
#define _EXPAND_BLOCK_TEMPLATES_
|
||||
#include <common/point.hpp>
|
||||
#include <common/rgbcolor.hpp>
|
||||
#include <common/pvector.hpp>
|
||||
#include <common/pvector.tpp>
|
||||
#include <common/callback.hpp>
|
||||
#include <common/callback.tpp>
|
||||
#include <common/block.hpp>
|
||||
#include <common/block.tpp>
|
||||
#include <common/qsort.hpp>
|
||||
#include <common/qsort.tpp>
|
||||
#include <common/string.hpp>
|
||||
#include <common/filemap.hpp>
|
||||
#include <common/progress.hpp>
|
||||
#include <common/gdata.hpp>
|
||||
#include <common/gdata.tpp>
|
||||
#include <vidcap/mainwnd.hpp>
|
||||
#include <vidcap/drvinfo.hpp>
|
||||
|
||||
typedef Callback<MainWindow> a;
|
||||
typedef PureVector<Point> b;
|
||||
typedef GlobalData<BYTE> h;
|
||||
typedef Block<DriverInfo> i;
|
||||
|
||||
214
vidcap/VIDCAP.CPP
Normal file
214
vidcap/VIDCAP.CPP
Normal file
@@ -0,0 +1,214 @@
|
||||
#include <vidcap/vidcap.hpp>
|
||||
|
||||
VidCap::VidCap()
|
||||
: mIsConnected(false), mhCaptureWnd(0), mhParentWnd(0)
|
||||
{
|
||||
}
|
||||
|
||||
VidCap::~VidCap()
|
||||
{
|
||||
destroy();
|
||||
}
|
||||
|
||||
void VidCap::disconnect(void)
|
||||
{
|
||||
if(!isOkay()||!isConnected())return;
|
||||
::SendMessage(mhCaptureWnd,WM_CAP_STOP,0,0L);
|
||||
::SendMessage(mhCaptureWnd,WM_CAP_DRIVER_DISCONNECT,0,0L);
|
||||
isConnected(false);
|
||||
}
|
||||
|
||||
|
||||
bool VidCap::create(HWND hParentWnd,DWORD width,DWORD height)
|
||||
{
|
||||
mhParentWnd=hParentWnd;
|
||||
destroy();
|
||||
mhCaptureWnd=capCreateCaptureWindow("VIDCAP",WS_CHILD|WS_VISIBLE,0,0,width,height,hParentWnd,ControlID);
|
||||
if(0==mhCaptureWnd)return false;
|
||||
mInstanceData.setInstanceData(mhCaptureWnd,(void*)this);
|
||||
installHandlers();
|
||||
return true;
|
||||
}
|
||||
|
||||
void VidCap::destroy(void)
|
||||
{
|
||||
if(!isOkay())return;
|
||||
disconnect();
|
||||
removeHandlers();
|
||||
mInstanceData.removeInstanceData(mhCaptureWnd);
|
||||
::DestroyWindow(mhCaptureWnd);
|
||||
mhCaptureWnd=0;
|
||||
}
|
||||
|
||||
bool VidCap::connect(const String &driverName)
|
||||
{
|
||||
Block<DriverInfo> capDrivers;
|
||||
|
||||
disconnect();
|
||||
getDrivers(capDrivers);
|
||||
for(short itemIndex=0;itemIndex<capDrivers.size();itemIndex++)
|
||||
if(driverName==capDrivers[itemIndex].driverName())return connect(itemIndex);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool VidCap::connect(void)
|
||||
{
|
||||
return connect(0);
|
||||
}
|
||||
|
||||
bool VidCap::connect(WORD driverIndex)
|
||||
{
|
||||
Block<DriverInfo> capDrivers;
|
||||
DriverInfo driverInfo;
|
||||
|
||||
if(!isOkay())return false;
|
||||
getDrivers(capDrivers);
|
||||
if(!capDrivers.size()||driverIndex>=capDrivers.size())return false;
|
||||
disconnect();
|
||||
driverInfo=capDrivers[driverIndex];
|
||||
if(::SendMessage(mhCaptureWnd,WM_CAP_DRIVER_CONNECT,driverIndex,0L))
|
||||
{
|
||||
::OutputDebugString(String(String("VidCap::connect OK[")+driverInfo.driverName()+String(" ")+driverInfo.driverVersion()+String("\n")).str());
|
||||
isConnected(true);
|
||||
getCaptureParams(mCaptureParams);
|
||||
getCaptureStatus(mCaptureStatus);
|
||||
}
|
||||
else ::OutputDebugString(String(String("VidCap::connect ERR[")+driverInfo.driverName()+String(" ")+driverInfo.driverVersion()+String("\n")).str());
|
||||
return isConnected();
|
||||
}
|
||||
|
||||
void VidCap::getDrivers(Block<DriverInfo> &capDrivers)
|
||||
{
|
||||
short itemIndex(0);
|
||||
String driverName;
|
||||
String driverVersion;
|
||||
|
||||
capDrivers.remove();
|
||||
while(TRUE)
|
||||
{
|
||||
if(!capGetDriverDescription(itemIndex,(LPSTR)driverName,String::MaxString,(LPSTR)driverVersion,String::MaxString))break;
|
||||
capDrivers.insert(&DriverInfo(driverName,driverVersion));
|
||||
itemIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
void VidCap::installHandlers(void)
|
||||
{
|
||||
if(!isOkay())return;
|
||||
capSetCallbackOnError(mhCaptureWnd,(FARPROC)errorCallback);
|
||||
capSetCallbackOnStatus(mhCaptureWnd,(FARPROC)statusCallback);
|
||||
capSetCallbackOnFrame(mhCaptureWnd,(FARPROC)frameCallback);
|
||||
capSetCallbackOnVideoStream(mhCaptureWnd,(FARPROC)videoCallback);
|
||||
}
|
||||
|
||||
void VidCap::removeHandlers(void)
|
||||
{
|
||||
if(!isOkay())return;
|
||||
capSetCallbackOnError(mhCaptureWnd,0);
|
||||
capSetCallbackOnStatus(mhCaptureWnd,0);
|
||||
capSetCallbackOnFrame(mhCaptureWnd,0);
|
||||
capSetCallbackOnVideoStream(mhCaptureWnd,0);
|
||||
}
|
||||
|
||||
bool VidCap::getVideoFormat(BitmapInfo &bitmapInfo)
|
||||
{
|
||||
DWORD sizeData;
|
||||
GlobalData<BYTE> globalData;
|
||||
LPBITMAPINFOHEADER lpCaptureFormat;
|
||||
|
||||
if(!isConnected())return false;
|
||||
globalData.size(::SendMessage(mhCaptureWnd,WM_CAP_GET_VIDEOFORMAT,0,0L));
|
||||
lpCaptureFormat=(LPBITMAPINFOHEADER)(BYTE*)&globalData[0];
|
||||
::SendMessage(mhCaptureWnd,WM_CAP_GET_VIDEOFORMAT,(WPARAM)globalData.size(),(LPARAM)(LPVOID)lpCaptureFormat);
|
||||
bitmapInfo.planes(lpCaptureFormat->biPlanes);
|
||||
bitmapInfo.width(lpCaptureFormat->biWidth);
|
||||
bitmapInfo.height(lpCaptureFormat->biHeight);
|
||||
bitmapInfo.bitCount(BitmapInfo::BitsPerPixel(lpCaptureFormat->biBitCount));
|
||||
bitmapInfo.compression(lpCaptureFormat->biCompression);
|
||||
bitmapInfo.xPelsPerMeter(lpCaptureFormat->biXPelsPerMeter);
|
||||
bitmapInfo.yPelsPerMeter(lpCaptureFormat->biYPelsPerMeter);
|
||||
bitmapInfo.colorUsed(lpCaptureFormat->biClrUsed);
|
||||
bitmapInfo.colorImportant(lpCaptureFormat->biClrImportant);
|
||||
bitmapInfo.rgbColors(lpCaptureFormat->biClrImportant);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool VidCap::dialogVideoSource(void)
|
||||
{
|
||||
DriverCaps driverCaps;
|
||||
|
||||
if(!getDriverCaps(driverCaps))return false;
|
||||
if(!driverCaps.hasDlgVideoSource())return false;
|
||||
return ::SendMessage(mhCaptureWnd,WM_CAP_DLG_VIDEOSOURCE,0,0L);
|
||||
}
|
||||
|
||||
bool VidCap::dialogVideoFormat(void)
|
||||
{
|
||||
DriverCaps driverCaps;
|
||||
|
||||
if(!getDriverCaps(driverCaps))return false;
|
||||
if(!driverCaps.hasDlgVideoFormat())return false;
|
||||
return ::SendMessage(mhCaptureWnd,WM_CAP_DLG_VIDEOFORMAT,0,0L);
|
||||
}
|
||||
|
||||
bool VidCap::dialogVideoDisplay(void)
|
||||
{
|
||||
DriverCaps driverCaps;
|
||||
|
||||
if(!getDriverCaps(driverCaps))return false;
|
||||
if(!driverCaps.hasDlgVideoDisplay())return false;
|
||||
return ::SendMessage(mhCaptureWnd,WM_CAP_DLG_VIDEODISPLAY,0,0L);
|
||||
}
|
||||
|
||||
// **************************
|
||||
|
||||
void WINAPI VidCap::errorCallback(HWND hCaptureWnd,int nErrorID,LPSTR lpszErrorText)
|
||||
{
|
||||
InstanceData instanceData;
|
||||
VidCap *lpVideoCapture=((VidCap*)instanceData.getInstanceData(hCaptureWnd));
|
||||
lpVideoCapture->errorHandler(nErrorID,String(lpszErrorText));
|
||||
}
|
||||
|
||||
void WINAPI VidCap::statusCallback(HWND hCaptureWnd,int nID,LPSTR lpszStatusText)
|
||||
{
|
||||
InstanceData instanceData;
|
||||
VidCap *lpVideoCapture=((VidCap*)instanceData.getInstanceData(hCaptureWnd));
|
||||
lpVideoCapture->statusHandler(nID,String(lpszStatusText));
|
||||
}
|
||||
|
||||
void WINAPI VidCap::videoCallback(HWND hCaptureWnd,LPVIDEOHDR lpVideoHeader)
|
||||
{
|
||||
InstanceData instanceData;
|
||||
VidCap *lpVideoCapture=((VidCap*)instanceData.getInstanceData(hCaptureWnd));
|
||||
lpVideoCapture->videoHandler(*lpVideoHeader);
|
||||
}
|
||||
|
||||
void WINAPI VidCap::frameCallback(HWND hCaptureWnd,LPVIDEOHDR lpVideoHeader)
|
||||
{
|
||||
InstanceData instanceData;
|
||||
VidCap *lpVideoCapture=((VidCap*)instanceData.getInstanceData(hCaptureWnd));
|
||||
lpVideoCapture->frameHandler(*lpVideoHeader);
|
||||
}
|
||||
|
||||
// virtuals
|
||||
|
||||
void VidCap::errorHandler(int errorID,const String &errorString)
|
||||
{
|
||||
::OutputDebugString(String(String("VidCap::errorHandler[")+errorString+String("]\n")).str());
|
||||
}
|
||||
|
||||
void VidCap::statusHandler(int nID,const String &statusString)
|
||||
{
|
||||
::OutputDebugString(String(String("VidCap::statusHandler[")+statusString+String("]\n")).str());
|
||||
}
|
||||
|
||||
void VidCap::videoHandler(VIDEOHDR &videoHeader)
|
||||
{
|
||||
::OutputDebugString("VidCap::videoHandler\n");
|
||||
}
|
||||
|
||||
void VidCap::frameHandler(VIDEOHDR &videoHeader)
|
||||
{
|
||||
::OutputDebugString("VidCap::frameHandler\n");
|
||||
}
|
||||
|
||||
149
vidcap/VIDCAP.DSW
Normal file
149
vidcap/VIDCAP.DSW
Normal file
@@ -0,0 +1,149 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "avicap"=.\Vidcap.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name common
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name dialog
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name bsptree
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name jpeg6b
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name jpgimg
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name codec
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name statbar
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name hookproc
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "bsptree"=..\BSPTREE\bsptree.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "codec"=..\codec\codec.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "common"=..\COMMON\common.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "dialog"=..\DIALOG\Dialog.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "hookproc"=..\HOOKPROC\hookproc.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "jpeg6b"="..\..\parts\jpeg-6b\jpeg6b.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "jpgimg"=..\jpgimg\jpgimg.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "statbar"=..\STATBAR\Statbar.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
210
vidcap/VIDCAP.HPP
Normal file
210
vidcap/VIDCAP.HPP
Normal file
@@ -0,0 +1,210 @@
|
||||
#ifndef _VIDCAP_VIDCAP_HPP_
|
||||
#define _VIDCAP_VIDCAP_HPP_
|
||||
#ifndef _COMMON_AVICAP_HPP_
|
||||
#include <common/avicap.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_INSTANCEDATA_HPP_
|
||||
#include <common/instance.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_GLOBALDATA_HPP_
|
||||
#include <common/gdata.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_BITMAPINFO_HPP_
|
||||
#include <common/bminfo.hpp>
|
||||
#endif
|
||||
#ifndef _VIDCAP_DRVINFO_HPP_
|
||||
#include <vidcap/drvinfo.hpp>
|
||||
#endif
|
||||
#ifndef _VIDCAP_CAPTUREPARAMS_HPP_
|
||||
#include <vidcap/capparms.hpp>
|
||||
#endif
|
||||
#ifndef _VIDCAP_CAPSTATUS_HPP_
|
||||
#include <vidcap/capstat.hpp>
|
||||
#endif
|
||||
#ifndef _VIDCAP_DRVCAPS_HPP_
|
||||
#include <vidcap/drvcaps.hpp>
|
||||
#endif
|
||||
|
||||
class VidCap
|
||||
{
|
||||
public:
|
||||
VidCap();
|
||||
virtual ~VidCap();
|
||||
bool create(HWND hParentWnd,DWORD width=DefaultWidth,DWORD height=DefaultHeight);
|
||||
bool connect(const String &driverName);
|
||||
bool connect(WORD driverIndex);
|
||||
bool connect(void);
|
||||
bool sequenceNoFile(void);
|
||||
bool sequence(void);
|
||||
bool capStop(void)const;
|
||||
bool capAbort(void)const;
|
||||
bool grabFrame(void)const;
|
||||
bool grabFrameNoStop(void)const;
|
||||
bool getDriverCaps(DriverCaps &someDriverCaps);
|
||||
bool getCaptureParams(CaptureParams &someCaptureParams);
|
||||
bool setCaptureParams(CaptureParams &someCaptureParams);
|
||||
bool getCaptureStatus(CaptureStatus &someCaptureStatus);
|
||||
bool getVideoFormat(BitmapInfo &bitmapInfo);
|
||||
bool setVideoFormat(BitmapInfo &someBitmapInfo);
|
||||
bool setMCIDeviceName(const String &mciDeviceName);
|
||||
bool getMCIDeviceName(String &mciDeviceName);
|
||||
bool setPreviewRate(DWORD milliseconds);
|
||||
bool dialogVideoSource(void);
|
||||
bool dialogVideoFormat(void);
|
||||
bool dialogVideoDisplay(void);
|
||||
bool preview(bool preview);
|
||||
bool isConnected(void)const;
|
||||
bool isOkay(void)const;
|
||||
void disconnect(void);
|
||||
static void getDrivers(Block<DriverInfo> &capDrivers);
|
||||
protected:
|
||||
virtual void errorHandler(int errorID,const String &errorString);
|
||||
virtual void statusHandler(int nID,const String &statusString);
|
||||
virtual void videoHandler(VIDEOHDR &videoHeader);
|
||||
virtual void frameHandler(VIDEOHDR &videoHeader);
|
||||
private:
|
||||
enum{ControlID=101,DefaultWidth=160,DefaultHeight=120};
|
||||
void isConnected(bool isConnected);
|
||||
void installHandlers(void);
|
||||
void removeHandlers(void);
|
||||
void destroy(void);
|
||||
static void WINAPI errorCallback(HWND hWnd,int nErrorID,LPSTR lpszErrorText);
|
||||
static void WINAPI statusCallback(HWND hWnd,int nID,LPSTR lpszStatusText);
|
||||
static void WINAPI videoCallback(HWND hWnd,LPVIDEOHDR lpVideoHeader);
|
||||
static void WINAPI frameCallback(HWND hWnd,LPVIDEOHDR lpVideoHeader);
|
||||
HWND mhCaptureWnd;
|
||||
HWND mhParentWnd;
|
||||
bool mIsConnected;
|
||||
InstanceData mInstanceData;
|
||||
CaptureParams mCaptureParams;
|
||||
CaptureStatus mCaptureStatus;
|
||||
};
|
||||
|
||||
inline
|
||||
bool VidCap::isConnected(void)const
|
||||
{
|
||||
return mIsConnected;
|
||||
}
|
||||
|
||||
inline
|
||||
void VidCap::isConnected(bool isConnected)
|
||||
{
|
||||
mIsConnected=isConnected;
|
||||
}
|
||||
|
||||
inline
|
||||
bool VidCap::isOkay(void)const
|
||||
{
|
||||
return (mhCaptureWnd?TRUE:FALSE);
|
||||
}
|
||||
|
||||
inline
|
||||
bool VidCap::capStop(void)const
|
||||
{
|
||||
if(!isOkay()||!isConnected())return false;
|
||||
return ::SendMessage(mhCaptureWnd,WM_CAP_STOP,(WPARAM)0,(LPARAM)0);
|
||||
}
|
||||
|
||||
inline
|
||||
bool VidCap::capAbort(void)const
|
||||
{
|
||||
if(!isOkay()||!isConnected())return false;
|
||||
return ::SendMessage(mhCaptureWnd,WM_CAP_ABORT,(WPARAM)0,(LPARAM)0);
|
||||
}
|
||||
|
||||
inline
|
||||
bool VidCap::grabFrame(void)const
|
||||
{
|
||||
if(!isOkay()||!isConnected())return false;
|
||||
return ::SendMessage(mhCaptureWnd,WM_CAP_GRAB_FRAME,(WPARAM)0,(LPARAM)0);
|
||||
}
|
||||
|
||||
inline
|
||||
bool VidCap::grabFrameNoStop(void)const
|
||||
{
|
||||
if(!isOkay()||!isConnected())return false;
|
||||
return ::SendMessage(mhCaptureWnd,WM_CAP_GRAB_FRAME_NOSTOP,(WPARAM)0,(LPARAM)0);
|
||||
}
|
||||
|
||||
inline
|
||||
bool VidCap::sequenceNoFile(void)
|
||||
{
|
||||
if(!isOkay()||!isConnected())return false;
|
||||
return ::SendMessage(mhCaptureWnd,WM_CAP_SEQUENCE_NOFILE,0,0L);
|
||||
}
|
||||
|
||||
inline
|
||||
bool VidCap::sequence(void)
|
||||
{
|
||||
if(!isOkay()||!isConnected())return false;
|
||||
return ::SendMessage(mhCaptureWnd,WM_CAP_SEQUENCE,0,0L);
|
||||
}
|
||||
|
||||
inline
|
||||
bool VidCap::setPreviewRate(DWORD milliseconds)
|
||||
{
|
||||
if(!isOkay()||!isConnected())return false;
|
||||
return ::SendMessage(mhCaptureWnd,WM_CAP_SET_PREVIEWRATE,milliseconds,0L);
|
||||
}
|
||||
|
||||
inline
|
||||
bool VidCap::preview(bool preview)
|
||||
{
|
||||
if(!isOkay()||!isConnected())return false;
|
||||
return ::SendMessage(mhCaptureWnd,WM_CAP_SET_PREVIEW,preview,0L);
|
||||
}
|
||||
|
||||
inline
|
||||
bool VidCap::getCaptureStatus(CaptureStatus &someCaptureStatus)
|
||||
{
|
||||
if(!isOkay()||!isConnected())return false;
|
||||
return ::SendMessage(mhCaptureWnd,WM_CAP_GET_STATUS,(WPARAM)sizeof(CAPSTATUS),(LPARAM)(LPVOID)&((CAPSTATUS&)someCaptureStatus));
|
||||
}
|
||||
|
||||
inline
|
||||
bool VidCap::getCaptureParams(CaptureParams &someCaptureParams)
|
||||
{
|
||||
if(!isOkay()||!isConnected())return false;
|
||||
return ::SendMessage(mhCaptureWnd,WM_CAP_GET_SEQUENCE_SETUP,(WPARAM)sizeof(CAPTUREPARMS),(LPARAM)(LPVOID)&((CAPTUREPARMS&)someCaptureParams));
|
||||
}
|
||||
|
||||
inline
|
||||
bool VidCap::setCaptureParams(CaptureParams &someCaptureParams)
|
||||
{
|
||||
if(!isOkay()||!isConnected())return false;
|
||||
return ::SendMessage(mhCaptureWnd,WM_CAP_SET_SEQUENCE_SETUP,(WPARAM)sizeof(CAPTUREPARMS),(LPARAM)(LPVOID)&((CAPTUREPARMS&)someCaptureParams));
|
||||
}
|
||||
|
||||
inline
|
||||
bool VidCap::getDriverCaps(DriverCaps &someDriverCaps)
|
||||
{
|
||||
if(!isOkay()||!isConnected())return false;
|
||||
return ::SendMessage(mhCaptureWnd,WM_CAP_DRIVER_GET_CAPS,(WPARAM)sizeof(CAPDRIVERCAPS),(LPARAM)(LPVOID)&someDriverCaps);
|
||||
}
|
||||
|
||||
inline
|
||||
bool VidCap::setVideoFormat(BitmapInfo &someBitmapInfo)
|
||||
{
|
||||
if(!isOkay()||!isConnected())return false;
|
||||
if(!someBitmapInfo.width()||!someBitmapInfo.height())return false;
|
||||
return ::SendMessage(mhCaptureWnd,WM_CAP_SET_VIDEOFORMAT,(WPARAM)sizeof(BITMAPINFOHEADER),(LPARAM)&((BITMAPINFOHEADER&)someBitmapInfo));
|
||||
}
|
||||
|
||||
inline
|
||||
bool VidCap::setMCIDeviceName(const String &mciDeviceName)
|
||||
{
|
||||
if(!isOkay()||!isConnected())return false;
|
||||
return ::SendMessage(mhCaptureWnd,WM_CAP_SET_MCI_DEVICE,0,(LPARAM)mciDeviceName.str());
|
||||
}
|
||||
|
||||
inline
|
||||
bool VidCap::getMCIDeviceName(String &mciDeviceName)
|
||||
{
|
||||
bool returnCode=false;
|
||||
|
||||
mciDeviceName.reserve(512);
|
||||
if(!isOkay()||!isConnected())return false;
|
||||
return ::SendMessage(mhCaptureWnd,WM_CAP_GET_MCI_DEVICE,512,(LPARAM)mciDeviceName.str());
|
||||
}
|
||||
#endif
|
||||
|
||||
BIN
vidcap/VIDCAP.IDE
Normal file
BIN
vidcap/VIDCAP.IDE
Normal file
Binary file not shown.
687
vidcap/VIDCAP.MAK
Normal file
687
vidcap/VIDCAP.MAK
Normal file
@@ -0,0 +1,687 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=avicap - Win32 Debug
|
||||
!MESSAGE No configuration specified. Defaulting to avicap - Win32 Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "avicap - Win32 Release" && "$(CFG)" != "avicap - Win32 Debug"
|
||||
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||
!MESSAGE You can specify a configuration when running NMAKE on this makefile
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Vidcap.mak" CFG="avicap - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "avicap - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "avicap - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
!ERROR An invalid configuration is specified.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
!ELSE
|
||||
NULL=nul
|
||||
!ENDIF
|
||||
################################################################################
|
||||
# Begin Project
|
||||
# PROP Target_Last_Scanned "avicap - Win32 Debug"
|
||||
MTL=mktyplib.exe
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "avicap - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
OUTDIR=.\Release
|
||||
INTDIR=.\Release
|
||||
|
||||
ALL : "$(OUTDIR)\Vidcap.exe"
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\Avicap.res"
|
||||
-@erase "$(INTDIR)\Bmpcap.obj"
|
||||
-@erase "$(INTDIR)\Main.obj"
|
||||
-@erase "$(INTDIR)\Mainwnd.obj"
|
||||
-@erase "$(INTDIR)\Optndlg.obj"
|
||||
-@erase "$(INTDIR)\Stdtmpl.obj"
|
||||
-@erase "$(INTDIR)\Vidcap.obj"
|
||||
-@erase "$(OUTDIR)\Vidcap.exe"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
|
||||
CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\
|
||||
/Fp"$(INTDIR)/Vidcap.pch" /YX /Fo"$(INTDIR)/" /c
|
||||
CPP_OBJS=.\Release/
|
||||
CPP_SBRS=.\.
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /win32
|
||||
MTL_PROJ=/nologo /D "NDEBUG" /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
RSC_PROJ=/l 0x409 /fo"$(INTDIR)/Avicap.res" /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)/Vidcap.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
|
||||
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
|
||||
odbccp32.lib /nologo /subsystem:windows /incremental:no\
|
||||
/pdb:"$(OUTDIR)/Vidcap.pdb" /machine:I386 /out:"$(OUTDIR)/Vidcap.exe"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\Avicap.res" \
|
||||
"$(INTDIR)\Bmpcap.obj" \
|
||||
"$(INTDIR)\Main.obj" \
|
||||
"$(INTDIR)\Mainwnd.obj" \
|
||||
"$(INTDIR)\Optndlg.obj" \
|
||||
"$(INTDIR)\Stdtmpl.obj" \
|
||||
"$(INTDIR)\Vidcap.obj" \
|
||||
"..\exe\mscommon.lib" \
|
||||
"..\exe\msdialog.lib"
|
||||
|
||||
"$(OUTDIR)\Vidcap.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "avicap - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "msvcobj"
|
||||
# PROP Intermediate_Dir "msvcobj"
|
||||
# PROP Target_Dir ""
|
||||
OUTDIR=.\msvcobj
|
||||
INTDIR=.\msvcobj
|
||||
|
||||
ALL : "$(OUTDIR)\Vidcap.exe"
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\Avicap.res"
|
||||
-@erase "$(INTDIR)\Bmpcap.obj"
|
||||
-@erase "$(INTDIR)\Main.obj"
|
||||
-@erase "$(INTDIR)\Mainwnd.obj"
|
||||
-@erase "$(INTDIR)\Optndlg.obj"
|
||||
-@erase "$(INTDIR)\Stdtmpl.obj"
|
||||
-@erase "$(INTDIR)\Vidcap.obj"
|
||||
-@erase "$(OUTDIR)\Vidcap.exe"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /Zp1 /MTd /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__FLAT__" /D "STRICT" /Fp"c:\work\exe\msvc42.pch" /YX /c
|
||||
CPP_PROJ=/nologo /Zp1 /MTd /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D\
|
||||
"__FLAT__" /D "STRICT" /Fp"c:\work\exe\msvc42.pch" /YX /Fo"$(INTDIR)/" /c
|
||||
CPP_OBJS=.\msvcobj/
|
||||
CPP_SBRS=.\.
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /win32
|
||||
MTL_PROJ=/nologo /D "_DEBUG" /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
RSC_PROJ=/l 0x409 /fo"$(INTDIR)/Avicap.res" /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)/Vidcap.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib /nologo /subsystem:windows /pdb:none /debug /machine:I386
|
||||
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
|
||||
advapi32.lib shell32.lib uuid.lib /nologo /subsystem:windows /pdb:none /debug\
|
||||
/machine:I386 /out:"$(OUTDIR)/Vidcap.exe"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\Avicap.res" \
|
||||
"$(INTDIR)\Bmpcap.obj" \
|
||||
"$(INTDIR)\Main.obj" \
|
||||
"$(INTDIR)\Mainwnd.obj" \
|
||||
"$(INTDIR)\Optndlg.obj" \
|
||||
"$(INTDIR)\Stdtmpl.obj" \
|
||||
"$(INTDIR)\Vidcap.obj" \
|
||||
"..\exe\mscommon.lib" \
|
||||
"..\exe\msdialog.lib"
|
||||
|
||||
"$(OUTDIR)\Vidcap.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
.c{$(CPP_OBJS)}.obj:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.cpp{$(CPP_OBJS)}.obj:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.cxx{$(CPP_OBJS)}.obj:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.c{$(CPP_SBRS)}.sbr:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.cpp{$(CPP_SBRS)}.sbr:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.cxx{$(CPP_SBRS)}.sbr:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
################################################################################
|
||||
# Begin Target
|
||||
|
||||
# Name "avicap - Win32 Release"
|
||||
# Name "avicap - Win32 Debug"
|
||||
|
||||
!IF "$(CFG)" == "avicap - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "avicap - Win32 Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Vidcap.cpp
|
||||
|
||||
!IF "$(CFG)" == "avicap - Win32 Release"
|
||||
|
||||
DEP_CPP_VIDCA=\
|
||||
{$(INCLUDE)}"\.\capparms.hpp"\
|
||||
{$(INCLUDE)}"\.\capstat.hpp"\
|
||||
{$(INCLUDE)}"\.\drvcaps.hpp"\
|
||||
{$(INCLUDE)}"\.\drvinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\vidcap.hpp"\
|
||||
{$(INCLUDE)}"\common\assert.hpp"\
|
||||
{$(INCLUDE)}"\common\avicap.hpp"\
|
||||
{$(INCLUDE)}"\common\block.hpp"\
|
||||
{$(INCLUDE)}"\common\block.tpp"\
|
||||
{$(INCLUDE)}"\common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.tpp"\
|
||||
{$(INCLUDE)}"\common\instance.hpp"\
|
||||
{$(INCLUDE)}"\common\mmsystem.hpp"\
|
||||
{$(INCLUDE)}"\common\point.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"\common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"\common\string.hpp"\
|
||||
{$(INCLUDE)}"\common\types.hpp"\
|
||||
{$(INCLUDE)}"\common\vfw.hpp"\
|
||||
{$(INCLUDE)}"\common\windows.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Vidcap.obj" : $(SOURCE) $(DEP_CPP_VIDCA) "$(INTDIR)"
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "avicap - Win32 Debug"
|
||||
|
||||
DEP_CPP_VIDCA=\
|
||||
{$(INCLUDE)}"\.\capparms.hpp"\
|
||||
{$(INCLUDE)}"\.\capstat.hpp"\
|
||||
{$(INCLUDE)}"\.\drvcaps.hpp"\
|
||||
{$(INCLUDE)}"\.\drvinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\vidcap.hpp"\
|
||||
{$(INCLUDE)}"\common\assert.hpp"\
|
||||
{$(INCLUDE)}"\common\avicap.hpp"\
|
||||
{$(INCLUDE)}"\common\block.hpp"\
|
||||
{$(INCLUDE)}"\common\block.tpp"\
|
||||
{$(INCLUDE)}"\common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.tpp"\
|
||||
{$(INCLUDE)}"\common\instance.hpp"\
|
||||
{$(INCLUDE)}"\common\mmsystem.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"\common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"\common\string.hpp"\
|
||||
{$(INCLUDE)}"\common\types.hpp"\
|
||||
{$(INCLUDE)}"\common\vfw.hpp"\
|
||||
{$(INCLUDE)}"\common\windows.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Vidcap.obj" : $(SOURCE) $(DEP_CPP_VIDCA) "$(INTDIR)"
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Bmpcap.cpp
|
||||
DEP_CPP_BMPCA=\
|
||||
{$(INCLUDE)}"\.\bmpcap.hpp"\
|
||||
{$(INCLUDE)}"\.\capparms.hpp"\
|
||||
{$(INCLUDE)}"\.\capstat.hpp"\
|
||||
{$(INCLUDE)}"\.\drvcaps.hpp"\
|
||||
{$(INCLUDE)}"\.\drvinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\vidcap.hpp"\
|
||||
{$(INCLUDE)}"\common\assert.hpp"\
|
||||
{$(INCLUDE)}"\common\avicap.hpp"\
|
||||
{$(INCLUDE)}"\common\bitmap.hpp"\
|
||||
{$(INCLUDE)}"\common\block.hpp"\
|
||||
{$(INCLUDE)}"\common\block.tpp"\
|
||||
{$(INCLUDE)}"\common\bmdata.hpp"\
|
||||
{$(INCLUDE)}"\common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"\common\boverlay.hpp"\
|
||||
{$(INCLUDE)}"\common\fixup.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.tpp"\
|
||||
{$(INCLUDE)}"\common\gdiobj.hpp"\
|
||||
{$(INCLUDE)}"\common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"\common\instance.hpp"\
|
||||
{$(INCLUDE)}"\common\mmsystem.hpp"\
|
||||
{$(INCLUDE)}"\common\palentry.hpp"\
|
||||
{$(INCLUDE)}"\common\pen.hpp"\
|
||||
{$(INCLUDE)}"\common\point.hpp"\
|
||||
{$(INCLUDE)}"\common\purebmp.hpp"\
|
||||
{$(INCLUDE)}"\common\purehdc.hpp"\
|
||||
{$(INCLUDE)}"\common\purepal.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.tpp"\
|
||||
{$(INCLUDE)}"\common\rect.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"\common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"\common\string.hpp"\
|
||||
{$(INCLUDE)}"\common\types.hpp"\
|
||||
{$(INCLUDE)}"\common\vfw.hpp"\
|
||||
{$(INCLUDE)}"\common\windows.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Bmpcap.obj" : $(SOURCE) $(DEP_CPP_BMPCA) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Main.cpp
|
||||
DEP_CPP_MAIN_=\
|
||||
{$(INCLUDE)}"\.\bmpcap.hpp"\
|
||||
{$(INCLUDE)}"\.\capparms.hpp"\
|
||||
{$(INCLUDE)}"\.\capstat.hpp"\
|
||||
{$(INCLUDE)}"\.\drvcaps.hpp"\
|
||||
{$(INCLUDE)}"\.\drvinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\main.hpp"\
|
||||
{$(INCLUDE)}"\.\mainwnd.hpp"\
|
||||
{$(INCLUDE)}"\.\optndlg.hpp"\
|
||||
{$(INCLUDE)}"\.\rinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\vidcap.hpp"\
|
||||
{$(INCLUDE)}"\common\assert.hpp"\
|
||||
{$(INCLUDE)}"\common\avicap.hpp"\
|
||||
{$(INCLUDE)}"\common\bitmap.hpp"\
|
||||
{$(INCLUDE)}"\common\block.hpp"\
|
||||
{$(INCLUDE)}"\common\block.tpp"\
|
||||
{$(INCLUDE)}"\common\bmdata.hpp"\
|
||||
{$(INCLUDE)}"\common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"\common\boverlay.hpp"\
|
||||
{$(INCLUDE)}"\common\callback.hpp"\
|
||||
{$(INCLUDE)}"\common\callback.tpp"\
|
||||
{$(INCLUDE)}"\common\cbdata.hpp"\
|
||||
{$(INCLUDE)}"\common\cbptr.hpp"\
|
||||
{$(INCLUDE)}"\common\dwindow.hpp"\
|
||||
{$(INCLUDE)}"\common\fixup.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.tpp"\
|
||||
{$(INCLUDE)}"\common\gdiobj.hpp"\
|
||||
{$(INCLUDE)}"\common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"\common\guiwnd.hpp"\
|
||||
{$(INCLUDE)}"\common\instance.hpp"\
|
||||
{$(INCLUDE)}"\common\mmsystem.hpp"\
|
||||
{$(INCLUDE)}"\common\palentry.hpp"\
|
||||
{$(INCLUDE)}"\common\pcallbck.hpp"\
|
||||
{$(INCLUDE)}"\common\pen.hpp"\
|
||||
{$(INCLUDE)}"\common\point.hpp"\
|
||||
{$(INCLUDE)}"\common\purebmp.hpp"\
|
||||
{$(INCLUDE)}"\common\purehdc.hpp"\
|
||||
{$(INCLUDE)}"\common\purepal.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.tpp"\
|
||||
{$(INCLUDE)}"\common\rect.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"\common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"\common\string.hpp"\
|
||||
{$(INCLUDE)}"\common\types.hpp"\
|
||||
{$(INCLUDE)}"\common\vfw.hpp"\
|
||||
{$(INCLUDE)}"\common\vhandler.hpp"\
|
||||
{$(INCLUDE)}"\common\window.hpp"\
|
||||
{$(INCLUDE)}"\common\windows.hpp"\
|
||||
{$(INCLUDE)}"\common\windowsx.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dlgitem.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dlgtmpl.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dyndlg.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Main.obj" : $(SOURCE) $(DEP_CPP_MAIN_) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Mainwnd.cpp
|
||||
DEP_CPP_MAINW=\
|
||||
{$(INCLUDE)}"\.\bmpcap.hpp"\
|
||||
{$(INCLUDE)}"\.\capparms.hpp"\
|
||||
{$(INCLUDE)}"\.\capstat.hpp"\
|
||||
{$(INCLUDE)}"\.\drvcaps.hpp"\
|
||||
{$(INCLUDE)}"\.\drvinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\mainwnd.hpp"\
|
||||
{$(INCLUDE)}"\.\optndlg.hpp"\
|
||||
{$(INCLUDE)}"\.\rinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\Rsrc.h"\
|
||||
{$(INCLUDE)}"\.\rsrc.hpp"\
|
||||
{$(INCLUDE)}"\.\vidcap.hpp"\
|
||||
{$(INCLUDE)}"\common\assert.hpp"\
|
||||
{$(INCLUDE)}"\common\avicap.hpp"\
|
||||
{$(INCLUDE)}"\common\bitmap.hpp"\
|
||||
{$(INCLUDE)}"\common\block.hpp"\
|
||||
{$(INCLUDE)}"\common\block.tpp"\
|
||||
{$(INCLUDE)}"\common\bmdata.hpp"\
|
||||
{$(INCLUDE)}"\common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"\common\boverlay.hpp"\
|
||||
{$(INCLUDE)}"\common\callback.hpp"\
|
||||
{$(INCLUDE)}"\common\callback.tpp"\
|
||||
{$(INCLUDE)}"\common\cbdata.hpp"\
|
||||
{$(INCLUDE)}"\common\cbptr.hpp"\
|
||||
{$(INCLUDE)}"\common\dwindow.hpp"\
|
||||
{$(INCLUDE)}"\common\fixup.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.tpp"\
|
||||
{$(INCLUDE)}"\common\gdiobj.hpp"\
|
||||
{$(INCLUDE)}"\common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"\common\guiwnd.hpp"\
|
||||
{$(INCLUDE)}"\common\instance.hpp"\
|
||||
{$(INCLUDE)}"\common\mmsystem.hpp"\
|
||||
{$(INCLUDE)}"\common\palentry.hpp"\
|
||||
{$(INCLUDE)}"\common\pcallbck.hpp"\
|
||||
{$(INCLUDE)}"\common\pen.hpp"\
|
||||
{$(INCLUDE)}"\common\point.hpp"\
|
||||
{$(INCLUDE)}"\common\purebmp.hpp"\
|
||||
{$(INCLUDE)}"\common\purehdc.hpp"\
|
||||
{$(INCLUDE)}"\common\purepal.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.tpp"\
|
||||
{$(INCLUDE)}"\common\rect.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"\common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"\common\string.hpp"\
|
||||
{$(INCLUDE)}"\common\types.hpp"\
|
||||
{$(INCLUDE)}"\common\vfw.hpp"\
|
||||
{$(INCLUDE)}"\common\vhandler.hpp"\
|
||||
{$(INCLUDE)}"\common\window.hpp"\
|
||||
{$(INCLUDE)}"\common\windows.hpp"\
|
||||
{$(INCLUDE)}"\common\windowsx.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dlgitem.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dlgtmpl.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dyndlg.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Mainwnd.obj" : $(SOURCE) $(DEP_CPP_MAINW) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Optndlg.cpp
|
||||
DEP_CPP_OPTND=\
|
||||
{$(INCLUDE)}"\.\optndlg.hpp"\
|
||||
{$(INCLUDE)}"\.\rinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\Rsrc.h"\
|
||||
{$(INCLUDE)}"\.\rsrc.hpp"\
|
||||
{$(INCLUDE)}"\common\assert.hpp"\
|
||||
{$(INCLUDE)}"\common\block.hpp"\
|
||||
{$(INCLUDE)}"\common\block.tpp"\
|
||||
{$(INCLUDE)}"\common\callback.hpp"\
|
||||
{$(INCLUDE)}"\common\callback.tpp"\
|
||||
{$(INCLUDE)}"\common\cbdata.hpp"\
|
||||
{$(INCLUDE)}"\common\cbptr.hpp"\
|
||||
{$(INCLUDE)}"\common\diskinfo.hpp"\
|
||||
{$(INCLUDE)}"\common\dwindow.hpp"\
|
||||
{$(INCLUDE)}"\common\filetime.hpp"\
|
||||
{$(INCLUDE)}"\common\finddata.hpp"\
|
||||
{$(INCLUDE)}"\common\fixup.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.tpp"\
|
||||
{$(INCLUDE)}"\common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"\common\guiwnd.hpp"\
|
||||
{$(INCLUDE)}"\common\pcallbck.hpp"\
|
||||
{$(INCLUDE)}"\common\point.hpp"\
|
||||
{$(INCLUDE)}"\common\profile.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.tpp"\
|
||||
{$(INCLUDE)}"\common\rect.hpp"\
|
||||
{$(INCLUDE)}"\common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"\common\string.hpp"\
|
||||
{$(INCLUDE)}"\common\systime.hpp"\
|
||||
{$(INCLUDE)}"\common\types.hpp"\
|
||||
{$(INCLUDE)}"\common\vhandler.hpp"\
|
||||
{$(INCLUDE)}"\common\windows.hpp"\
|
||||
{$(INCLUDE)}"\common\windowsx.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dlgitem.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dlgtmpl.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dyndlg.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Optndlg.obj" : $(SOURCE) $(DEP_CPP_OPTND) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Stdtmpl.cpp
|
||||
|
||||
!IF "$(CFG)" == "avicap - Win32 Release"
|
||||
|
||||
DEP_CPP_STDTM=\
|
||||
{$(INCLUDE)}"\.\bmpcap.hpp"\
|
||||
{$(INCLUDE)}"\.\capparms.hpp"\
|
||||
{$(INCLUDE)}"\.\capstat.hpp"\
|
||||
{$(INCLUDE)}"\.\drvcaps.hpp"\
|
||||
{$(INCLUDE)}"\.\drvinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\mainwnd.hpp"\
|
||||
{$(INCLUDE)}"\.\optndlg.hpp"\
|
||||
{$(INCLUDE)}"\.\rinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\vidcap.hpp"\
|
||||
{$(INCLUDE)}"\common\assert.hpp"\
|
||||
{$(INCLUDE)}"\common\avicap.hpp"\
|
||||
{$(INCLUDE)}"\common\bitmap.hpp"\
|
||||
{$(INCLUDE)}"\common\block.hpp"\
|
||||
{$(INCLUDE)}"\common\block.tpp"\
|
||||
{$(INCLUDE)}"\common\bmdata.hpp"\
|
||||
{$(INCLUDE)}"\common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"\common\boverlay.hpp"\
|
||||
{$(INCLUDE)}"\common\callback.hpp"\
|
||||
{$(INCLUDE)}"\common\callback.tpp"\
|
||||
{$(INCLUDE)}"\common\cbdata.hpp"\
|
||||
{$(INCLUDE)}"\common\cbptr.hpp"\
|
||||
{$(INCLUDE)}"\common\commctrl.hpp"\
|
||||
{$(INCLUDE)}"\common\dwindow.hpp"\
|
||||
{$(INCLUDE)}"\common\filemap.hpp"\
|
||||
{$(INCLUDE)}"\common\fixup.hpp"\
|
||||
{$(INCLUDE)}"\common\font.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.tpp"\
|
||||
{$(INCLUDE)}"\common\gdiobj.hpp"\
|
||||
{$(INCLUDE)}"\common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"\common\guiwnd.hpp"\
|
||||
{$(INCLUDE)}"\common\instance.hpp"\
|
||||
{$(INCLUDE)}"\common\mmsystem.hpp"\
|
||||
{$(INCLUDE)}"\common\palentry.hpp"\
|
||||
{$(INCLUDE)}"\common\pcallbck.hpp"\
|
||||
{$(INCLUDE)}"\common\pen.hpp"\
|
||||
{$(INCLUDE)}"\common\point.hpp"\
|
||||
{$(INCLUDE)}"\common\progress.hpp"\
|
||||
{$(INCLUDE)}"\common\purebmp.hpp"\
|
||||
{$(INCLUDE)}"\common\purehdc.hpp"\
|
||||
{$(INCLUDE)}"\common\purepal.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.tpp"\
|
||||
{$(INCLUDE)}"\common\qsort.hpp"\
|
||||
{$(INCLUDE)}"\common\qsort.tpp"\
|
||||
{$(INCLUDE)}"\common\rect.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"\common\sortopt.hpp"\
|
||||
{$(INCLUDE)}"\common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"\common\string.hpp"\
|
||||
{$(INCLUDE)}"\common\types.hpp"\
|
||||
{$(INCLUDE)}"\common\vfw.hpp"\
|
||||
{$(INCLUDE)}"\common\vhandler.hpp"\
|
||||
{$(INCLUDE)}"\common\window.hpp"\
|
||||
{$(INCLUDE)}"\common\windows.hpp"\
|
||||
{$(INCLUDE)}"\common\windowsx.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dlgitem.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dlgtmpl.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dyndlg.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Stdtmpl.obj" : $(SOURCE) $(DEP_CPP_STDTM) "$(INTDIR)"
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "avicap - Win32 Debug"
|
||||
|
||||
DEP_CPP_STDTM=\
|
||||
{$(INCLUDE)}"\.\bmpcap.hpp"\
|
||||
{$(INCLUDE)}"\.\capparms.hpp"\
|
||||
{$(INCLUDE)}"\.\capstat.hpp"\
|
||||
{$(INCLUDE)}"\.\drvcaps.hpp"\
|
||||
{$(INCLUDE)}"\.\drvinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\mainwnd.hpp"\
|
||||
{$(INCLUDE)}"\.\optndlg.hpp"\
|
||||
{$(INCLUDE)}"\.\rinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\vidcap.hpp"\
|
||||
{$(INCLUDE)}"\common\assert.hpp"\
|
||||
{$(INCLUDE)}"\common\avicap.hpp"\
|
||||
{$(INCLUDE)}"\common\bitmap.hpp"\
|
||||
{$(INCLUDE)}"\common\block.hpp"\
|
||||
{$(INCLUDE)}"\common\block.tpp"\
|
||||
{$(INCLUDE)}"\common\bmdata.hpp"\
|
||||
{$(INCLUDE)}"\common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"\common\boverlay.hpp"\
|
||||
{$(INCLUDE)}"\common\callback.hpp"\
|
||||
{$(INCLUDE)}"\common\callback.tpp"\
|
||||
{$(INCLUDE)}"\common\cbdata.hpp"\
|
||||
{$(INCLUDE)}"\common\cbptr.hpp"\
|
||||
{$(INCLUDE)}"\common\commctrl.hpp"\
|
||||
{$(INCLUDE)}"\common\dwindow.hpp"\
|
||||
{$(INCLUDE)}"\common\filemap.hpp"\
|
||||
{$(INCLUDE)}"\common\fixup.hpp"\
|
||||
{$(INCLUDE)}"\common\font.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.tpp"\
|
||||
{$(INCLUDE)}"\common\gdiobj.hpp"\
|
||||
{$(INCLUDE)}"\common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"\common\guiwnd.hpp"\
|
||||
{$(INCLUDE)}"\common\iconbmp.hpp"\
|
||||
{$(INCLUDE)}"\common\iconfrm.hpp"\
|
||||
{$(INCLUDE)}"\common\iconinfo.hpp"\
|
||||
{$(INCLUDE)}"\common\instance.hpp"\
|
||||
{$(INCLUDE)}"\common\mmsystem.hpp"\
|
||||
{$(INCLUDE)}"\common\mmtimer.hpp"\
|
||||
{$(INCLUDE)}"\common\palentry.hpp"\
|
||||
{$(INCLUDE)}"\common\pcallbck.hpp"\
|
||||
{$(INCLUDE)}"\common\pen.hpp"\
|
||||
{$(INCLUDE)}"\common\point.hpp"\
|
||||
{$(INCLUDE)}"\common\progress.hpp"\
|
||||
{$(INCLUDE)}"\common\purebmp.hpp"\
|
||||
{$(INCLUDE)}"\common\purehdc.hpp"\
|
||||
{$(INCLUDE)}"\common\pureicon.hpp"\
|
||||
{$(INCLUDE)}"\common\purepal.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.tpp"\
|
||||
{$(INCLUDE)}"\common\qsort.hpp"\
|
||||
{$(INCLUDE)}"\common\qsort.tpp"\
|
||||
{$(INCLUDE)}"\common\rect.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"\common\sortopt.hpp"\
|
||||
{$(INCLUDE)}"\common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"\common\string.hpp"\
|
||||
{$(INCLUDE)}"\common\types.hpp"\
|
||||
{$(INCLUDE)}"\common\vfw.hpp"\
|
||||
{$(INCLUDE)}"\common\vhandler.hpp"\
|
||||
{$(INCLUDE)}"\common\window.hpp"\
|
||||
{$(INCLUDE)}"\common\windows.hpp"\
|
||||
{$(INCLUDE)}"\common\windowsx.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dlgitem.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dlgtmpl.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dyndlg.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Stdtmpl.obj" : $(SOURCE) $(DEP_CPP_STDTM) "$(INTDIR)"
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Avicap.rc
|
||||
|
||||
"$(INTDIR)\Avicap.res" : $(SOURCE) "$(INTDIR)"
|
||||
$(RSC) $(RSC_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=\work\exe\mscommon.lib
|
||||
|
||||
!IF "$(CFG)" == "avicap - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "avicap - Win32 Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=\work\exe\msdialog.lib
|
||||
|
||||
!IF "$(CFG)" == "avicap - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "avicap - Win32 Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
################################################################################
|
||||
BIN
vidcap/VIDCAP.MDP
Normal file
BIN
vidcap/VIDCAP.MDP
Normal file
Binary file not shown.
BIN
vidcap/VIDCAP.OPT
Normal file
BIN
vidcap/VIDCAP.OPT
Normal file
Binary file not shown.
BIN
vidcap/VIDCAP.ncb
Normal file
BIN
vidcap/VIDCAP.ncb
Normal file
Binary file not shown.
150
vidcap/VidReg.cpp
Normal file
150
vidcap/VidReg.cpp
Normal file
@@ -0,0 +1,150 @@
|
||||
#include <VidCap/VidReg.hpp>
|
||||
#include <common/diskinfo.hpp>
|
||||
|
||||
VidReg::VidReg(void)
|
||||
:
|
||||
mRegKeySettings(RegKey::CurrentUser),
|
||||
mVidCapKeyName("Software\\Diversified\\VidCap"),
|
||||
mSettingsKeyName("Software\\Diversified\\VidCap\\Settings"),
|
||||
mCaptureFile("CaptureFile"),
|
||||
mSequencing("Sequencing"),
|
||||
mPreviewWidth("PreviewWidth"),
|
||||
mPreviewHeight("PreviewHeight"),
|
||||
mCaptureWidth("CaptureWidth"),
|
||||
mCaptureHeight("CaptureHeight"),
|
||||
mPreviewRate("PreviewRate"),
|
||||
mQuality("Quality")
|
||||
{
|
||||
guarantee();
|
||||
}
|
||||
|
||||
VidReg::~VidReg()
|
||||
{
|
||||
}
|
||||
|
||||
String VidReg::getCaptureFile(void)const
|
||||
{
|
||||
String strCaptureFile;
|
||||
mRegKeySettings.queryValue(mCaptureFile,strCaptureFile);
|
||||
|
||||
return strCaptureFile;
|
||||
}
|
||||
|
||||
void VidReg::setCaptureFile(const String &captureFile)
|
||||
{
|
||||
mRegKeySettings.setValue(mCaptureFile,captureFile);
|
||||
}
|
||||
|
||||
bool VidReg::getSequencing(void)const
|
||||
{
|
||||
String strSequencing;
|
||||
mRegKeySettings.queryValue(mSequencing,strSequencing);
|
||||
if(strSequencing==String("true"))return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void VidReg::setSequencing(bool sequencing)
|
||||
{
|
||||
String strSequencing=sequencing?"true":"false";
|
||||
mRegKeySettings.setValue(mSequencing,strSequencing);
|
||||
}
|
||||
|
||||
DWORD VidReg::getPreviewRate(void)const
|
||||
{
|
||||
String strPreviewRate;
|
||||
mRegKeySettings.queryValue(mPreviewRate,strPreviewRate);
|
||||
return strPreviewRate.toInt();
|
||||
}
|
||||
|
||||
void VidReg::setPreviewRate(DWORD previewRate)
|
||||
{
|
||||
mRegKeySettings.setValue(mPreviewRate,String().fromInt(previewRate));
|
||||
}
|
||||
|
||||
DWORD VidReg::getPreviewWidth(void)const
|
||||
{
|
||||
String strPreviewWidth;
|
||||
mRegKeySettings.queryValue(mPreviewWidth,strPreviewWidth);
|
||||
return strPreviewWidth.toInt();
|
||||
}
|
||||
|
||||
void VidReg::setPreviewWidth(DWORD previewWidth)
|
||||
{
|
||||
mRegKeySettings.setValue(mPreviewWidth,String().fromInt(previewWidth));
|
||||
}
|
||||
|
||||
DWORD VidReg::getPreviewHeight(void)const
|
||||
{
|
||||
String strPreviewHeight;
|
||||
mRegKeySettings.queryValue(mPreviewHeight,strPreviewHeight);
|
||||
return strPreviewHeight.toInt();
|
||||
}
|
||||
|
||||
void VidReg::setPreviewHeight(DWORD previewHeight)
|
||||
{
|
||||
mRegKeySettings.setValue(mPreviewHeight,String().fromInt(previewHeight));
|
||||
}
|
||||
|
||||
DWORD VidReg::getCaptureWidth(void)const
|
||||
{
|
||||
String strCaptureWidth;
|
||||
mRegKeySettings.queryValue(mCaptureWidth,strCaptureWidth);
|
||||
return strCaptureWidth.toInt();
|
||||
}
|
||||
|
||||
void VidReg::setCaptureWidth(DWORD captureWidth)
|
||||
{
|
||||
mRegKeySettings.setValue(mCaptureWidth,String().fromInt(captureWidth));
|
||||
}
|
||||
|
||||
DWORD VidReg::getCaptureHeight(void)const
|
||||
{
|
||||
String strCaptureHeight;
|
||||
mRegKeySettings.queryValue(mCaptureHeight,strCaptureHeight);
|
||||
return strCaptureHeight.toInt();
|
||||
}
|
||||
|
||||
void VidReg::setCaptureHeight(DWORD captureHeight)
|
||||
{
|
||||
mRegKeySettings.setValue(mCaptureHeight,String().fromInt(captureHeight));
|
||||
}
|
||||
|
||||
DWORD VidReg::getQuality(void)const
|
||||
{
|
||||
String strQuality;
|
||||
mRegKeySettings.queryValue(mQuality,strQuality);
|
||||
return strQuality.toInt();
|
||||
}
|
||||
|
||||
void VidReg::setQuality(DWORD quality)
|
||||
{
|
||||
mRegKeySettings.setValue(mQuality,String().fromInt(quality));
|
||||
}
|
||||
|
||||
void VidReg::guarantee(void)
|
||||
{
|
||||
if(!mRegKeySettings.openKey(mSettingsKeyName))
|
||||
{
|
||||
DiskInfo diskInfo;
|
||||
String strCaptureFile;
|
||||
|
||||
diskInfo.getCurrentDirectory(strCaptureFile);
|
||||
strCaptureFile+="\\capture.jpg";
|
||||
mRegKeySettings.createKey(mSettingsKeyName,"");
|
||||
mRegKeySettings.openKey(mSettingsKeyName);
|
||||
setCaptureFile(strCaptureFile);
|
||||
setSequencing(true);
|
||||
setPreviewWidth(320);
|
||||
setPreviewHeight(240);
|
||||
setCaptureWidth(320);
|
||||
setCaptureHeight(240);
|
||||
setPreviewRate(250);
|
||||
setQuality(100);
|
||||
}
|
||||
}
|
||||
|
||||
bool VidReg::isOkay(void)const
|
||||
{
|
||||
return mRegKeySettings.isOkay();
|
||||
}
|
||||
|
||||
64
vidcap/VidReg.hpp
Normal file
64
vidcap/VidReg.hpp
Normal file
@@ -0,0 +1,64 @@
|
||||
#ifndef _VIDCAP_VIDREG_HPP_
|
||||
#define _VIDCAP_VIDREG_HPP_
|
||||
#ifndef _COMMON_REGKEY_HPP_
|
||||
#include <common/regkey.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_STRING_HPP_
|
||||
#include <common/string.hpp>
|
||||
#endif
|
||||
#ifndef _VIDCAP_RSRC_HPP_
|
||||
#include <vidcap/rsrc.hpp>
|
||||
#endif
|
||||
|
||||
class VidReg
|
||||
{
|
||||
public:
|
||||
VidReg(void);
|
||||
virtual ~VidReg();
|
||||
String getCaptureFile(void)const;
|
||||
void setCaptureFile(const String &captureFile);
|
||||
bool getSequencing(void)const;
|
||||
void setSequencing(bool sequencing);
|
||||
DWORD getPreviewRate(void)const;
|
||||
void setPreviewRate(DWORD previewRate);
|
||||
DWORD getPreviewWidth(void)const;
|
||||
void setPreviewWidth(DWORD previewWidth);
|
||||
DWORD getPreviewHeight(void)const;
|
||||
void setPreviewHeight(DWORD previewHeight);
|
||||
DWORD getCaptureWidth(void)const;
|
||||
void setCaptureWidth(DWORD captureWidth);
|
||||
DWORD getCaptureHeight(void)const;
|
||||
void setCaptureHeight(DWORD captureHeight);
|
||||
DWORD getQuality(void)const;
|
||||
void setQuality(DWORD quality);
|
||||
bool isOkay(void)const;
|
||||
private:
|
||||
VidReg(const VidReg &someVidReg);
|
||||
VidReg &operator=(const VidReg &someVidReg);
|
||||
void guarantee(void);
|
||||
|
||||
String mVidCapKeyName;
|
||||
String mSettingsKeyName;
|
||||
String mCaptureFile;
|
||||
String mSequencing;
|
||||
String mPreviewWidth;
|
||||
String mPreviewHeight;
|
||||
String mCaptureWidth;
|
||||
String mCaptureHeight;
|
||||
String mPreviewRate;
|
||||
String mQuality;
|
||||
RegKey mRegKeySettings;
|
||||
};
|
||||
|
||||
inline
|
||||
VidReg::VidReg(const VidReg &someVidReg)
|
||||
{ // private implementation
|
||||
*this=someVidReg;
|
||||
}
|
||||
|
||||
inline
|
||||
VidReg &VidReg::operator=(const VidReg &/*someVidReg*/)
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
687
vidcap/Vidcap.001
Normal file
687
vidcap/Vidcap.001
Normal file
@@ -0,0 +1,687 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=avicap - Win32 Debug
|
||||
!MESSAGE No configuration specified. Defaulting to avicap - Win32 Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "avicap - Win32 Release" && "$(CFG)" != "avicap - Win32 Debug"
|
||||
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||
!MESSAGE You can specify a configuration when running NMAKE on this makefile
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Vidcap.mak" CFG="avicap - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "avicap - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "avicap - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
!ERROR An invalid configuration is specified.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
!ELSE
|
||||
NULL=nul
|
||||
!ENDIF
|
||||
################################################################################
|
||||
# Begin Project
|
||||
# PROP Target_Last_Scanned "avicap - Win32 Debug"
|
||||
MTL=mktyplib.exe
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "avicap - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
OUTDIR=.\Release
|
||||
INTDIR=.\Release
|
||||
|
||||
ALL : "$(OUTDIR)\Vidcap.exe"
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\Avicap.res"
|
||||
-@erase "$(INTDIR)\Bmpcap.obj"
|
||||
-@erase "$(INTDIR)\Main.obj"
|
||||
-@erase "$(INTDIR)\Mainwnd.obj"
|
||||
-@erase "$(INTDIR)\Optndlg.obj"
|
||||
-@erase "$(INTDIR)\Stdtmpl.obj"
|
||||
-@erase "$(INTDIR)\Vidcap.obj"
|
||||
-@erase "$(OUTDIR)\Vidcap.exe"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
|
||||
CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\
|
||||
/Fp"$(INTDIR)/Vidcap.pch" /YX /Fo"$(INTDIR)/" /c
|
||||
CPP_OBJS=.\Release/
|
||||
CPP_SBRS=.\.
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /win32
|
||||
MTL_PROJ=/nologo /D "NDEBUG" /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
RSC_PROJ=/l 0x409 /fo"$(INTDIR)/Avicap.res" /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)/Vidcap.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
|
||||
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
|
||||
odbccp32.lib /nologo /subsystem:windows /incremental:no\
|
||||
/pdb:"$(OUTDIR)/Vidcap.pdb" /machine:I386 /out:"$(OUTDIR)/Vidcap.exe"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\Avicap.res" \
|
||||
"$(INTDIR)\Bmpcap.obj" \
|
||||
"$(INTDIR)\Main.obj" \
|
||||
"$(INTDIR)\Mainwnd.obj" \
|
||||
"$(INTDIR)\Optndlg.obj" \
|
||||
"$(INTDIR)\Stdtmpl.obj" \
|
||||
"$(INTDIR)\Vidcap.obj" \
|
||||
"..\exe\mscommon.lib" \
|
||||
"..\exe\msdialog.lib"
|
||||
|
||||
"$(OUTDIR)\Vidcap.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "avicap - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "msvcobj"
|
||||
# PROP Intermediate_Dir "msvcobj"
|
||||
# PROP Target_Dir ""
|
||||
OUTDIR=.\msvcobj
|
||||
INTDIR=.\msvcobj
|
||||
|
||||
ALL : "$(OUTDIR)\Vidcap.exe"
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\Avicap.res"
|
||||
-@erase "$(INTDIR)\Bmpcap.obj"
|
||||
-@erase "$(INTDIR)\Main.obj"
|
||||
-@erase "$(INTDIR)\Mainwnd.obj"
|
||||
-@erase "$(INTDIR)\Optndlg.obj"
|
||||
-@erase "$(INTDIR)\Stdtmpl.obj"
|
||||
-@erase "$(INTDIR)\Vidcap.obj"
|
||||
-@erase "$(OUTDIR)\Vidcap.exe"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /Zp1 /MTd /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__FLAT__" /D "STRICT" /Fp"c:\work\exe\msvc42.pch" /YX /c
|
||||
CPP_PROJ=/nologo /Zp1 /MTd /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D\
|
||||
"__FLAT__" /D "STRICT" /Fp"c:\work\exe\msvc42.pch" /YX /Fo"$(INTDIR)/" /c
|
||||
CPP_OBJS=.\msvcobj/
|
||||
CPP_SBRS=.\.
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /win32
|
||||
MTL_PROJ=/nologo /D "_DEBUG" /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
RSC_PROJ=/l 0x409 /fo"$(INTDIR)/Avicap.res" /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)/Vidcap.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib /nologo /subsystem:windows /pdb:none /debug /machine:I386
|
||||
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
|
||||
advapi32.lib shell32.lib uuid.lib /nologo /subsystem:windows /pdb:none /debug\
|
||||
/machine:I386 /out:"$(OUTDIR)/Vidcap.exe"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\Avicap.res" \
|
||||
"$(INTDIR)\Bmpcap.obj" \
|
||||
"$(INTDIR)\Main.obj" \
|
||||
"$(INTDIR)\Mainwnd.obj" \
|
||||
"$(INTDIR)\Optndlg.obj" \
|
||||
"$(INTDIR)\Stdtmpl.obj" \
|
||||
"$(INTDIR)\Vidcap.obj" \
|
||||
"..\exe\mscommon.lib" \
|
||||
"..\exe\msdialog.lib"
|
||||
|
||||
"$(OUTDIR)\Vidcap.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
.c{$(CPP_OBJS)}.obj:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.cpp{$(CPP_OBJS)}.obj:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.cxx{$(CPP_OBJS)}.obj:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.c{$(CPP_SBRS)}.sbr:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.cpp{$(CPP_SBRS)}.sbr:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.cxx{$(CPP_SBRS)}.sbr:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
################################################################################
|
||||
# Begin Target
|
||||
|
||||
# Name "avicap - Win32 Release"
|
||||
# Name "avicap - Win32 Debug"
|
||||
|
||||
!IF "$(CFG)" == "avicap - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "avicap - Win32 Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Vidcap.cpp
|
||||
|
||||
!IF "$(CFG)" == "avicap - Win32 Release"
|
||||
|
||||
DEP_CPP_VIDCA=\
|
||||
{$(INCLUDE)}"\.\capparms.hpp"\
|
||||
{$(INCLUDE)}"\.\capstat.hpp"\
|
||||
{$(INCLUDE)}"\.\drvcaps.hpp"\
|
||||
{$(INCLUDE)}"\.\drvinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\vidcap.hpp"\
|
||||
{$(INCLUDE)}"\common\assert.hpp"\
|
||||
{$(INCLUDE)}"\common\avicap.hpp"\
|
||||
{$(INCLUDE)}"\common\block.hpp"\
|
||||
{$(INCLUDE)}"\common\block.tpp"\
|
||||
{$(INCLUDE)}"\common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.tpp"\
|
||||
{$(INCLUDE)}"\common\instance.hpp"\
|
||||
{$(INCLUDE)}"\common\mmsystem.hpp"\
|
||||
{$(INCLUDE)}"\common\point.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"\common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"\common\string.hpp"\
|
||||
{$(INCLUDE)}"\common\types.hpp"\
|
||||
{$(INCLUDE)}"\common\vfw.hpp"\
|
||||
{$(INCLUDE)}"\common\windows.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Vidcap.obj" : $(SOURCE) $(DEP_CPP_VIDCA) "$(INTDIR)"
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "avicap - Win32 Debug"
|
||||
|
||||
DEP_CPP_VIDCA=\
|
||||
{$(INCLUDE)}"\.\capparms.hpp"\
|
||||
{$(INCLUDE)}"\.\capstat.hpp"\
|
||||
{$(INCLUDE)}"\.\drvcaps.hpp"\
|
||||
{$(INCLUDE)}"\.\drvinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\vidcap.hpp"\
|
||||
{$(INCLUDE)}"\common\assert.hpp"\
|
||||
{$(INCLUDE)}"\common\avicap.hpp"\
|
||||
{$(INCLUDE)}"\common\block.hpp"\
|
||||
{$(INCLUDE)}"\common\block.tpp"\
|
||||
{$(INCLUDE)}"\common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.tpp"\
|
||||
{$(INCLUDE)}"\common\instance.hpp"\
|
||||
{$(INCLUDE)}"\common\mmsystem.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"\common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"\common\string.hpp"\
|
||||
{$(INCLUDE)}"\common\types.hpp"\
|
||||
{$(INCLUDE)}"\common\vfw.hpp"\
|
||||
{$(INCLUDE)}"\common\windows.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Vidcap.obj" : $(SOURCE) $(DEP_CPP_VIDCA) "$(INTDIR)"
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Bmpcap.cpp
|
||||
DEP_CPP_BMPCA=\
|
||||
{$(INCLUDE)}"\.\bmpcap.hpp"\
|
||||
{$(INCLUDE)}"\.\capparms.hpp"\
|
||||
{$(INCLUDE)}"\.\capstat.hpp"\
|
||||
{$(INCLUDE)}"\.\drvcaps.hpp"\
|
||||
{$(INCLUDE)}"\.\drvinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\vidcap.hpp"\
|
||||
{$(INCLUDE)}"\common\assert.hpp"\
|
||||
{$(INCLUDE)}"\common\avicap.hpp"\
|
||||
{$(INCLUDE)}"\common\bitmap.hpp"\
|
||||
{$(INCLUDE)}"\common\block.hpp"\
|
||||
{$(INCLUDE)}"\common\block.tpp"\
|
||||
{$(INCLUDE)}"\common\bmdata.hpp"\
|
||||
{$(INCLUDE)}"\common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"\common\boverlay.hpp"\
|
||||
{$(INCLUDE)}"\common\fixup.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.tpp"\
|
||||
{$(INCLUDE)}"\common\gdiobj.hpp"\
|
||||
{$(INCLUDE)}"\common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"\common\instance.hpp"\
|
||||
{$(INCLUDE)}"\common\mmsystem.hpp"\
|
||||
{$(INCLUDE)}"\common\palentry.hpp"\
|
||||
{$(INCLUDE)}"\common\pen.hpp"\
|
||||
{$(INCLUDE)}"\common\point.hpp"\
|
||||
{$(INCLUDE)}"\common\purebmp.hpp"\
|
||||
{$(INCLUDE)}"\common\purehdc.hpp"\
|
||||
{$(INCLUDE)}"\common\purepal.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.tpp"\
|
||||
{$(INCLUDE)}"\common\rect.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"\common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"\common\string.hpp"\
|
||||
{$(INCLUDE)}"\common\types.hpp"\
|
||||
{$(INCLUDE)}"\common\vfw.hpp"\
|
||||
{$(INCLUDE)}"\common\windows.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Bmpcap.obj" : $(SOURCE) $(DEP_CPP_BMPCA) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Main.cpp
|
||||
DEP_CPP_MAIN_=\
|
||||
{$(INCLUDE)}"\.\bmpcap.hpp"\
|
||||
{$(INCLUDE)}"\.\capparms.hpp"\
|
||||
{$(INCLUDE)}"\.\capstat.hpp"\
|
||||
{$(INCLUDE)}"\.\drvcaps.hpp"\
|
||||
{$(INCLUDE)}"\.\drvinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\main.hpp"\
|
||||
{$(INCLUDE)}"\.\mainwnd.hpp"\
|
||||
{$(INCLUDE)}"\.\optndlg.hpp"\
|
||||
{$(INCLUDE)}"\.\rinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\vidcap.hpp"\
|
||||
{$(INCLUDE)}"\common\assert.hpp"\
|
||||
{$(INCLUDE)}"\common\avicap.hpp"\
|
||||
{$(INCLUDE)}"\common\bitmap.hpp"\
|
||||
{$(INCLUDE)}"\common\block.hpp"\
|
||||
{$(INCLUDE)}"\common\block.tpp"\
|
||||
{$(INCLUDE)}"\common\bmdata.hpp"\
|
||||
{$(INCLUDE)}"\common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"\common\boverlay.hpp"\
|
||||
{$(INCLUDE)}"\common\callback.hpp"\
|
||||
{$(INCLUDE)}"\common\callback.tpp"\
|
||||
{$(INCLUDE)}"\common\cbdata.hpp"\
|
||||
{$(INCLUDE)}"\common\cbptr.hpp"\
|
||||
{$(INCLUDE)}"\common\dwindow.hpp"\
|
||||
{$(INCLUDE)}"\common\fixup.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.tpp"\
|
||||
{$(INCLUDE)}"\common\gdiobj.hpp"\
|
||||
{$(INCLUDE)}"\common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"\common\guiwnd.hpp"\
|
||||
{$(INCLUDE)}"\common\instance.hpp"\
|
||||
{$(INCLUDE)}"\common\mmsystem.hpp"\
|
||||
{$(INCLUDE)}"\common\palentry.hpp"\
|
||||
{$(INCLUDE)}"\common\pcallbck.hpp"\
|
||||
{$(INCLUDE)}"\common\pen.hpp"\
|
||||
{$(INCLUDE)}"\common\point.hpp"\
|
||||
{$(INCLUDE)}"\common\purebmp.hpp"\
|
||||
{$(INCLUDE)}"\common\purehdc.hpp"\
|
||||
{$(INCLUDE)}"\common\purepal.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.tpp"\
|
||||
{$(INCLUDE)}"\common\rect.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"\common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"\common\string.hpp"\
|
||||
{$(INCLUDE)}"\common\types.hpp"\
|
||||
{$(INCLUDE)}"\common\vfw.hpp"\
|
||||
{$(INCLUDE)}"\common\vhandler.hpp"\
|
||||
{$(INCLUDE)}"\common\window.hpp"\
|
||||
{$(INCLUDE)}"\common\windows.hpp"\
|
||||
{$(INCLUDE)}"\common\windowsx.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dlgitem.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dlgtmpl.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dyndlg.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Main.obj" : $(SOURCE) $(DEP_CPP_MAIN_) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Mainwnd.cpp
|
||||
DEP_CPP_MAINW=\
|
||||
{$(INCLUDE)}"\.\bmpcap.hpp"\
|
||||
{$(INCLUDE)}"\.\capparms.hpp"\
|
||||
{$(INCLUDE)}"\.\capstat.hpp"\
|
||||
{$(INCLUDE)}"\.\drvcaps.hpp"\
|
||||
{$(INCLUDE)}"\.\drvinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\mainwnd.hpp"\
|
||||
{$(INCLUDE)}"\.\optndlg.hpp"\
|
||||
{$(INCLUDE)}"\.\rinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\Rsrc.h"\
|
||||
{$(INCLUDE)}"\.\rsrc.hpp"\
|
||||
{$(INCLUDE)}"\.\vidcap.hpp"\
|
||||
{$(INCLUDE)}"\common\assert.hpp"\
|
||||
{$(INCLUDE)}"\common\avicap.hpp"\
|
||||
{$(INCLUDE)}"\common\bitmap.hpp"\
|
||||
{$(INCLUDE)}"\common\block.hpp"\
|
||||
{$(INCLUDE)}"\common\block.tpp"\
|
||||
{$(INCLUDE)}"\common\bmdata.hpp"\
|
||||
{$(INCLUDE)}"\common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"\common\boverlay.hpp"\
|
||||
{$(INCLUDE)}"\common\callback.hpp"\
|
||||
{$(INCLUDE)}"\common\callback.tpp"\
|
||||
{$(INCLUDE)}"\common\cbdata.hpp"\
|
||||
{$(INCLUDE)}"\common\cbptr.hpp"\
|
||||
{$(INCLUDE)}"\common\dwindow.hpp"\
|
||||
{$(INCLUDE)}"\common\fixup.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.tpp"\
|
||||
{$(INCLUDE)}"\common\gdiobj.hpp"\
|
||||
{$(INCLUDE)}"\common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"\common\guiwnd.hpp"\
|
||||
{$(INCLUDE)}"\common\instance.hpp"\
|
||||
{$(INCLUDE)}"\common\mmsystem.hpp"\
|
||||
{$(INCLUDE)}"\common\palentry.hpp"\
|
||||
{$(INCLUDE)}"\common\pcallbck.hpp"\
|
||||
{$(INCLUDE)}"\common\pen.hpp"\
|
||||
{$(INCLUDE)}"\common\point.hpp"\
|
||||
{$(INCLUDE)}"\common\purebmp.hpp"\
|
||||
{$(INCLUDE)}"\common\purehdc.hpp"\
|
||||
{$(INCLUDE)}"\common\purepal.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.tpp"\
|
||||
{$(INCLUDE)}"\common\rect.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"\common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"\common\string.hpp"\
|
||||
{$(INCLUDE)}"\common\types.hpp"\
|
||||
{$(INCLUDE)}"\common\vfw.hpp"\
|
||||
{$(INCLUDE)}"\common\vhandler.hpp"\
|
||||
{$(INCLUDE)}"\common\window.hpp"\
|
||||
{$(INCLUDE)}"\common\windows.hpp"\
|
||||
{$(INCLUDE)}"\common\windowsx.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dlgitem.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dlgtmpl.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dyndlg.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Mainwnd.obj" : $(SOURCE) $(DEP_CPP_MAINW) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Optndlg.cpp
|
||||
DEP_CPP_OPTND=\
|
||||
{$(INCLUDE)}"\.\optndlg.hpp"\
|
||||
{$(INCLUDE)}"\.\rinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\Rsrc.h"\
|
||||
{$(INCLUDE)}"\.\rsrc.hpp"\
|
||||
{$(INCLUDE)}"\common\assert.hpp"\
|
||||
{$(INCLUDE)}"\common\block.hpp"\
|
||||
{$(INCLUDE)}"\common\block.tpp"\
|
||||
{$(INCLUDE)}"\common\callback.hpp"\
|
||||
{$(INCLUDE)}"\common\callback.tpp"\
|
||||
{$(INCLUDE)}"\common\cbdata.hpp"\
|
||||
{$(INCLUDE)}"\common\cbptr.hpp"\
|
||||
{$(INCLUDE)}"\common\diskinfo.hpp"\
|
||||
{$(INCLUDE)}"\common\dwindow.hpp"\
|
||||
{$(INCLUDE)}"\common\filetime.hpp"\
|
||||
{$(INCLUDE)}"\common\finddata.hpp"\
|
||||
{$(INCLUDE)}"\common\fixup.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.tpp"\
|
||||
{$(INCLUDE)}"\common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"\common\guiwnd.hpp"\
|
||||
{$(INCLUDE)}"\common\pcallbck.hpp"\
|
||||
{$(INCLUDE)}"\common\point.hpp"\
|
||||
{$(INCLUDE)}"\common\profile.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.tpp"\
|
||||
{$(INCLUDE)}"\common\rect.hpp"\
|
||||
{$(INCLUDE)}"\common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"\common\string.hpp"\
|
||||
{$(INCLUDE)}"\common\systime.hpp"\
|
||||
{$(INCLUDE)}"\common\types.hpp"\
|
||||
{$(INCLUDE)}"\common\vhandler.hpp"\
|
||||
{$(INCLUDE)}"\common\windows.hpp"\
|
||||
{$(INCLUDE)}"\common\windowsx.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dlgitem.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dlgtmpl.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dyndlg.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Optndlg.obj" : $(SOURCE) $(DEP_CPP_OPTND) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Stdtmpl.cpp
|
||||
|
||||
!IF "$(CFG)" == "avicap - Win32 Release"
|
||||
|
||||
DEP_CPP_STDTM=\
|
||||
{$(INCLUDE)}"\.\bmpcap.hpp"\
|
||||
{$(INCLUDE)}"\.\capparms.hpp"\
|
||||
{$(INCLUDE)}"\.\capstat.hpp"\
|
||||
{$(INCLUDE)}"\.\drvcaps.hpp"\
|
||||
{$(INCLUDE)}"\.\drvinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\mainwnd.hpp"\
|
||||
{$(INCLUDE)}"\.\optndlg.hpp"\
|
||||
{$(INCLUDE)}"\.\rinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\vidcap.hpp"\
|
||||
{$(INCLUDE)}"\common\assert.hpp"\
|
||||
{$(INCLUDE)}"\common\avicap.hpp"\
|
||||
{$(INCLUDE)}"\common\bitmap.hpp"\
|
||||
{$(INCLUDE)}"\common\block.hpp"\
|
||||
{$(INCLUDE)}"\common\block.tpp"\
|
||||
{$(INCLUDE)}"\common\bmdata.hpp"\
|
||||
{$(INCLUDE)}"\common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"\common\boverlay.hpp"\
|
||||
{$(INCLUDE)}"\common\callback.hpp"\
|
||||
{$(INCLUDE)}"\common\callback.tpp"\
|
||||
{$(INCLUDE)}"\common\cbdata.hpp"\
|
||||
{$(INCLUDE)}"\common\cbptr.hpp"\
|
||||
{$(INCLUDE)}"\common\commctrl.hpp"\
|
||||
{$(INCLUDE)}"\common\dwindow.hpp"\
|
||||
{$(INCLUDE)}"\common\filemap.hpp"\
|
||||
{$(INCLUDE)}"\common\fixup.hpp"\
|
||||
{$(INCLUDE)}"\common\font.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.tpp"\
|
||||
{$(INCLUDE)}"\common\gdiobj.hpp"\
|
||||
{$(INCLUDE)}"\common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"\common\guiwnd.hpp"\
|
||||
{$(INCLUDE)}"\common\instance.hpp"\
|
||||
{$(INCLUDE)}"\common\mmsystem.hpp"\
|
||||
{$(INCLUDE)}"\common\palentry.hpp"\
|
||||
{$(INCLUDE)}"\common\pcallbck.hpp"\
|
||||
{$(INCLUDE)}"\common\pen.hpp"\
|
||||
{$(INCLUDE)}"\common\point.hpp"\
|
||||
{$(INCLUDE)}"\common\progress.hpp"\
|
||||
{$(INCLUDE)}"\common\purebmp.hpp"\
|
||||
{$(INCLUDE)}"\common\purehdc.hpp"\
|
||||
{$(INCLUDE)}"\common\purepal.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.tpp"\
|
||||
{$(INCLUDE)}"\common\qsort.hpp"\
|
||||
{$(INCLUDE)}"\common\qsort.tpp"\
|
||||
{$(INCLUDE)}"\common\rect.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"\common\sortopt.hpp"\
|
||||
{$(INCLUDE)}"\common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"\common\string.hpp"\
|
||||
{$(INCLUDE)}"\common\types.hpp"\
|
||||
{$(INCLUDE)}"\common\vfw.hpp"\
|
||||
{$(INCLUDE)}"\common\vhandler.hpp"\
|
||||
{$(INCLUDE)}"\common\window.hpp"\
|
||||
{$(INCLUDE)}"\common\windows.hpp"\
|
||||
{$(INCLUDE)}"\common\windowsx.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dlgitem.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dlgtmpl.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dyndlg.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Stdtmpl.obj" : $(SOURCE) $(DEP_CPP_STDTM) "$(INTDIR)"
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "avicap - Win32 Debug"
|
||||
|
||||
DEP_CPP_STDTM=\
|
||||
{$(INCLUDE)}"\.\bmpcap.hpp"\
|
||||
{$(INCLUDE)}"\.\capparms.hpp"\
|
||||
{$(INCLUDE)}"\.\capstat.hpp"\
|
||||
{$(INCLUDE)}"\.\drvcaps.hpp"\
|
||||
{$(INCLUDE)}"\.\drvinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\mainwnd.hpp"\
|
||||
{$(INCLUDE)}"\.\optndlg.hpp"\
|
||||
{$(INCLUDE)}"\.\rinfo.hpp"\
|
||||
{$(INCLUDE)}"\.\vidcap.hpp"\
|
||||
{$(INCLUDE)}"\common\assert.hpp"\
|
||||
{$(INCLUDE)}"\common\avicap.hpp"\
|
||||
{$(INCLUDE)}"\common\bitmap.hpp"\
|
||||
{$(INCLUDE)}"\common\block.hpp"\
|
||||
{$(INCLUDE)}"\common\block.tpp"\
|
||||
{$(INCLUDE)}"\common\bmdata.hpp"\
|
||||
{$(INCLUDE)}"\common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"\common\boverlay.hpp"\
|
||||
{$(INCLUDE)}"\common\callback.hpp"\
|
||||
{$(INCLUDE)}"\common\callback.tpp"\
|
||||
{$(INCLUDE)}"\common\cbdata.hpp"\
|
||||
{$(INCLUDE)}"\common\cbptr.hpp"\
|
||||
{$(INCLUDE)}"\common\commctrl.hpp"\
|
||||
{$(INCLUDE)}"\common\dwindow.hpp"\
|
||||
{$(INCLUDE)}"\common\filemap.hpp"\
|
||||
{$(INCLUDE)}"\common\fixup.hpp"\
|
||||
{$(INCLUDE)}"\common\font.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.hpp"\
|
||||
{$(INCLUDE)}"\common\gdata.tpp"\
|
||||
{$(INCLUDE)}"\common\gdiobj.hpp"\
|
||||
{$(INCLUDE)}"\common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"\common\guiwnd.hpp"\
|
||||
{$(INCLUDE)}"\common\iconbmp.hpp"\
|
||||
{$(INCLUDE)}"\common\iconfrm.hpp"\
|
||||
{$(INCLUDE)}"\common\iconinfo.hpp"\
|
||||
{$(INCLUDE)}"\common\instance.hpp"\
|
||||
{$(INCLUDE)}"\common\mmsystem.hpp"\
|
||||
{$(INCLUDE)}"\common\mmtimer.hpp"\
|
||||
{$(INCLUDE)}"\common\palentry.hpp"\
|
||||
{$(INCLUDE)}"\common\pcallbck.hpp"\
|
||||
{$(INCLUDE)}"\common\pen.hpp"\
|
||||
{$(INCLUDE)}"\common\point.hpp"\
|
||||
{$(INCLUDE)}"\common\progress.hpp"\
|
||||
{$(INCLUDE)}"\common\purebmp.hpp"\
|
||||
{$(INCLUDE)}"\common\purehdc.hpp"\
|
||||
{$(INCLUDE)}"\common\pureicon.hpp"\
|
||||
{$(INCLUDE)}"\common\purepal.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.hpp"\
|
||||
{$(INCLUDE)}"\common\pvector.tpp"\
|
||||
{$(INCLUDE)}"\common\qsort.hpp"\
|
||||
{$(INCLUDE)}"\common\qsort.tpp"\
|
||||
{$(INCLUDE)}"\common\rect.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"\common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"\common\sortopt.hpp"\
|
||||
{$(INCLUDE)}"\common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"\common\string.hpp"\
|
||||
{$(INCLUDE)}"\common\types.hpp"\
|
||||
{$(INCLUDE)}"\common\vfw.hpp"\
|
||||
{$(INCLUDE)}"\common\vhandler.hpp"\
|
||||
{$(INCLUDE)}"\common\window.hpp"\
|
||||
{$(INCLUDE)}"\common\windows.hpp"\
|
||||
{$(INCLUDE)}"\common\windowsx.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dlgitem.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dlgtmpl.hpp"\
|
||||
{$(INCLUDE)}"\dialog\dyndlg.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Stdtmpl.obj" : $(SOURCE) $(DEP_CPP_STDTM) "$(INTDIR)"
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Avicap.rc
|
||||
|
||||
"$(INTDIR)\Avicap.res" : $(SOURCE) "$(INTDIR)"
|
||||
$(RSC) $(RSC_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=\work\exe\mscommon.lib
|
||||
|
||||
!IF "$(CFG)" == "avicap - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "avicap - Win32 Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=\work\exe\msdialog.lib
|
||||
|
||||
!IF "$(CFG)" == "avicap - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "avicap - Win32 Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
################################################################################
|
||||
186
vidcap/Vidcap.dsp
Normal file
186
vidcap/Vidcap.dsp
Normal file
@@ -0,0 +1,186 @@
|
||||
# Microsoft Developer Studio Project File - Name="avicap" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=avicap - Win32 Release
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Vidcap.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Vidcap.mak" CFG="avicap - Win32 Release"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "avicap - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "avicap - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "avicap - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ".\Release"
|
||||
# PROP BASE Intermediate_Dir ".\Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ".\Release"
|
||||
# PROP Intermediate_Dir ".\Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "avicap - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir ".\Debug"
|
||||
# PROP BASE Intermediate_Dir ".\Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ".\msvcobj"
|
||||
# PROP Intermediate_Dir ".\msvcobj"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /Gz /MTd /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__FLAT__" /D "STRICT" /Fp"\work\exe\msvc42.pch" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib vfw32.lib comctl32.lib /nologo /subsystem:windows /pdb:none /debug /machine:I386
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "avicap - Win32 Release"
|
||||
# Name "avicap - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Avicap.rc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Bmpcap.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\entrydlg.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Main.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Mainwnd.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\opendir.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\srcdlg.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Vidcap.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\VidReg.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bmpcap.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\capparms.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\capstat.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\drvcaps.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\drvinfo.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\main.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mainwnd.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\optndlg.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\rinfo.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Rsrc.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\rsrc.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\vidcap.hpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
63
vidcap/Vidcap.plg
Normal file
63
vidcap/Vidcap.plg
Normal file
@@ -0,0 +1,63 @@
|
||||
<html>
|
||||
<body>
|
||||
<pre>
|
||||
<h1>Build Log</h1>
|
||||
<h3>
|
||||
--------------------Configuration: avicap - Win32 Debug--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "C:\DOCUME~1\sean\LOCALS~1\Temp\RSP263.tmp" with contents
|
||||
[
|
||||
/nologo /Gz /MTd /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__FLAT__" /D "STRICT" /Fp"\work\exe\msvc42.pch" /YX /Fo".\msvcobj/" /Fd".\msvcobj/" /FD /c
|
||||
"D:\work\vidcap\Bmpcap.cpp"
|
||||
"D:\work\vidcap\entrydlg.cpp"
|
||||
"D:\work\vidcap\Main.cpp"
|
||||
"D:\work\vidcap\Mainwnd.cpp"
|
||||
"D:\work\vidcap\opendir.cpp"
|
||||
"D:\work\vidcap\srcdlg.cpp"
|
||||
"D:\work\vidcap\Vidcap.cpp"
|
||||
"D:\work\vidcap\VidReg.cpp"
|
||||
]
|
||||
Creating command line "cl.exe @C:\DOCUME~1\sean\LOCALS~1\Temp\RSP263.tmp"
|
||||
Creating temporary file "C:\DOCUME~1\sean\LOCALS~1\Temp\RSP264.tmp" with contents
|
||||
[
|
||||
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib vfw32.lib comctl32.lib /nologo /subsystem:windows /pdb:none /debug /machine:I386 /out:".\msvcobj/Vidcap.exe"
|
||||
.\msvcobj\Bmpcap.obj
|
||||
.\msvcobj\entrydlg.obj
|
||||
.\msvcobj\Main.obj
|
||||
.\msvcobj\Mainwnd.obj
|
||||
.\msvcobj\opendir.obj
|
||||
.\msvcobj\srcdlg.obj
|
||||
.\msvcobj\Vidcap.obj
|
||||
.\msvcobj\VidReg.obj
|
||||
.\msvcobj\Avicap.res
|
||||
\work\exe\mscommon.lib
|
||||
\work\exe\msdialog.lib
|
||||
\work\exe\msbsp.lib
|
||||
"\parts\jpeg-6b\lib\jpeg6b.lib"
|
||||
\work\exe\jpgimg.lib
|
||||
\work\codec\Debug\codec.lib
|
||||
\work\exe\statbar.lib
|
||||
\work\exe\mshook.lib
|
||||
]
|
||||
Creating command line "link.exe @C:\DOCUME~1\sean\LOCALS~1\Temp\RSP264.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
Bmpcap.cpp
|
||||
entrydlg.cpp
|
||||
Main.cpp
|
||||
Mainwnd.cpp
|
||||
opendir.cpp
|
||||
srcdlg.cpp
|
||||
Vidcap.cpp
|
||||
VidReg.cpp
|
||||
Linking...
|
||||
Creating library .\msvcobj/Vidcap.lib and object .\msvcobj/Vidcap.exp
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
Vidcap.exe - 0 error(s), 0 warning(s)
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
BIN
vidcap/avicap.aps
Normal file
BIN
vidcap/avicap.aps
Normal file
Binary file not shown.
181
vidcap/avicap.rc
Normal file
181
vidcap/avicap.rc
Normal file
@@ -0,0 +1,181 @@
|
||||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#define APSTUDIO_HIDDEN_SYMBOLS
|
||||
#include "windows.h"
|
||||
#undef APSTUDIO_HIDDEN_SYMBOLS
|
||||
#include "rsrc.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Menu
|
||||
//
|
||||
|
||||
CAPMENU MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "&File"
|
||||
BEGIN
|
||||
MENUITEM "&Open...", FILE_OPEN
|
||||
MENUITEM "&Close", FILE_CLOSE, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Exit", FILE_EXIT
|
||||
END
|
||||
POPUP "&Options"
|
||||
BEGIN
|
||||
MENUITEM "Save Frames", CAPMENU_OPTIONS_SAVE_FRAMES
|
||||
, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Grab Frame", CAPMENU_OPTIONS_GRABFRAME
|
||||
, GRAYED
|
||||
MENUITEM "Grab Frame &NoStop", CAPMENU_OPTIONS_GRABFRAMENOSTOP
|
||||
, GRAYED
|
||||
MENUITEM "&Preview", CAPMENU_OPTIONS_PREVIEW
|
||||
, GRAYED
|
||||
END
|
||||
POPUP "&Configuration"
|
||||
BEGIN
|
||||
MENUITEM "&Display...", CAPMENU_DIALOGVIDEODISPLAY
|
||||
, GRAYED
|
||||
MENUITEM "&Source...", CAPMENU_DIALOGVIDEOSOURCE
|
||||
, GRAYED
|
||||
MENUITEM "&Format...", CAPMENU_DIALOGVIDEOFORMAT
|
||||
, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Settings...", CAPMENU_SETTINGS
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
SETTINGS DIALOG DISCARDABLE 6, 15, 311, 130
|
||||
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "Settings"
|
||||
FONT 6, "MS Sans Serif"
|
||||
BEGIN
|
||||
EDITTEXT SETTINGS_CAPTUREFILE,49,42,174,12,ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "&Cancel",IDCANCEL,254,20,50,14
|
||||
PUSHBUTTON "&OK",IDOK,254,4,50,14
|
||||
LTEXT "Capure File:",-1,5,43,43,8
|
||||
GROUPBOX "Capture",-1,2,5,251,115
|
||||
PUSHBUTTON "...",SETTINGS_BROWSE,223,41,13,14
|
||||
CONTROL "Use Sequencing",SETTINGS_USESEQUENCING,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,9,23,69,10
|
||||
CONTROL "320x240",SETTINGS_PREVIEW_320x240,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,11,70,43,10
|
||||
CONTROL "640x480",SETTINGS_PREVIEW_640x480,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,11,86,43,10
|
||||
GROUPBOX "Preview",-1,6,60,69,46
|
||||
GROUPBOX "Frame Grab",-1,87,60,69,46
|
||||
CONTROL "320x240",SETTINGS_CAPTURE_320x240,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,92,70,43,10
|
||||
CONTROL "640x480",SETTINGS_CAPTURE_640x480,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,94,86,43,10
|
||||
LTEXT "Preview Rate:",-1,81,24,46,8
|
||||
COMBOBOX SETTINGS_PREVIEW_RATE,132,22,62,44,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "(ms)",-1,197,24,14,8
|
||||
END
|
||||
|
||||
SOURCE DIALOG DISCARDABLE 0, 0, 284, 122
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Capture Source"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,227,7,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,227,24,50,14
|
||||
LISTBOX SOURCE_LIST,14,24,204,81,LBS_NOINTEGRALHEIGHT |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
|
||||
"#include ""windows.h""\r\n"
|
||||
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
|
||||
"#include ""rsrc.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
"SETTINGS", DIALOG
|
||||
BEGIN
|
||||
TOPMARGIN, 4
|
||||
BOTTOMMARGIN, 103
|
||||
END
|
||||
|
||||
"SOURCE", DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 277
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 115
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
173
vidcap/entrydlg.cpp
Normal file
173
vidcap/entrydlg.cpp
Normal file
@@ -0,0 +1,173 @@
|
||||
#include <vidcap/entrydlg.hpp>
|
||||
#include <vidcap/opendir.hpp>
|
||||
#include <common/opndlgex.hpp>
|
||||
#include <common/profile.hpp>
|
||||
#include <common/control.hpp>
|
||||
|
||||
WORD EntryDialog::perform()
|
||||
{
|
||||
WORD resultCode(::DialogBoxParam(processInstance(),(LPSTR)"SETTINGS",mhParent,(DLGPROC)DWindow::DlgProc,(LONG)((DWindow*)this)));
|
||||
return resultCode;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType EntryDialog::initDialogHandler(CallbackData &/*someCallbackData*/)
|
||||
{
|
||||
mPreviewRate=new Control(getItem(SETTINGS_PREVIEW_RATE),SETTINGS_PREVIEW_RATE,false);
|
||||
mPreviewRate.disposition(PointerDisposition::Delete);
|
||||
setPreviewRates();
|
||||
getParams();
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType EntryDialog::dialogCodeHandler(CallbackData &/*someCallbackData*/)
|
||||
{
|
||||
return (CallbackData::ReturnType)DLGC_WANTALLKEYS;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType EntryDialog::commandHandler(CallbackData &someCallbackData)
|
||||
{
|
||||
switch(someCallbackData.wmCommandID())
|
||||
{
|
||||
case IDOK :
|
||||
setParams();
|
||||
endDialog(true);
|
||||
break;
|
||||
case IDCANCEL :
|
||||
endDialog(false);
|
||||
break;
|
||||
case SETTINGS_PREVIEW_640x480 :
|
||||
if(BN_CLICKED==someCallbackData.wmCommandCommand())
|
||||
sendMessage(SETTINGS_PREVIEW_320x240,BM_SETCHECK,0,0L);
|
||||
break;
|
||||
case SETTINGS_PREVIEW_320x240 :
|
||||
if(BN_CLICKED==someCallbackData.wmCommandCommand())
|
||||
sendMessage(SETTINGS_PREVIEW_640x480,BM_SETCHECK,0,0L);
|
||||
break;
|
||||
case SETTINGS_CAPTURE_320x240 :
|
||||
if(BN_CLICKED==someCallbackData.wmCommandCommand())
|
||||
sendMessage(SETTINGS_CAPTURE_640x480,BM_SETCHECK,0,0L);
|
||||
break;
|
||||
case SETTINGS_CAPTURE_640x480 :
|
||||
if(BN_CLICKED==someCallbackData.wmCommandCommand())
|
||||
sendMessage(SETTINGS_CAPTURE_320x240,BM_SETCHECK,0,0L);
|
||||
break;
|
||||
case SETTINGS_BROWSE :
|
||||
handleBrowse();
|
||||
break;
|
||||
}
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
void EntryDialog::handleBrowse(void)
|
||||
{
|
||||
OpenDirectory openDir;
|
||||
String strDirectory;
|
||||
String strFileName;
|
||||
|
||||
if(openDir.getOpenDirectory(*this,"Choose Path",".",strDirectory))
|
||||
{
|
||||
Profile profile;
|
||||
getText(SETTINGS_CAPTUREFILE,strFileName);
|
||||
profile.makeFileName(strFileName,strFileName);
|
||||
if(!(strDirectory[(DWORD)strDirectory.length()-1]=='\\'))strDirectory+="\\";
|
||||
setText(SETTINGS_CAPTUREFILE,strDirectory+strFileName);
|
||||
}
|
||||
}
|
||||
|
||||
void EntryDialog::getParams()
|
||||
{
|
||||
selectPreviewRate(mVidReg.getPreviewRate());
|
||||
setText(SETTINGS_CAPTUREFILE,mVidReg.getCaptureFile());
|
||||
if(mVidReg.getSequencing())sendMessage(SETTINGS_USESEQUENCING,BM_SETCHECK,true,0);
|
||||
if(320==mVidReg.getPreviewWidth())sendMessage(SETTINGS_PREVIEW_320x240,BM_SETCHECK,true,0);
|
||||
else sendMessage(SETTINGS_PREVIEW_640x480,BM_SETCHECK,true,0);
|
||||
if(320==mVidReg.getCaptureWidth())sendMessage(SETTINGS_CAPTURE_320x240,BM_SETCHECK,true,0);
|
||||
else sendMessage(SETTINGS_CAPTURE_640x480,BM_SETCHECK,true,0);
|
||||
}
|
||||
|
||||
void EntryDialog::setParams(void)
|
||||
{
|
||||
String strCaptureFile;
|
||||
|
||||
getText(SETTINGS_CAPTUREFILE,strCaptureFile);
|
||||
if(!verifyCaptureFile(strCaptureFile))return;
|
||||
if(!strCaptureFile.isNull())mVidReg.setCaptureFile(strCaptureFile);
|
||||
mVidReg.setPreviewRate(getPreviewRate());
|
||||
if(sendMessage(SETTINGS_USESEQUENCING,BM_GETCHECK,0,0L))mVidReg.setSequencing(true);
|
||||
else mVidReg.setSequencing(false);
|
||||
if(sendMessage(SETTINGS_PREVIEW_320x240,BM_GETCHECK,0,0L))
|
||||
{
|
||||
mVidReg.setPreviewWidth(320);
|
||||
mVidReg.setPreviewHeight(240);
|
||||
}
|
||||
else
|
||||
{
|
||||
mVidReg.setPreviewWidth(640);
|
||||
mVidReg.setPreviewHeight(480);
|
||||
}
|
||||
if(sendMessage(SETTINGS_CAPTURE_320x240,BM_GETCHECK,0,0L))
|
||||
{
|
||||
mVidReg.setCaptureWidth(320);
|
||||
mVidReg.setCaptureHeight(240);
|
||||
}
|
||||
else
|
||||
{
|
||||
mVidReg.setCaptureWidth(640);
|
||||
mVidReg.setCaptureHeight(480);
|
||||
}
|
||||
}
|
||||
|
||||
bool EntryDialog::verifyCaptureFile(const String &strCaptureFile)
|
||||
{
|
||||
Profile profile;
|
||||
DiskInfo diskInfo;
|
||||
String strDirectory;
|
||||
|
||||
strDirectory=strCaptureFile;
|
||||
profile.makeDirectoryName(strDirectory);
|
||||
if(profile.verifyDirectory(strDirectory))return true;
|
||||
if(IDCANCEL==::MessageBox(*this,strDirectory,"Create Dirctory",MB_OKCANCEL))return false;
|
||||
if(!diskInfo.createDirectory(strDirectory))return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void EntryDialog::selectPreviewRate(DWORD previewRate)
|
||||
{
|
||||
String strPreviewRate;
|
||||
int entries=mPreviewRate->sendMessage(CB_GETCOUNT,0,0L);
|
||||
bool itemSelected=false;
|
||||
for(int index=0;index<entries;index++)
|
||||
{
|
||||
mPreviewRate->sendMessage(CB_GETLBTEXT,index,(LPARAM)(LPSTR)strPreviewRate);
|
||||
if(previewRate==strPreviewRate.toInt())
|
||||
{
|
||||
mPreviewRate->sendMessage(CB_SETCURSEL,index,0L);
|
||||
itemSelected=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!itemSelected)mPreviewRate->sendMessage(CB_SETCURSEL,0,0L);
|
||||
}
|
||||
|
||||
DWORD EntryDialog::getPreviewRate(void)
|
||||
{
|
||||
String strPreviewRate;
|
||||
int index=mPreviewRate->sendMessage(CB_GETCURSEL,0,0L);
|
||||
mPreviewRate->sendMessage(CB_GETLBTEXT,index,(LPARAM)(LPSTR)strPreviewRate);
|
||||
if(strPreviewRate.isNull())return 0;
|
||||
return strPreviewRate.toInt();
|
||||
}
|
||||
|
||||
void EntryDialog::setPreviewRates(void)
|
||||
{
|
||||
mPreviewRate->sendMessage(CB_INSERTSTRING,-1,(LPARAM)"25");
|
||||
mPreviewRate->sendMessage(CB_INSERTSTRING,-1,(LPARAM)"50");
|
||||
mPreviewRate->sendMessage(CB_INSERTSTRING,-1,(LPARAM)"100");
|
||||
mPreviewRate->sendMessage(CB_INSERTSTRING,-1,(LPARAM)"150");
|
||||
mPreviewRate->sendMessage(CB_INSERTSTRING,-1,(LPARAM)"200");
|
||||
mPreviewRate->sendMessage(CB_INSERTSTRING,-1,(LPARAM)"250");
|
||||
mPreviewRate->sendMessage(CB_INSERTSTRING,-1,(LPARAM)"500");
|
||||
mPreviewRate->sendMessage(CB_INSERTSTRING,-1,(LPARAM)"1000");
|
||||
mPreviewRate->sendMessage(CB_INSERTSTRING,-1,(LPARAM)"15000");
|
||||
mPreviewRate->sendMessage(CB_INSERTSTRING,-1,(LPARAM)"30000");
|
||||
}
|
||||
78
vidcap/entrydlg.hpp
Normal file
78
vidcap/entrydlg.hpp
Normal file
@@ -0,0 +1,78 @@
|
||||
#ifndef _VIDCAP_ENTRYDLG_HPP_
|
||||
#define _VIDCAP_ENTRYDLG_HPP_
|
||||
#ifndef _COMMON_DWINDOW_HPP_
|
||||
#include <common/dwindow.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_WINDOW_HPP_
|
||||
#include <common/window.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_STRING_HPP_
|
||||
#include <common/string.hpp>
|
||||
#endif
|
||||
#ifndef _VIDCAP_VIDREG_HPP_
|
||||
#include <vidcap/vidreg.hpp>
|
||||
#endif
|
||||
|
||||
class EntryDialog : private DWindow
|
||||
{
|
||||
public:
|
||||
EntryDialog(const GUIWindow &parentWindow);
|
||||
virtual ~EntryDialog();
|
||||
WORD perform(void);
|
||||
private:
|
||||
EntryDialog(const EntryDialog &someEntryDialog);
|
||||
EntryDialog &operator=(const EntryDialog &someEntryDialog);
|
||||
CallbackData::ReturnType initDialogHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType commandHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType dialogCodeHandler(CallbackData &someCallbackData);
|
||||
void handleBrowse(void);
|
||||
void setParams(void);
|
||||
void getParams(void);
|
||||
void setPreviewRates(void);
|
||||
void selectPreviewRate(DWORD previewRate);
|
||||
DWORD getPreviewRate(void);
|
||||
bool verifyCaptureFile(const String &strCaptureFile);
|
||||
|
||||
Callback<EntryDialog> mInitDialogHandler;
|
||||
Callback<EntryDialog> mCommandHandler;
|
||||
Callback<EntryDialog> mDialogCodeHandler;
|
||||
SmartPointer<Control> mPreviewRate;
|
||||
VidReg mVidReg;
|
||||
HWND mhParent;
|
||||
};
|
||||
|
||||
inline
|
||||
EntryDialog::EntryDialog(const GUIWindow &parentWindow)
|
||||
: mhParent(parentWindow)
|
||||
{
|
||||
mInitDialogHandler.setCallback(this,&EntryDialog::initDialogHandler);
|
||||
mCommandHandler.setCallback(this,&EntryDialog::commandHandler);
|
||||
mDialogCodeHandler.setCallback(this,&EntryDialog::dialogCodeHandler);
|
||||
insertHandler(VectorHandler::CommandHandler,&mCommandHandler);
|
||||
insertHandler(VectorHandler::InitDialogHandler,&mInitDialogHandler);
|
||||
insertHandler(VectorHandler::DialogCodeHandler,&mDialogCodeHandler);
|
||||
}
|
||||
|
||||
inline
|
||||
EntryDialog::EntryDialog(const EntryDialog &someEntryDialog)
|
||||
: mhParent(someEntryDialog.mhParent)
|
||||
{ // no implementation
|
||||
mInitDialogHandler.setCallback(this,&EntryDialog::initDialogHandler);
|
||||
mCommandHandler.setCallback(this,&EntryDialog::commandHandler);
|
||||
mDialogCodeHandler.setCallback(this,&EntryDialog::dialogCodeHandler);
|
||||
}
|
||||
|
||||
inline
|
||||
EntryDialog::~EntryDialog()
|
||||
{
|
||||
removeHandler(VectorHandler::CommandHandler,&mCommandHandler);
|
||||
removeHandler(VectorHandler::InitDialogHandler,&mInitDialogHandler);
|
||||
removeHandler(VectorHandler::DialogCodeHandler,&mDialogCodeHandler);
|
||||
}
|
||||
|
||||
inline
|
||||
EntryDialog &EntryDialog::operator=(const EntryDialog &/*someEntryDialog*/)
|
||||
{ // no implementation
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
184
vidcap/opendir.cpp
Normal file
184
vidcap/opendir.cpp
Normal file
@@ -0,0 +1,184 @@
|
||||
#include <vidcap/opendir.hpp>
|
||||
#include <common/guiwnd.hpp>
|
||||
#include <common/diskinfo.hpp>
|
||||
|
||||
OpenDirectory::OpenDirectory(void)
|
||||
{
|
||||
}
|
||||
|
||||
OpenDirectory::~OpenDirectory()
|
||||
{
|
||||
}
|
||||
|
||||
bool OpenDirectory::getOpenDirectory(GUIWindow &parentWindow,const String &titleString,const String &strInitialDirectory,String &strDirectory)
|
||||
{
|
||||
DiskInfo diskInfo;
|
||||
String strCurrentDirectory;
|
||||
|
||||
if(strInitialDirectory.isNull())diskInfo.getCurrentDirectory(strCurrentDirectory);
|
||||
else strCurrentDirectory=strInitialDirectory;
|
||||
owner(parentWindow);
|
||||
instance(parentWindow.processInstance());
|
||||
filter("..;.");
|
||||
filterPattern("..;.");
|
||||
fileName("");
|
||||
fileTitle("");
|
||||
initialDirectory(strCurrentDirectory);
|
||||
title(titleString);
|
||||
creationFlags(OpenDialog::EXPLORER|OpenDialog::FILEMUSTEXIST|OpenDialog::ENABLEHOOK);
|
||||
OpenDialog::hookProc((LPOFNHOOKPROC)getHookAddress());
|
||||
mLastFolderChange=String("");
|
||||
if(!getOpenFileName())return false;
|
||||
strDirectory=mLastFolderChange;
|
||||
return true;
|
||||
}
|
||||
|
||||
OpenDirectory::OpenDirectory(const OpenDirectory &someOpenDirectory)
|
||||
{ // private implementation
|
||||
*this=someOpenDirectory;
|
||||
}
|
||||
|
||||
OpenDirectory &OpenDirectory::operator=(const OpenDirectory &/*someOpenDirectory*/)
|
||||
{ // private implementation
|
||||
return *this;
|
||||
}
|
||||
|
||||
UINT OpenDirectory::hookProc(HWND hDlg,UINT uiMsg,WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
UINT returnCode(false);
|
||||
switch(uiMsg)
|
||||
{
|
||||
case WM_NOTIFY :
|
||||
{
|
||||
LPOFNOTIFY pNotify=(LPOFNOTIFY)lParam;
|
||||
switch(pNotify->hdr.code)
|
||||
{
|
||||
case CDN_INITDONE :
|
||||
::EnableWindow(::GetDlgItem(getParent(),FileNameEditControlID),false);
|
||||
returnCode=handleInitDone();
|
||||
break;
|
||||
case CDN_SELCHANGE :
|
||||
returnCode=handleSelChange();
|
||||
break;
|
||||
case CDN_FOLDERCHANGE :
|
||||
returnCode=handleFolderChange();
|
||||
break;
|
||||
case CDN_SHAREVIOLATION :
|
||||
returnCode=handleShareViolation();
|
||||
break;
|
||||
case CDN_HELP :
|
||||
returnCode=handleHelp();
|
||||
break;
|
||||
case CDN_FILEOK :
|
||||
returnCode=handleFileOk();
|
||||
break;
|
||||
case CDN_TYPECHANGE :
|
||||
returnCode=handleTypeChange();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return returnCode;
|
||||
}
|
||||
|
||||
// helpers
|
||||
|
||||
bool OpenDirectory::getPathFileName(String &strPathFileName)
|
||||
{
|
||||
if(!getHandle())return false;
|
||||
strPathFileName.reserve(MaxString);
|
||||
return ::SendMessage(getParent(),CDM_GETFILEPATH,MaxString,(LPARAM)(LPSTR)strPathFileName);
|
||||
}
|
||||
|
||||
bool OpenDirectory::getFileName(String &strFileName)
|
||||
{
|
||||
if(!getHandle())return false;
|
||||
strFileName.reserve(MaxString);
|
||||
return ::SendMessage(getParent(),CDM_GETSPEC,MaxString,(LPARAM)(LPSTR)strFileName);
|
||||
}
|
||||
|
||||
bool OpenDirectory::getFolderPath(String &strFolderPath)
|
||||
{
|
||||
if(!getHandle())return false;
|
||||
strFolderPath.reserve(MaxString);
|
||||
return ::SendMessage(getParent(),CDM_GETFOLDERPATH,MaxString,(LPARAM)(LPSTR)strFolderPath);
|
||||
}
|
||||
|
||||
bool OpenDirectory::hideControl(UINT controlID)
|
||||
{
|
||||
if(!getHandle())return false;
|
||||
return ::SendMessage(getParent(),CDM_HIDECONTROL,controlID,0);
|
||||
}
|
||||
|
||||
bool OpenDirectory::setControlText(UINT controlID,const String &strControlText)const
|
||||
{
|
||||
if(!getHandle())return false;
|
||||
return ::SendMessage(getParent(),CDM_SETCONTROLTEXT,controlID,(LPARAM)(LPSTR)(String&)strControlText);
|
||||
}
|
||||
|
||||
bool OpenDirectory::getControlText(UINT controlID,String &strControlText)const
|
||||
{
|
||||
if(!getHandle())return false;
|
||||
strControlText.reserve(MaxString);
|
||||
return ::SendMessage(getParent(),WM_GETTEXT,MaxString,(LPARAM)(char*)strControlText);
|
||||
}
|
||||
|
||||
bool OpenDirectory::setDefaultExtension(const String &strDefaultExtension)
|
||||
{
|
||||
if(!getHandle()||strDefaultExtension.isNull())return false;
|
||||
return ::SendMessage(getParent(),CDM_SETDEFEXT,0,(LPARAM)(LPSTR)(String&)strDefaultExtension);
|
||||
}
|
||||
|
||||
// virtuals
|
||||
|
||||
UINT OpenDirectory::handleInitDone(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
UINT OpenDirectory::handleSelChange(void)
|
||||
{
|
||||
String strFolderPath;
|
||||
|
||||
getFolderPath(strFolderPath);
|
||||
setControlText(FileNameEditControlID,strFolderPath);
|
||||
return false;
|
||||
}
|
||||
|
||||
UINT OpenDirectory::handleFolderChange(void)
|
||||
{
|
||||
String strFolderPath;
|
||||
|
||||
getFolderPath(strFolderPath);
|
||||
if(strFolderPath==mLastFolderChange)
|
||||
{
|
||||
setControlText(FileNameEditControlID,strFolderPath);
|
||||
::EndDialog(getParent(),TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
mLastFolderChange=strFolderPath;
|
||||
setControlText(FileNameEditControlID,strFolderPath);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
UINT OpenDirectory::handleShareViolation(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
UINT OpenDirectory::handleFileOk(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
UINT OpenDirectory::handleHelp(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
UINT OpenDirectory::handleTypeChange(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
42
vidcap/opendir.hpp
Normal file
42
vidcap/opendir.hpp
Normal file
@@ -0,0 +1,42 @@
|
||||
#ifndef _VIDCAP_OPENDIRECTORY_HPP_
|
||||
#define _VIDCAP_OPENDIRECTORY_HPP_
|
||||
#ifndef _COMMON_OPENDIALOG_HPP_
|
||||
#include <common/opendlg.hpp>
|
||||
#endif
|
||||
#ifndef _HOOKPROC_OFNHOOK_HPP_
|
||||
#include <hookproc/ofnhook.hpp>
|
||||
#endif
|
||||
|
||||
class OpenDirectory : private OpenDialog, private OFNHook
|
||||
{
|
||||
public:
|
||||
OpenDirectory(void);
|
||||
virtual ~OpenDirectory();
|
||||
bool getOpenDirectory(GUIWindow &parentWindow,const String &titleString,const String &strInitialDirectory,String &strDirectory);
|
||||
protected:
|
||||
virtual UINT hookProc(HWND hDlg,UINT uiMsg,WPARAM wParam,LPARAM lParam);
|
||||
virtual UINT handleInitDone(void);
|
||||
virtual UINT handleSelChange(void);
|
||||
virtual UINT handleFolderChange(void);
|
||||
virtual UINT handleShareViolation(void);
|
||||
virtual UINT handleFileOk(void);
|
||||
virtual UINT handleHelp(void);
|
||||
virtual UINT handleTypeChange(void);
|
||||
|
||||
bool getPathFileName(String &strPathFileName);
|
||||
bool getFileName(String &strFileName);
|
||||
bool getFolderPath(String &strFolderPath);
|
||||
bool hideControl(UINT controlID);
|
||||
bool setDefaultExtension(const String &strDefaultExtension);
|
||||
bool getControlText(UINT controlID,String &strControlText)const;
|
||||
bool setControlText(UINT controlID,const String &strControlText)const;
|
||||
private:
|
||||
enum{FileNameEditControlID=0x480};
|
||||
enum{MaxString=256};
|
||||
OpenDirectory(const OpenDirectory &someOpenDirectory);
|
||||
OpenDirectory &operator=(const OpenDirectory &someOpenDirectory);
|
||||
|
||||
String mLastFolderChange;
|
||||
};
|
||||
#endif
|
||||
|
||||
16
vidcap/resource.h
Normal file
16
vidcap/resource.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by avicap.rc
|
||||
//
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NO_MFC 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 103
|
||||
#define _APS_NEXT_COMMAND_VALUE 40006
|
||||
#define _APS_NEXT_CONTROL_VALUE 1008
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
61
vidcap/srcdlg.cpp
Normal file
61
vidcap/srcdlg.cpp
Normal file
@@ -0,0 +1,61 @@
|
||||
#include <vidcap/srcdlg.hpp>
|
||||
#include <vidcap/vidcap.hpp>
|
||||
#include <vidcap/rsrc.hpp>
|
||||
|
||||
LRESULT SourceDialog::perform(void)
|
||||
{
|
||||
mDriverIndex=-1;
|
||||
::DialogBoxParam(processInstance(),(LPSTR)"SOURCE",mhParent,(DLGPROC)DWindow::DlgProc,(LONG)((DWindow*)this));
|
||||
return mDriverIndex;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType SourceDialog::initDialogHandler(CallbackData &/*someCallbackData*/)
|
||||
{
|
||||
mListBox=new Control(getItem(SOURCE_LIST),SOURCE_LIST,FALSE);
|
||||
mListBox.disposition(PointerDisposition::Delete);
|
||||
getDrivers();
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType SourceDialog::dialogCodeHandler(CallbackData &/*someCallbackData*/)
|
||||
{
|
||||
return (CallbackData::ReturnType)DLGC_WANTALLKEYS;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType SourceDialog::commandHandler(CallbackData &someCallbackData)
|
||||
{
|
||||
switch(someCallbackData.wmCommandID())
|
||||
{
|
||||
case IDOK :
|
||||
getDriverIndex();
|
||||
endDialog(TRUE);
|
||||
break;
|
||||
case IDCANCEL :
|
||||
mDriverIndex=-1;
|
||||
endDialog(FALSE);
|
||||
break;
|
||||
case SOURCE_LIST :
|
||||
if(LBN_DBLCLK==someCallbackData.wmCommandCommand()){getDriverIndex();endDialog(true);}
|
||||
break;
|
||||
}
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
void SourceDialog::getDrivers(void)
|
||||
{
|
||||
Block<DriverInfo> drivers;
|
||||
|
||||
mListBox->sendMessage(LB_RESETCONTENT,0,0L);
|
||||
VidCap::getDrivers(drivers);
|
||||
for(int index=0;index<drivers.size();index++)
|
||||
{
|
||||
mListBox->sendMessage(LB_INSERTSTRING,-1,(LPARAM)String(drivers[index].driverName()+String("[")+ drivers[index].driverVersion()+String("]")).str());
|
||||
}
|
||||
if(drivers.size())mListBox->sendMessage(LB_SETCURSEL,0,0);
|
||||
}
|
||||
|
||||
LRESULT SourceDialog::getDriverIndex(void)
|
||||
{
|
||||
if(mListBox->sendMessage(LB_GETCOUNT,0,0))return mDriverIndex=mListBox->sendMessage(LB_GETCURSEL,0,0L);
|
||||
else return mDriverIndex=-1;
|
||||
}
|
||||
73
vidcap/srcdlg.hpp
Normal file
73
vidcap/srcdlg.hpp
Normal file
@@ -0,0 +1,73 @@
|
||||
#ifndef _VIDCAP_SOURCEDLG_HPP_
|
||||
#define _VIDCAP_SOURCEDLG_HPP_
|
||||
#ifndef _COMMON_DWINDOW_HPP_
|
||||
#include <common/dwindow.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_WINDOW_HPP_
|
||||
#include <common/window.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_CONTROL_HPP_
|
||||
#include <common/control.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_SMARTPOINTER_HPP_
|
||||
#include <common/pointer.hpp>
|
||||
#endif
|
||||
|
||||
class SourceDialog : private DWindow
|
||||
{
|
||||
public:
|
||||
SourceDialog(const GUIWindow &parentWindow);
|
||||
virtual ~SourceDialog();
|
||||
LRESULT perform(void);
|
||||
private:
|
||||
SourceDialog(const SourceDialog &someSourceDialog);
|
||||
SourceDialog &operator=(const SourceDialog &someSourceDialog);
|
||||
CallbackData::ReturnType initDialogHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType commandHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType dialogCodeHandler(CallbackData &someCallbackData);
|
||||
void getDrivers(void);
|
||||
LRESULT getDriverIndex(void);
|
||||
|
||||
Callback<SourceDialog> mInitDialogHandler;
|
||||
Callback<SourceDialog> mCommandHandler;
|
||||
Callback<SourceDialog> mDialogCodeHandler;
|
||||
SmartPointer<Control> mListBox;
|
||||
HWND mhParent;
|
||||
LRESULT mDriverIndex;
|
||||
};
|
||||
|
||||
inline
|
||||
SourceDialog::SourceDialog(const GUIWindow &parentWindow)
|
||||
: mhParent(parentWindow)
|
||||
{
|
||||
mInitDialogHandler.setCallback(this,&SourceDialog::initDialogHandler);
|
||||
mCommandHandler.setCallback(this,&SourceDialog::commandHandler);
|
||||
mDialogCodeHandler.setCallback(this,&SourceDialog::dialogCodeHandler);
|
||||
insertHandler(VectorHandler::CommandHandler,&mCommandHandler);
|
||||
insertHandler(VectorHandler::InitDialogHandler,&mInitDialogHandler);
|
||||
insertHandler(VectorHandler::DialogCodeHandler,&mDialogCodeHandler);
|
||||
}
|
||||
|
||||
inline
|
||||
SourceDialog::SourceDialog(const SourceDialog &someSourceDialog)
|
||||
: mhParent(someSourceDialog.mhParent)
|
||||
{ // no implementation
|
||||
mInitDialogHandler.setCallback(this,&SourceDialog::initDialogHandler);
|
||||
mCommandHandler.setCallback(this,&SourceDialog::commandHandler);
|
||||
mDialogCodeHandler.setCallback(this,&SourceDialog::dialogCodeHandler);
|
||||
}
|
||||
|
||||
inline
|
||||
SourceDialog::~SourceDialog()
|
||||
{
|
||||
removeHandler(VectorHandler::CommandHandler,&mCommandHandler);
|
||||
removeHandler(VectorHandler::InitDialogHandler,&mInitDialogHandler);
|
||||
removeHandler(VectorHandler::DialogCodeHandler,&mDialogCodeHandler);
|
||||
}
|
||||
|
||||
inline
|
||||
SourceDialog &SourceDialog::operator=(const SourceDialog &/*someSourceDialog*/)
|
||||
{ // no implementation
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
104
vidcap/vidcaplib.dsp
Normal file
104
vidcap/vidcaplib.dsp
Normal file
@@ -0,0 +1,104 @@
|
||||
# Microsoft Developer Studio Project File - Name="vidcaplib" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=vidcaplib - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "vidcaplib.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "vidcaplib.mak" CFG="vidcaplib - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "vidcaplib - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "vidcaplib - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "vidcaplib - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "vidcaplib - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "vidcaplib___Win32_Debug"
|
||||
# PROP BASE Intermediate_Dir "vidcaplib___Win32_Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "debug"
|
||||
# PROP Intermediate_Dir "debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /Gz /MTd /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "STRICT" /D "__FLAT__" /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "vidcaplib - Win32 Release"
|
||||
# Name "vidcaplib - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BMPCAP.CPP
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\VIDCAP.CPP
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\VidReg.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
29
vidcap/vidcaplib.dsw
Normal file
29
vidcap/vidcaplib.dsw
Normal file
@@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "vidcaplib"=.\vidcaplib.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
BIN
vidcap/vidcaplib.opt
Normal file
BIN
vidcap/vidcaplib.opt
Normal file
Binary file not shown.
16
vidcap/vidcaplib.plg
Normal file
16
vidcap/vidcaplib.plg
Normal file
@@ -0,0 +1,16 @@
|
||||
<html>
|
||||
<body>
|
||||
<pre>
|
||||
<h1>Build Log</h1>
|
||||
<h3>
|
||||
--------------------Configuration: vidcaplib - Win32 Debug--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
vidcaplib.lib - 0 error(s), 0 warning(s)
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user