~ubuntu-branches/ubuntu/trusty/libavg/trusty-proposed

« back to all changes in this revision

Viewing changes to src/imaging/TrackerThread.cpp

  • Committer: Package Import Robot
  • Author(s): OXullo Intersecans
  • Date: 2011-12-06 22:44:56 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20111206224456-qc7250z3ya1vi8s9
Tags: 1.7.0-0ubuntu1
* New upstream release (LP: #899183)
* Remove patches 0002-libav-0.7.patch, 0003-fglrx-segfault-on-startup.patch
  now merged to upstream
* Remove unnecessary .la files
* Update debian/watch file
* Fix debian/copyright dep-5 compliancy
* Update standards to version 3.9.2
* Add man pages for avg_checktouch, avg_checkvsync, avg_showsvg
* Minor debian/rules enhancement
* Add librsvg2-dev, libgdk-pixbuf2.0-dev to Build-Depends
* Proper transition to dh_python2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//
2
2
//  libavg - Media Playback Engine. 
3
 
//  Copyright (C) 2003-2008 Ulrich von Zadow
 
3
//  Copyright (C) 2003-2011 Ulrich von Zadow
4
4
//
5
5
//  This library is free software; you can redistribute it and/or
6
6
//  modify it under the terms of the GNU Lesser General Public
48
48
 
49
49
namespace avg {
50
50
 
51
 
static ProfilingZoneID ProfilingZoneCapture ("Capture");
52
 
static ProfilingZoneID ProfilingZoneMask ("Mask");
53
 
static ProfilingZoneID ProfilingZoneTracker ("Tracker");
54
 
static ProfilingZoneID ProfilingZoneHistory ("History");
55
 
static ProfilingZoneID ProfilingZoneDistort ("Distort");
56
 
static ProfilingZoneID ProfilingZoneHistogram ("Histogram");
57
 
static ProfilingZoneID ProfilingZoneDownscale ("Downscale");
58
 
static ProfilingZoneID ProfilingZoneBandpass ("Bandpass");
 
51
static ProfilingZoneID ProfilingZoneCapture("Capture");
 
52
static ProfilingZoneID ProfilingZoneMask("Mask");
 
53
static ProfilingZoneID ProfilingZoneTracker("Tracker");
 
54
static ProfilingZoneID ProfilingZoneHistory("History");
 
55
static ProfilingZoneID ProfilingZoneDistort("Distort");
 
56
static ProfilingZoneID ProfilingZoneHistogram("Histogram");
 
57
static ProfilingZoneID ProfilingZoneDownscale("Downscale");
 
58
static ProfilingZoneID ProfilingZoneBandpass("Bandpass");
59
59
static ProfilingZoneID ProfilingZoneComps("ConnectedComps");
60
60
static ProfilingZoneID ProfilingZoneUpdate("Update");
61
61
static ProfilingZoneID ProfilingZoneDraw("Draw");
92
92
                m_pBitmaps[TRACKER_IMG_CAMERA]->getSize()/m_Prescale, pDeDistort));
93
93
 
94
94
    m_pConfig = TrackerConfigPtr(new TrackerConfig(config));
 
95
    m_pCamera->startCapture();
95
96
}
96
97
 
97
98
TrackerThread::~TrackerThread()
105
106
        createBandpassFilter();
106
107
        AVG_TRACE(Logger::CONFIG, "Using fragment shaders for imaging operations.");
107
108
    } catch (Exception& e) {
108
 
        AVG_TRACE(Logger::WARNING, e.GetStr());
 
109
        AVG_TRACE(Logger::WARNING, e.getStr());
109
110
        AVG_TRACE(Logger::CONFIG, 
110
111
                "Using CPU for imaging operations (slow and inaccurate).");
111
112
        m_pImagingContext = 0;
115
116
        m_StartTime = TimeSource::get()->getCurrentMillisecs(); 
116
117
        m_HistoryDelay = m_pConfig->getIntParam("/tracker/historydelay/@value");
117
118
    } catch (Exception& e) {
118
 
        AVG_TRACE(Logger::WARNING, e.GetStr());
 
119
        AVG_TRACE(Logger::WARNING, e.getStr());
119
120
    }
120
121
    
121
 
    // Done in TrackerEventSource::ctor to work around Leopard/libdc1394 threading issue.
 
122
    // Done in TrackerInputDevice::ctor to work around Leopard/libdc1394 threading issue.
122
123
    //    m_pCamera->open();
123
124
    return true;
124
125
}
196
197
            }
197
198
            calcBlobs(pCroppedBmp, pBmpBandpass, time);
198
199
        }
 
200
        ThreadProfiler::get()->reset();
199
201
    }
200
202
    return true;
201
203
}