diff options
author | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-02-28 15:11:51 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-02-28 15:11:51 +0100 |
commit | b715cc76cfd8d972663bd2dd15c461f0e6ed5fc3 (patch) | |
tree | 4a0b4269bb557d2f9eca2b079da32e8320d0f91c /src/uca-cam.h | |
parent | f588f10b6fc6e452d42a66abc56028fe21cd56c2 (diff) | |
download | uca-b715cc76cfd8d972663bd2dd15c461f0e6ed5fc3.tar.gz uca-b715cc76cfd8d972663bd2dd15c461f0e6ed5fc3.tar.bz2 uca-b715cc76cfd8d972663bd2dd15c461f0e6ed5fc3.tar.xz uca-b715cc76cfd8d972663bd2dd15c461f0e6ed5fc3.zip |
Complete frame grabber abstraction
Diffstat (limited to 'src/uca-cam.h')
-rw-r--r-- | src/uca-cam.h | 94 |
1 files changed, 4 insertions, 90 deletions
diff --git a/src/uca-cam.h b/src/uca-cam.h index 99ed5f2..aacd5c3 100644 --- a/src/uca-cam.h +++ b/src/uca-cam.h @@ -4,6 +4,7 @@ #include <stdint.h> struct uca_camera_t; +struct uca_grabber_t; struct uca_property_t; enum uca_property_ids; @@ -22,7 +23,7 @@ enum uca_cam_state uca_get_camera_state(struct uca_camera_t *cam); * \brief Camera probing and initialization * \return UCA_ERR_INIT_NOT_FOUND if camera is not found or could not be initialized */ -typedef uint32_t (*uca_cam_init) (struct uca_camera_t **cam); +typedef uint32_t (*uca_cam_init) (struct uca_camera_t **cam, struct uca_grabber_t *grabber); /** * \brief Free camera resouces @@ -55,96 +56,7 @@ typedef uint32_t (*uca_cam_alloc) (struct uca_camera_t *cam, uint32_t n_buffers) */ typedef uint32_t (*uca_cam_acquire_image) (struct uca_camera_t *cam, void *buffer); -/** - * \brief Convert a property string to the corresponding ID - */ -enum uca_property_ids uca_get_property_id(const char *property_name); - -/** - * \brief Convert a property ID to the corresponding string - */ -const char* uca_get_property_name(enum uca_property_ids property_id); - -/** - * \brief Return the full property structure for a given ID - */ -struct uca_property_t *uca_get_full_property(enum uca_property_ids property_id); - - -/* The property IDs must start with 0 and must be continuous. Whenever this - * library is released, the IDs must not change to guarantee binary compatibility! */ -enum uca_property_ids { - UCA_PROP_NAME = 0, - UCA_PROP_WIDTH, - UCA_PROP_WIDTH_MIN, - UCA_PROP_WIDTH_MAX, - UCA_PROP_HEIGHT, - UCA_PROP_HEIGHT_MIN, - UCA_PROP_HEIGHT_MAX, - UCA_PROP_X_OFFSET, - UCA_PROP_Y_OFFSET, - UCA_PROP_BITDEPTH, - UCA_PROP_EXPOSURE, - UCA_PROP_EXPOSURE_MIN, - UCA_PROP_EXPOSURE_MAX, - UCA_PROP_DELAY, - UCA_PROP_DELAY_MIN, - UCA_PROP_DELAY_MAX, - UCA_PROP_FRAMERATE, - UCA_PROP_TRIGGER_MODE, - - /* pco.edge specific */ - UCA_PROP_TIMESTAMP_MODE, - UCA_PROP_SCAN_MODE, - - /* IPE camera specific */ - UCA_PROP_INTERLACE_SAMPLE_RATE, - UCA_PROP_INTERLACE_PIXEL_THRESH, - UCA_PROP_INTERLACE_ROW_THRESH, - - /* Photon Focus specific */ - UCA_PROP_CORRECTION_MODE, - - UCA_PROP_LAST -}; - -/* Possible timestamp modes for UCA_PROP_TIMESTAMP_MODE */ -#define UCA_TIMESTAMP_ASCII 0x01 -#define UCA_TIMESTAMP_BINARY 0x02 - -/* Trigger mode for UCA_PROP_TRIGGERMODE */ -#define UCA_TRIGGER_AUTO 1 -#define UCA_TRIGGER_INTERNAL 2 -#define UCA_TRIGGER_EXTERNAL 3 - -/* Correction modes for UCA_PROP_CORRECTION_MODE */ -#define UCA_CORRECT_OFFSET 0x01 -#define UCA_CORRECT_HOTPIXEL 0x02 -#define UCA_CORRECT_GAIN 0x04 -/** - * \brief Describe a camera property - */ -struct uca_property_t { - const char *name; - - enum uca_unit { - uca_pixel, - uca_bits, - uca_ns, - uca_us, - uca_ms, - uca_s, - uca_rows, - uca_na - } unit; - - enum uca_types { - uca_uint32t, - uca_uint8t, - uca_string - } type; -}; enum uca_cam_state { UCA_CAM_ERROR, @@ -164,6 +76,8 @@ struct uca_camera_t { /* Private */ uca_cam_destroy destroy; + + struct uca_grabber_t *grabber; enum uca_cam_state state; void *user; /**< private user data to be used by the camera driver */ |