updated ...

This commit is contained in:
lostjared
2018-05-10 08:21:50 -07:00
parent 8f48359628
commit 1980767e1d
2 changed files with 16 additions and 4 deletions

View File

@@ -44,11 +44,22 @@ 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__)
capture.open(device);
if(!capture.isOpened()) {
mutex.unlock();
return false;
}
#else
if(!capture.isOpened()) {
capture.open(device);
if(!capture.isOpened()) {
mutex.unlock();
return false;
}
}
#endif
recording = record;
writer = wr;
int res_w = 0, res_h = 0, ores_w = 640, ores_h = 480;