diff options
author | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-02-28 14:26:32 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-02-28 14:26:32 +0100 |
commit | f588f10b6fc6e452d42a66abc56028fe21cd56c2 (patch) | |
tree | 075e37f2e76936b42fc420071035ea5f6788d869 /src/uca.c | |
parent | 31a9401a4c18fea613d8a508583dd657c41c384c (diff) | |
download | uca-f588f10b6fc6e452d42a66abc56028fe21cd56c2.tar.gz uca-f588f10b6fc6e452d42a66abc56028fe21cd56c2.tar.bz2 uca-f588f10b6fc6e452d42a66abc56028fe21cd56c2.tar.xz uca-f588f10b6fc6e452d42a66abc56028fe21cd56c2.zip |
Prepare for frame grabber abstraction
Diffstat (limited to 'src/uca.c')
-rw-r--r-- | src/uca.c | 71 |
1 files changed, 10 insertions, 61 deletions
@@ -2,21 +2,27 @@ #include "config.h" #include "uca.h" +#include "uca-cam.h" +#include "uca-grabber.h" + +#ifdef HAVE_ME4 +#include "grabbers/me4.h" +#endif #ifdef HAVE_PCO_EDGE -#include "cameras/uca_pco.h" +#include "cameras/pco.h" #endif #ifdef HAVE_PHOTON_FOCUS -#include "cameras/uca_pf.h" +#include "cameras/pf.h" #endif #ifdef HAVE_IPE_CAM -#include "cameras/uca_ipe.h" +#include "cameras/ipe.h" #endif #ifdef HAVE_PHOTRON_FASTCAM -#include "cameras/uca_photron.h" +#include "cameras/photron.h" #endif @@ -79,60 +85,3 @@ void uca_destroy(struct uca_t *uca) } } -enum uca_cam_state uca_get_camera_state(struct uca_camera_t *cam) -{ - return cam->state; -} - -static struct uca_property_t property_map[UCA_PROP_LAST+1] = { - { "name", uca_na, uca_string }, - { "width", uca_pixel, uca_uint32t }, - { "width.min", uca_pixel, uca_uint32t }, - { "width.max", uca_pixel, uca_uint32t }, - { "height", uca_pixel, uca_uint32t }, - { "height.min", uca_pixel, uca_uint32t }, - { "height.max", uca_pixel, uca_uint32t }, - { "offset.x", uca_pixel, uca_uint32t }, - { "offset.y", uca_pixel, uca_uint32t }, - { "bitdepth", uca_bits, uca_uint8t }, - { "exposure", uca_us, uca_uint32t }, - { "exposure.min", uca_ns, uca_uint32t }, - { "exposure.max", uca_ms, uca_uint32t }, - { "delay", uca_us, uca_uint32t }, - { "delay.min", uca_ns, uca_uint32t }, - { "delay.max", uca_ms, uca_uint32t }, - { "framerate", uca_na, uca_uint32t }, - { "triggermode", uca_na, uca_uint32t }, - { "timestampmode", uca_na, uca_uint32t }, - { "scan-mode", uca_na, uca_uint32t }, - { "interlace.samplerate", uca_na, uca_uint32t }, - { "interlace.threshold.pixel", uca_na, uca_uint32t }, - { "interlace.threshold.row", uca_na, uca_uint32t }, - { "correctionmode", uca_na, uca_uint32t }, - { NULL, 0, 0 } -}; - -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)) - return i; - i++; - } - return UCA_ERR_PROP_INVALID; -} - -struct uca_property_t *uca_get_full_property(enum uca_property_ids property_id) -{ - if ((property_id >= 0) && (property_id < UCA_PROP_LAST)) - return &property_map[property_id]; - return NULL; -} - -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; -} |