mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-18 21:00:13 +01:00
small change
This commit is contained in:
@@ -44,20 +44,10 @@ 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()) {
|
capture.open(device);
|
||||||
#if defined(__linux__) || defined(_WIN32)
|
if(!capture.isOpened()) {
|
||||||
capture.open(device);
|
mutex.unlock();
|
||||||
if(!capture.isOpened()) {
|
return false;
|
||||||
mutex.unlock();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
capture.open(device);
|
|
||||||
if(!capture.isOpened()) {
|
|
||||||
mutex.unlock();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
recording = record;
|
recording = record;
|
||||||
writer = wr;
|
writer = wr;
|
||||||
|
|||||||
Reference in New Issue
Block a user