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