b5aac8
Index: server/drivers/camera/unicap/unicapImage.cc
b5aac8
===================================================================
b5aac8
--- server/drivers/camera/unicap/unicapImage.cc	(revision 8808)
b5aac8
+++ server/drivers/camera/unicap/unicapImage.cc	(working copy)
b5aac8
@@ -92,7 +92,7 @@
b5aac8
 
b5aac8
 ////////////////////////////////////////////////////////////////////////////////
b5aac8
 // The UniCap_Image device class.
b5aac8
-class UniCap_Image : public Driver
b5aac8
+class UniCap_Image : public ThreadedDriver
b5aac8
 {
b5aac8
   public:
b5aac8
     // Constructor
b5aac8
@@ -145,7 +145,7 @@
b5aac8
 // Constructor.  Retrieve options from the configuration file and do any
b5aac8
 // pre-Setup() setup.
b5aac8
 UniCap_Image::UniCap_Image (ConfigFile* cf, int section)
b5aac8
-    : Driver (cf, section)
b5aac8
+    : ThreadedDriver (cf, section)
b5aac8
 {
b5aac8
   memset (&this->cam_id, 0, sizeof (player_devaddr_t));
b5aac8
 
b5aac8
@@ -247,8 +247,6 @@
b5aac8
   buffer.data = (unsigned char*)(malloc (format.size.width * format.size.height * format.bpp / 8));
b5aac8
   buffer.buffer_size = format.size.width * format.size.height * format.bpp / 8;
b5aac8
   
b5aac8
-  // Start the device thread
b5aac8
-  StartThread ();
b5aac8
 
b5aac8
   return (0);
b5aac8
 }
b5aac8
@@ -257,8 +255,6 @@
b5aac8
 // Shutdown the device
b5aac8
 int UniCap_Image::Shutdown ()
b5aac8
 {
b5aac8
-  // Stop the driver thread
b5aac8
-  StopThread ();
b5aac8
 
b5aac8
   // Stop the device
b5aac8
   if ( !SUCCESS (unicap_stop_capture (handle) ) )
b5aac8
Index: server/drivers/camera/unicap/CMakeLists.txt
b5aac8
===================================================================
b5aac8
--- server/drivers/camera/unicap/CMakeLists.txt	(revision 8808)
b5aac8
+++ server/drivers/camera/unicap/CMakeLists.txt	(working copy)
b5aac8
@@ -7,11 +7,11 @@
b5aac8
     SET (unicapExtraFlags "")
b5aac8
     SET (unicapExtraLibs "-lunicap -lrt")
b5aac8
 ELSE ("${UNICAP_DIR}" STREQUAL "")
b5aac8
-    SET (unicapReqHeader "${UNICAP_DIR}/include/unicap/unicap.h")
b5aac8
+    SET (unicapReqHeader "${UNICAP_DIR}/include/unicap/unicap.h;${UNICAP_DIR}/include/unicap/unicap_status.h;${UNICAP_DIR}/include/unicap/unicap_version.h")
b5aac8
     SET (unicapExtraFlags "-I${UNICAP_DIR}/include/unicap")
b5aac8
     SET (unicapExtraLibs "-L${UNICAP_DIR}/lib -lcanlib -lrt")
b5aac8
 ENDIF ("${UNICAP_DIR}" STREQUAL "")
b5aac8
-
b5aac8
+SET (CMAKE_REQUIRED_FLAGS ${unicapExtraFlags})
b5aac8
 PLAYERDRIVER_REQUIRE_HEADER (unicapimage build_unicapimage ${unicapReqHeader})
b5aac8
 
b5aac8
 PLAYERDRIVER_ADD_DRIVER (unicapimage build_unicapimage