diff options
-rw-r--r-- | src/cameras/pco.c | 14 | ||||
-rw-r--r-- | src/cameras/pf.c | 9 | ||||
-rw-r--r-- | src/grabbers/me4.c | 1 | ||||
-rw-r--r-- | src/uca-cam.c | 3 | ||||
-rw-r--r-- | src/uca.c | 3 |
5 files changed, 10 insertions, 20 deletions
diff --git a/src/cameras/pco.c b/src/cameras/pco.c index 565fd62..9ae94c8 100644 --- a/src/cameras/pco.c +++ b/src/cameras/pco.c @@ -15,12 +15,6 @@ #define set_void(p, type, value) { *((type *) p) = (type) value; } -static uint32_t uca_pco_set_bitdepth(struct uca_camera_t *cam, uint8_t *bitdepth) -{ - /* TODO: it's not possible via CameraLink so do it via frame grabber */ - return 0; -} - static uint32_t uca_pco_set_exposure(struct uca_camera_t *cam, uint32_t *exposure) { uint32_t e, d; @@ -41,11 +35,6 @@ static uint32_t uca_pco_set_delay(struct uca_camera_t *cam, uint32_t *delay) return UCA_NO_ERROR; } -static uint32_t uca_pco_acquire_image(struct uca_camera_t *cam, void *buffer) -{ - return UCA_NO_ERROR; -} - static uint32_t uca_pco_destroy(struct uca_camera_t *cam) { pco_set_rec_state(GET_PCO(cam), 0); @@ -223,6 +212,7 @@ uint32_t uca_pco_stop_recording(struct uca_camera_t *cam) { if (pco_set_rec_state(GET_PCO(cam), 0) != PCO_NOERROR) return UCA_ERR_PROP_GENERAL; + return UCA_NO_ERROR; } uint32_t uca_pco_grab(struct uca_camera_t *cam, char *buffer) @@ -282,7 +272,7 @@ uint32_t uca_pco_init(struct uca_camera_t **cam, struct uca_grabber_t *grabber) val = FREE_RUN; grabber->set_property(grabber, FG_TRIGGERMODE, &val); - int width, height; + uint32_t width, height; pco_get_actual_size(pco, &width, &height); uca->frame_width = width; uca->frame_height = height; diff --git a/src/cameras/pf.c b/src/cameras/pf.c index a39fd3d..c199576 100644 --- a/src/cameras/pf.c +++ b/src/cameras/pf.c @@ -55,11 +55,6 @@ static struct uca_pf_map uca_to_pf[] = { { -1, NULL } }; -static uint32_t uca_pf_acquire_image(struct uca_camera_t *cam, void *buffer) -{ - return UCA_NO_ERROR; -} - static uint32_t uca_pf_set_property(struct uca_camera_t *cam, enum uca_property_ids property, void *data) { struct uca_grabber_t *grabber = cam->grabber; @@ -128,7 +123,6 @@ static uint32_t uca_pf_set_property(struct uca_camera_t *cam, enum uca_property_ static uint32_t uca_pf_get_property(struct uca_camera_t *cam, enum uca_property_ids property, void *data) { - struct uca_grabber_t *grabber = cam->grabber; TOKEN t; /* You gotta love developers who name types capitalized... */ PFValue value; @@ -160,6 +154,9 @@ static uint32_t uca_pf_get_property(struct uca_camera_t *cam, enum uca_property_ case PF_MODE: set_void(data, uint32_t, (uint32_t) value.value.i); break; + + default: + break; } return UCA_NO_ERROR; } diff --git a/src/grabbers/me4.c b/src/grabbers/me4.c index 647c5be..e5ece38 100644 --- a/src/grabbers/me4.c +++ b/src/grabbers/me4.c @@ -22,6 +22,7 @@ uint32_t uca_me4_destroy(struct uca_grabber_t *grabber) Fg_FreeMemEx(GET_FG(grabber), GET_MEM(grabber)); Fg_FreeGrabber(GET_FG(grabber)); } + return UCA_NO_ERROR; } uint32_t uca_me4_set_property(struct uca_grabber_t *grabber, enum uca_property_ids property, void *data) diff --git a/src/uca-cam.c b/src/uca-cam.c index 7e033fd..5d7741d 100644 --- a/src/uca-cam.c +++ b/src/uca-cam.c @@ -10,7 +10,8 @@ uint32_t uca_cam_alloc(struct uca_camera_t *cam, uint32_t n_buffers) cam->get_property(cam, UCA_PROP_BITDEPTH, &bitdepth); const int pixel_size = bitdepth == 8 ? 1 : 2; if (cam->grabber != NULL) - cam->grabber->alloc(cam->grabber, pixel_size, n_buffers); + return cam->grabber->alloc(cam->grabber, pixel_size, n_buffers); + return UCA_NO_ERROR; } enum uca_cam_state uca_cam_get_state(struct uca_camera_t *cam) @@ -1,4 +1,5 @@ #include <stdlib.h> +#include <string.h> #include "config.h" #include "uca.h" @@ -173,7 +174,6 @@ void uca_destroy(struct uca_t *uca) enum uca_property_ids uca_get_property_id(const char *property_name) { - char *name; int i = 0; while (property_map[i].name != NULL) { if (!strcmp(property_map[i].name, property_name)) @@ -194,4 +194,5 @@ const char* uca_get_property_name(enum uca_property_ids property_id) { if ((property_id >= 0) && (property_id < UCA_PROP_LAST)) return property_map[property_id].name; + return UCA_NO_ERROR; } |