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;
|
mode = MODE_CAMERA;
|
||||||
mutex.lock();
|
mutex.lock();
|
||||||
if(capture.isOpened()) {
|
if(capture.isOpened()) {
|
||||||
|
#if defined(__linux__) || defined(_WIN32)
|
||||||
|
capture.open(device);
|
||||||
|
if(!capture.isOpened()) {
|
||||||
|
mutex.unlock();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
capture.open(device);
|
capture.open(device);
|
||||||
if(!capture.isOpened()) {
|
if(!capture.isOpened()) {
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ private:
|
|||||||
std::vector<std::pair<int, int>> current;
|
std::vector<std::pair<int, int>> current;
|
||||||
bool isPaused, isStep;
|
bool isPaused, isStep;
|
||||||
VideoMode mode;
|
VideoMode mode;
|
||||||
|
int device_num;
|
||||||
public:
|
public:
|
||||||
Playback(QObject *parent = 0);
|
Playback(QObject *parent = 0);
|
||||||
~Playback();
|
~Playback();
|
||||||
|
|||||||
Reference in New Issue
Block a user