summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_pt/pt_video_widget.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-09-23 02:12:20 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-09-23 02:12:20 +0200
commitd74b99391bbdfb25f9559834082ae7ee6d30720d (patch)
tree26d035c1c7680728f1c93cba42f8b121e1d40679 /ftnoir_tracker_pt/pt_video_widget.h
parentcf84c354b30b39fe04a79f457947f7f778bc8fc7 (diff)
decruft PT more, so it doesn't crash finally
Diffstat (limited to 'ftnoir_tracker_pt/pt_video_widget.h')
-rw-r--r--ftnoir_tracker_pt/pt_video_widget.h25
1 files changed, 5 insertions, 20 deletions
diff --git a/ftnoir_tracker_pt/pt_video_widget.h b/ftnoir_tracker_pt/pt_video_widget.h
index 1be5f5f2..de2c7efb 100644
--- a/ftnoir_tracker_pt/pt_video_widget.h
+++ b/ftnoir_tracker_pt/pt_video_widget.h
@@ -7,7 +7,6 @@
#pragma once
-#include "frame_observer.h"
#include <QObject>
#include <QTime>
#include <QDialog>
@@ -24,15 +23,16 @@
#include <QPainter>
#include <QPaintEvent>
#include <QTimer>
+#include <QMutex>
+#include <QMutexLocker>
-class PTVideoWidget : public QWidget, public FrameObserver
+class PTVideoWidget : public QWidget
{
Q_OBJECT
public:
- PTVideoWidget(QWidget *parent, FrameProvider* provider) :
+ PTVideoWidget(QWidget *parent) :
QWidget(parent),
- /* to avoid linker errors */ FrameObserver(provider),
freshp(false)
{
connect(&timer, SIGNAL(timeout()), this, SLOT(update_and_repaint()));
@@ -52,20 +52,5 @@ private:
QImage texture;
QTimer timer;
cv::Mat _frame;
- bool freshp;
-};
-
-// ----------------------------------------------------------------------------
-// A VideoWidget embedded in a dialog frame
-class VideoWidgetDialog : public QDialog
-{
- Q_OBJECT
-public:
- VideoWidgetDialog(QWidget *parent, FrameProvider* provider);
- virtual ~VideoWidgetDialog() {}
-
- PTVideoWidget* get_video_widget() { return video_widget; }
-
-private:
- PTVideoWidget* video_widget;
+ volatile bool freshp;
};