summaryrefslogtreecommitdiffhomepage
path: root/tracker-rs/ftnoir_tracker_rs.h
diff options
context:
space:
mode:
authorXavier Hallade <xavier.hallade@intel.com>2016-02-03 23:40:48 +0100
committerXavier Hallade <xavier.hallade@intel.com>2016-02-03 23:40:48 +0100
commitf41f404de607b4f8f5aa270e36ae7c43baf63862 (patch)
tree662e30d2765275a13fbff952135b134802168a20 /tracker-rs/ftnoir_tracker_rs.h
parente3044329f73fcfb136bb8316df87c4bafd2c2bee (diff)
tracker/rs: added camera preview, removed separate process and TCP socket
the RS implementation still resides in a different DLL as it has to be compiled separately by MSVC compiler.
Diffstat (limited to 'tracker-rs/ftnoir_tracker_rs.h')
-rw-r--r--tracker-rs/ftnoir_tracker_rs.h40
1 files changed, 24 insertions, 16 deletions
diff --git a/tracker-rs/ftnoir_tracker_rs.h b/tracker-rs/ftnoir_tracker_rs.h
index 7cda7370..845e0beb 100644
--- a/tracker-rs/ftnoir_tracker_rs.h
+++ b/tracker-rs/ftnoir_tracker_rs.h
@@ -7,34 +7,42 @@
#pragma once
-#include "ui_ftnoir_tracker_rs_controls.h"
#include "opentrack/plugin-api.hpp"
-#include <QProcess>
-#include <QMutex>
-#include <QThread>
-#include <QUdpSocket>
+#include "ui_ftnoir_tracker_rs_controls.h"
+#include "ftnoir_tracker_rs_worker.h"
+#include <QTimer>
+
+class ImageWidget;
-class RSTracker : protected QObject, public ITracker
+class RSTracker : public QObject, public ITracker
{
Q_OBJECT
public:
RSTracker();
~RSTracker();
- void start_tracker(QFrame *) override;
- void data(double *data) override;
+ void start_tracker(QFrame *) override;
+ void data(double *data) override;
+
+public slots:
+ static bool startSdkInstallationProcess();
+
+protected:
+ void configurePreviewFrame();
private:
- QMutex mMutex;
- QThread mThread;
- QProcess mRealSenseImplProcess;
- QUdpSocket mSocket;
- double mPose[6];
+ RSTrackerWorkerThread mTrackerWorkerThread;
+ QTimer mPreviewUpdateTimer;
+ QWidget *mPreviewFrame;
+ ImageWidget *mImageWidget = nullptr;
+ const int kPreviewUpdateInterval = 30;
private slots:
- void rsImplProcessError(QProcess::ProcessError);
- void rsImplProcessFinished(int);
- void readPendingUdpPoseData();
+ void showRealSenseErrorMessageBox(int exitCode);
+ void startPreview();
+ void updatePreview();
+ void stopPreview();
+ void handleTrackingEnded(int exitCode);
};