diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2011-08-09 18:12:18 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2011-08-09 18:12:18 +0200 |
commit | d98e009ad120d77ed0c782b36a09fcf366e299e1 (patch) | |
tree | 1f2fde973b89b43c8a86a5b4b22eb10b3f8d32c3 /src/cameras/ipe.c | |
parent | 5f1a2731f3d6ad16214bd83095f8e1511cf1d76b (diff) | |
download | libuca-d98e009ad120d77ed0c782b36a09fcf366e299e1.tar.gz libuca-d98e009ad120d77ed0c782b36a09fcf366e299e1.tar.bz2 libuca-d98e009ad120d77ed0c782b36a09fcf366e299e1.tar.xz libuca-d98e009ad120d77ed0c782b36a09fcf366e299e1.zip |
Some adjustments for IPE camera
Diffstat (limited to 'src/cameras/ipe.c')
-rw-r--r-- | src/cameras/ipe.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/cameras/ipe.c b/src/cameras/ipe.c index 2993409..c398350 100644 --- a/src/cameras/ipe.c +++ b/src/cameras/ipe.c @@ -29,6 +29,10 @@ static uint32_t uca_ipe_get_property(struct uca_camera_priv *cam, enum uca_prope strncpy((char *) data, "IPE PCIe based on CMOSIS CMV2000", num); break; + case UCA_PROP_BITDEPTH: + set_void(data, uint32_t, 16); + break; + case UCA_PROP_WIDTH: set_void(data, uint32_t, 2048); break; @@ -91,11 +95,12 @@ static uint32_t uca_ipe_stop_recording(struct uca_camera_priv *cam) static uint32_t uca_ipe_grab(struct uca_camera_priv *cam, char *buffer, void *meta_data) { pcilib_t *handle = cam->user; - size_t size = 0; + 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)) return UCA_ERR_CAMERA; memcpy(buffer, data, size); + free(data); return UCA_NO_ERROR; } @@ -139,6 +144,8 @@ uint32_t uca_ipe_init(struct uca_camera_priv **cam, struct uca_grabber_priv *gra uca->grab = &uca_ipe_grab; uca->register_callback = &uca_ipe_register_callback; + uca->frame_width = 2048; + uca->frame_height = 1088; uca->user = handle; *cam = uca; |