diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2011-12-15 09:20:52 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2011-12-15 09:20:52 +0100 |
commit | a8f1a15fb5982df6e7784db676f42d0d09f6e20a (patch) | |
tree | f0c11745d4b9285e6cee863e10e583df45ceeb38 | |
parent | bd7013de1e06a759e519ee5f9c203f4c03f25e83 (diff) | |
download | libuca-a8f1a15fb5982df6e7784db676f42d0d09f6e20a.tar.gz libuca-a8f1a15fb5982df6e7784db676f42d0d09f6e20a.tar.bz2 libuca-a8f1a15fb5982df6e7784db676f42d0d09f6e20a.tar.xz libuca-a8f1a15fb5982df6e7784db676f42d0d09f6e20a.zip |
Fix: break with current pcilib
-rw-r--r-- | src/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/cameras/ipe.c | 6 | ||||
-rw-r--r-- | src/config.h.in | 2 | ||||
-rw-r--r-- | src/uca.c | 4 | ||||
-rw-r--r-- | test/grab.c | 1 |
5 files changed, 11 insertions, 6 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dc7ebbe..9f7e9e8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -49,9 +49,9 @@ if (PF_FOUND) endif() if (PCO_FOUND) - option(HAVE_PCO_EDGE "Camera: pco.edge" ON) + option(HAVE_PCO_CL "Camera: CameraLink-based pco" ON) - if (HAVE_PCO_EDGE) + if (HAVE_PCO_CL) set(uca_SRCS ${uca_SRCS} cameras/pco.c) set(uca_LIBS ${uca_LIBS} ${PCO_LIBRARIES}) diff --git a/src/cameras/ipe.c b/src/cameras/ipe.c index 78d2c98..d865909 100644 --- a/src/cameras/ipe.c +++ b/src/cameras/ipe.c @@ -95,11 +95,15 @@ static uint32_t uca_ipe_get_property(struct uca_camera_priv *cam, enum uca_prope static uint32_t uca_ipe_start_recording(struct uca_camera_priv *cam) { + pcilib_t *handle = cam->user; + pcilib_start(handle, PCILIB_EVENT_DATA, PCILIB_EVENT_FLAGS_DEFAULT); return UCA_NO_ERROR; } static uint32_t uca_ipe_stop_recording(struct uca_camera_priv *cam) { + pcilib_t *handle = cam->user; + pcilib_stop(handle, PCILIB_EVENT_FLAGS_DEFAULT); return UCA_NO_ERROR; } @@ -108,7 +112,7 @@ static uint32_t uca_ipe_grab(struct uca_camera_priv *cam, char *buffer, void *me pcilib_t *handle = cam->user; size_t size = cam->frame_width * cam->frame_height * sizeof(uint16_t); void *data = NULL; - if (pcilib_grab(handle, PCILIB_EVENTS_ALL, &size, &data, PCILIB_TIMEOUT_TRIGGER)) + if (pcilib_grab(handle, PCILIB_EVENTS_ALL, &size, &data, PCILIB_TIMEOUT_INFINITE)) return UCA_ERR_CAMERA; memcpy(buffer, data, size); free(data); diff --git a/src/config.h.in b/src/config.h.in index 554efc5..40a61f8 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -1,7 +1,7 @@ #cmakedefine HAVE_ME4 -#cmakedefine HAVE_PCO_EDGE +#cmakedefine HAVE_PCO_CL #cmakedefine HAVE_PHOTON_FOCUS #cmakedefine HAVE_PHOTRON_FASTCAM #cmakedefine HAVE_IPE_CAMERA @@ -18,7 +18,7 @@ #include "grabbers/me4.h" #endif -#ifdef HAVE_PCO_EDGE +#ifdef HAVE_PCO_CL #include "cameras/pco.h" #endif @@ -127,7 +127,7 @@ struct uca *uca_init(const char *config_filename) }; uca_cam_init cam_inits[] = { -#ifdef HAVE_PCO_EDGE +#ifdef HAVE_PCO_CL uca_pco_init, #endif #ifdef HAVE_PHOTON_FOCUS diff --git a/test/grab.c b/test/grab.c index bcee9aa..0226e0a 100644 --- a/test/grab.c +++ b/test/grab.c @@ -2,6 +2,7 @@ #include <stdio.h> #include <stdlib.h> #include <signal.h> +#include <unistd.h> #include "uca.h" #define handle_error(errno) {if ((errno) != UCA_NO_ERROR) printf("error at <%s:%i>\n", \ |