Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

CameraDriverQTKit.h

Go to the documentation of this file.
00001 //-*-c++-*-
00002 #ifndef INCLUDED_CameraDriverQTKit_h_
00003 #define INCLUDED_CameraDriverQTKit_h_
00004 
00005 #include "local/DeviceDriver.h"
00006 #include "local/DataSources/CameraSourceQTKit.h"
00007 
00008 //! This driver provides camera capture through the QTKit API, which is the only capture interface which supports 64-bit on OS X
00009 class CameraDriverQTKit : public DeviceDriver, public virtual plist::CollectionListener {
00010 public:
00011   //! constructor, may throw a const char* on error
00012   explicit CameraDriverQTKit(const std::string& name) : DeviceDriver(autoRegisterCameraDriver,name) {
00013     updateCameraList();
00014   }
00015   
00016   ~CameraDriverQTKit() {}
00017   
00018   virtual std::string getClassName() const { return autoRegisterCameraDriver; }
00019   
00020   virtual void getImageSources(std::map<std::string,DataSource*>& sources) {
00021     sources.clear();
00022     for(const_iterator it=begin(); it!=end(); ++it) {
00023       if(it->first==".type")
00024         continue;
00025       if(CameraSourceQTKit * ds = dynamic_cast<CameraSourceQTKit*>(it->second))
00026         sources[it->first]=ds;
00027       else
00028         std::cerr << "WARNING CameraDriver entry " << it->first << " is not actually a CameraSource!!!" << std::endl;
00029     }
00030   }
00031   
00032 protected:
00033   void updateCameraList();
00034   
00035 private:
00036   //! holds the class name, set via registration with the DeviceDriver registry
00037   static const std::string autoRegisterCameraDriver;
00038 };
00039 
00040 /*! @file
00041  * @brief 
00042  * @author Ethan Tira-Thompson (ejt) (Creator)
00043  */
00044 
00045 #endif

Tekkotsu Hardware Abstraction Layer 5.1CVS
Generated Mon May 9 05:01:37 2016 by Doxygen 1.6.3