summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-02-21 21:13:52 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-02-21 21:13:52 +0100
commita50cfd62d89eebda30b7dfffbe761e2b930118eb (patch)
treea921b4eebbb1e5b24f7cebab364013625e495972
parentb41fa9452b62bb1d83819910272524fd09c36e3c (diff)
cv/video-widget: reduce cpu load
Now that the resize happens in another thread, run timer less often
-rw-r--r--cv/video-widget.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/cv/video-widget.cpp b/cv/video-widget.cpp
index ce3f3b47..b9c1e38e 100644
--- a/cv/video-widget.cpp
+++ b/cv/video-widget.cpp
@@ -10,16 +10,15 @@
#include <opencv2/imgproc.hpp>
cv_video_widget::cv_video_widget(QWidget* parent) :
- QWidget(parent),
- freshp(false)
+ QWidget(parent), freshp(false)
{
connect(&timer, SIGNAL(timeout()), this, SLOT(update_and_repaint()));
- timer.start(50);
+ timer.start(65);
}
void cv_video_widget::update_image(const cv::Mat& frame)
{
- QMutexLocker foo(&mtx);
+ QMutexLocker l(&mtx);
if (!freshp)
{