mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-19 05:10:00 +01:00
small change
This commit is contained in:
@@ -44,21 +44,11 @@ bool Playback::setVideoCamera(int device, int res, cv::VideoWriter wr, bool reco
|
|||||||
mode = MODE_CAMERA;
|
mode = MODE_CAMERA;
|
||||||
device_num = device;
|
device_num = device;
|
||||||
mutex.lock();
|
mutex.lock();
|
||||||
if(capture.isOpened()) {
|
|
||||||
#if defined(__linux__) || defined(_WIN32)
|
|
||||||
capture.open(device);
|
capture.open(device);
|
||||||
if(!capture.isOpened()) {
|
if(!capture.isOpened()) {
|
||||||
mutex.unlock();
|
mutex.unlock();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
capture.open(device);
|
|
||||||
if(!capture.isOpened()) {
|
|
||||||
mutex.unlock();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
recording = record;
|
recording = record;
|
||||||
writer = wr;
|
writer = wr;
|
||||||
int res_w = 0, res_h = 0, ores_w = 640, ores_h = 480;
|
int res_w = 0, res_h = 0, ores_w = 640, ores_h = 480;
|
||||||
|
|||||||
Reference in New Issue
Block a user