mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-17 04:10:01 +01:00
should now reset the camera after stopped on Linux,Windows.
This commit is contained in:
@@ -40,7 +40,13 @@ bool Playback::setVideoCamera(int device, int res, cv::VideoWriter wr, bool reco
|
||||
mode = MODE_CAMERA;
|
||||
mutex.lock();
|
||||
if(capture.isOpened()) {
|
||||
|
||||
#if defined(__linux__) || defined(_WIN32)
|
||||
capture.open(device);
|
||||
if(!capture.isOpened()) {
|
||||
mutex.unlock();
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
capture.open(device);
|
||||
if(!capture.isOpened()) {
|
||||
|
||||
@@ -30,6 +30,7 @@ private:
|
||||
std::vector<std::pair<int, int>> current;
|
||||
bool isPaused, isStep;
|
||||
VideoMode mode;
|
||||
int device_num;
|
||||
public:
|
||||
Playback(QObject *parent = 0);
|
||||
~Playback();
|
||||
|
||||
Reference in New Issue
Block a user