fixed bug when switching between webcams

This commit is contained in:
Jared Bruni
2019-12-18 09:40:40 -08:00
parent 33f4b75ec5
commit aa408f0471
2 changed files with 4 additions and 5 deletions

View File

@@ -51,13 +51,13 @@ bool Playback::setVideoCamera(int device, int res, cv::VideoWriter wr, bool reco
mode = MODE_CAMERA;
device_num = device;
mutex.lock();
#if defined(__linux__) || defined(__APPLE__)
//#if defined(__linux__) || defined(__APPLE__)
capture.open(device);
if(!capture.isOpened()) {
mutex.unlock();
return false;
}
#else
/*#else
if(!capture.isOpened()) {
capture.open(device);
if(!capture.isOpened()) {
@@ -65,8 +65,7 @@ bool Playback::setVideoCamera(int device, int res, cv::VideoWriter wr, bool reco
return false;
}
}
#endif
#endif*/
recording = record;
writer = wr;
int res_w = 0, res_h = 0, ores_w = 640, ores_h = 480;

View File

@@ -6,7 +6,7 @@
#ifndef _QT_HEADERS__
#define _QT_HEADERS__
#define ac_version "v1.52.0"
#define ac_version "v1.53.0"
#include<QApplication>
#include<QMainWindow>
#include<QDialog>