was using wrong capture device for startCamera

This commit is contained in:
lostjared
2017-02-07 17:41:18 -08:00
parent d210bbebc1
commit 8ad2dfe0ec

View File

@@ -34,6 +34,7 @@ void custom_filter(cv::Mat &) {
Playback::Playback(QObject *parent) : QThread(parent) { Playback::Playback(QObject *parent) : QThread(parent) {
stop = true; stop = true;
isStep = false; isStep = false;
isPaused = false;
} }
void Playback::Play() { void Playback::Play() {
@@ -78,7 +79,6 @@ void Playback::run() {
int delay = (1000/frame_rate); int delay = (1000/frame_rate);
while(!stop) { while(!stop) {
mutex.lock(); mutex.lock();
if(!capture.read(frame)) { if(!capture.read(frame)) {
stop = true; stop = true;
mutex.unlock(); mutex.unlock();
@@ -480,10 +480,9 @@ bool AC_MainWindow::startCamera(int res, int dev, const QString &outdir, bool re
file_new_video->setEnabled(false); file_new_video->setEnabled(false);
controls_stop->setEnabled(true); controls_stop->setEnabled(true);
connect(timer_camera, SIGNAL(timeout()), this, SLOT(timer_Camera())); connect(timer_camera, SIGNAL(timeout()), this, SLOT(timer_Camera()));
disp->show(); playback->setVideo(capture_camera, writer, recording);
playback->setVideo(capture_video, writer, recording);
playback->Play(); playback->Play();
disp->show();
return true; return true;
} }