diff options
Diffstat (limited to 'cv')
-rw-r--r-- | cv/video-widget.cpp | 8 | ||||
-rw-r--r-- | cv/video-widget.hpp | 4 |
2 files changed, 1 insertions, 11 deletions
diff --git a/cv/video-widget.cpp b/cv/video-widget.cpp index bc143378..0a26da39 100644 --- a/cv/video-widget.cpp +++ b/cv/video-widget.cpp @@ -47,14 +47,7 @@ void cv_video_widget::update_and_repaint() { QMutexLocker l(&mtx); - if (window_check_timer.elapsed_ms() > 250) - { - visible = is_window_visible(this); - window_check_timer.start(); - } - if (visible) - { if (_frame.empty() || !freshp) return; cv::cvtColor(_frame, _frame2, cv::COLOR_RGB2BGR); @@ -67,5 +60,4 @@ void cv_video_widget::update_and_repaint() texture = QImage((const unsigned char*) _frame3.data, _frame3.cols, _frame3.rows, QImage::Format_RGB888); freshp = false; update(); - } } diff --git a/cv/video-widget.hpp b/cv/video-widget.hpp index 46332afe..3e328977 100644 --- a/cv/video-widget.hpp +++ b/cv/video-widget.hpp @@ -8,7 +8,6 @@ #pragma once -#include "compat/timer.hpp" #include <opencv2/core/core.hpp> #include <memory> #include <QObject> @@ -33,7 +32,6 @@ private: QMutex mtx; QImage texture; QTimer timer; - Timer window_check_timer; cv::Mat _frame, _frame2, _frame3; - bool freshp, visible; + bool freshp; }; |