summaryrefslogtreecommitdiffhomepage
path: root/FaceTrackNoIR/tracker.cpp
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2012-09-05 17:26:20 +0000
committerWim Vriend <facetracknoir@gmail.com>2012-09-05 17:26:20 +0000
commit30a7bbb84e563d07e1b4ef598f5b57041d5e4a8b (patch)
tree1a441331f8102728c2e274c50afb08c53458d1c2 /FaceTrackNoIR/tracker.cpp
parent5ccca4ca33a85b0fa3fa92419595f1a689b4fcf7 (diff)
Modified 4 Arduino Tracker
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@124 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FaceTrackNoIR/tracker.cpp')
-rw-r--r--FaceTrackNoIR/tracker.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/FaceTrackNoIR/tracker.cpp b/FaceTrackNoIR/tracker.cpp
index 74fa2df5..9d2ee19a 100644
--- a/FaceTrackNoIR/tracker.cpp
+++ b/FaceTrackNoIR/tracker.cpp
@@ -108,7 +108,7 @@ TShortKey Tracker::InhibitKey; // ShortKey to inhibit axis while tracking
TShortKey Tracker::GameZeroKey; // ShortKey to Set Game Zero
//TShortKey Tracker::AxisReverseKey; // ShortKey to start/stop axis reverse while tracking
-ITrackerPtr Tracker::pTracker; // Pointer to Tracker instance (in DLL)
+//ITrackerPtr Tracker::pTracker; // Pointer to Tracker instance (in DLL)
IProtocolPtr Tracker::pProtocol; // Pointer to Protocol instance (in DLL)
IFilterPtr Tracker::pFilter; // Pointer to Filter instance (in DLL)
@@ -153,13 +153,14 @@ QFrame *video_frame;
//
// Load the Tracker-engine DLL, get the tracker-class from it and do stuff...
//
+ pTracker = NULL;
libName = mainApp->getCurrentTrackerName();
if (!libName.isEmpty()) {
trackerLib = new QLibrary(libName);
getIT = (importGetTracker) trackerLib->resolve("GetTracker");
if (getIT) {
- ITrackerPtr ptrXyz(getIT()); // Get the Class
+ ITracker *ptrXyz(getIT()); // Get the Class
if (ptrXyz)
{
pTracker = ptrXyz;
@@ -227,7 +228,9 @@ Tracker::~Tracker() {
// Stop the Tracker
if (pTracker) {
+ qDebug() << "Tracker::~Tracker Calling pTracker->StopTracker()...";
pTracker->StopTracker( true );
+ qDebug() << "Tracker::~Tracker After Calling pTracker->StopTracker()...";
}
// Trigger thread to stop
@@ -241,8 +244,15 @@ Tracker::~Tracker() {
//
// Remove the Tracker
// 20120615, WVR: As suggested by Stanislaw
- if (pTracker)
- pTracker.Release();
+ if (pTracker) {
+ QString name;
+ pTracker->getShortName(&name);
+ qDebug() << "Tracker::~Tracker Calling pTracker->Release()..." << name;
+ delete pTracker;
+ pTracker = NULL;
+// pTracker.Release();
+ qDebug() << "Tracker::~Tracker After Calling pTracker->Release()...";
+ }
// Close handles
::CloseHandle(m_StopThread);
@@ -321,8 +331,8 @@ T6DOF gameoutput_camera(0,0,0,0,0,0);
//
if (pFilter) {
QString filterName;
- pFilter->getFullName(&filterName);
- qDebug() << "Tracker::run() FilterName = " << filterName;
+ //pFilter->getFullName(&filterName);
+ //qDebug() << "Tracker::run() FilterName = " << filterName;
}
//