Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

CameraDriverQTKit.mm

Go to the documentation of this file.
00001 #if defined(__APPLE__)
00002 
00003 #include <AvailabilityMacros.h>
00004 #ifdef MAC_OS_X_VERSION_10_6
00005 
00006 #include "CameraDriverQTKit.h"
00007 
00008 #import <QTKit/QTkit.h>
00009 
00010 using namespace std; 
00011 
00012 const std::string CameraDriverQTKit::autoRegisterCameraDriver = DeviceDriver::getRegistry().registerType<CameraDriverQTKit>("Camera");
00013 
00014 void CameraDriverQTKit::updateCameraList() {
00015   NSAutoreleasePool  *autoreleasepool = [[NSAutoreleasePool alloc] init];
00016   NSEnumerator *itr = [[QTCaptureDevice inputDevices] objectEnumerator];
00017   while (QTCaptureDevice* dev = [itr nextObject]) {
00018     if([dev isConnected] && ![dev isInUseByAnotherApplication] && ( [dev hasMediaType:QTMediaTypeVideo] || [dev hasMediaType:QTMediaTypeMuxed] )) {
00019       string name = [[dev localizedDisplayName] UTF8String];
00020       if(name.find("Built-in ")==0)
00021         name.erase(0,strlen("Built-in "));
00022       setEntry(name,new CameraSourceQTKit(name,dev));
00023     }
00024   }
00025   [autoreleasepool release];
00026 }
00027 
00028 #endif // 10.6 or later
00029 #endif // Apple platform
00030 
00031 /*! @file
00032  * @brief 
00033  * @author Ethan Tira-Thompson (ejt) (Creator)
00034  *
00035  * $Author: ejt $
00036  * $Name:  $
00037  * $Revision: 1.1 $
00038  * $State: Exp $
00039  * $Date: 2010-05-06 20:51:47 $
00040  */

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