diff --git a/src/main_window.cpp b/src/main_window.cpp index db586c7..379d73a 100644 --- a/src/main_window.cpp +++ b/src/main_window.cpp @@ -26,7 +26,6 @@ void generate_map() { filter_map[filter_n] = std::make_pair(1, index); ++index; } - for(unsigned int j = 0; j < plugins.plugin_list.size(); ++j) { std::string name = "plugin " + plugins.plugin_list[j]->name(); filter_map[name] = std::make_pair(2, j); @@ -227,7 +226,6 @@ void AC_MainWindow::cb_SetIndex(int index) { } void AC_MainWindow::addClicked() { - int row = filters->currentRow(); if(row != -1) { QListWidgetItem *item = filters->item(row); @@ -253,7 +251,6 @@ void AC_MainWindow::rmvClicked() { std::vector> v; buildVector(v); playback->setVector(v); - } } @@ -266,7 +263,6 @@ void AC_MainWindow::upClicked() { std::vector> v; buildVector(v); playback->setVector(v); - } } diff --git a/src/playback_thread.cpp b/src/playback_thread.cpp index fdeb504..23933b3 100644 --- a/src/playback_thread.cpp +++ b/src/playback_thread.cpp @@ -49,6 +49,9 @@ void Playback::setDisplayed(bool shown) { } void Playback::run() { + + int duration = 1000/ac::fps; + while(!stop) { mutex.lock(); if(!capture.read(frame)) { @@ -78,6 +81,8 @@ void Playback::run() { draw_plugin(frame, cur[i].second); } } + } else { + msleep(duration); } mutex.lock(); if(recording && writer.isOpened()) {