123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- #include"videocapobj.h"
- #include<stdlib.h>
- #include<string.h>
- #include<stdarg.h>
- #include <time.h>
- #include <stdio.h>
- #include "SpBase.h"
- VideoCapObj::VideoCapObj()
- {
- m_pVideoCap = NULL;
- }
- VideoCapObj::~VideoCapObj()
- {
- if (NULL != m_pVideoCap){
- DestroyVideoCaptureObj(m_pVideoCap);
- }
- }
- int VideoCapObj::Init()
- {
- int iRet = -1;
- m_pVideoCap = CreateVideoCaptureObj(this);
- if (NULL != m_pVideoCap){
- iRet = 0;
- }
- return iRet;
- }
- int VideoCapObj::SetVideoCaptureParam(videocap_param_t* param)
- {
- return m_pVideoCap->VideoCaptureSetParam(param);
- }
- int VideoCapObj::StartVideoCapture()
- {
- return m_pVideoCap->StartVideoCapture();
- }
- int VideoCapObj::StopVideoCapture()
- {
- return m_pVideoCap->StopVideoCapture();
- }
- int VideoCapObj::GetCamBrightness(int* ibright)
- {
- return m_pVideoCap->GetCamBrightness(ibright);
- }
- int VideoCapObj::SetCamBrightness(int ibright)
- {
- return m_pVideoCap->SetCamBrightness(ibright);
- }
- int VideoCapObj::SetCamAutoBrightness()
- {
- return m_pVideoCap->SetCamAutoBrightness();
- }
- void VideoCapObj::Debug(const char* fmt, ...)
- {
- va_list arg;
- va_start(arg, fmt);
- vDbg(fmt, arg);
- va_end(arg);
- }
- void VideoCapObj::OnCaptureFailed()
- {
- }
- void VideoCapObj::OnVideoCaptureExcption()
- {
- }
|