diff options
author | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-02-23 09:24:44 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-02-23 09:24:44 +0100 |
commit | d69b1e834cc1558ff117688da7030dabd22099fa (patch) | |
tree | f2020a161aefc73b789386a1c38e5a260b600ee6 /src/uca.h | |
parent | 29aec734715f7c4d6b8157ac514eff4fd8dd0242 (diff) | |
download | libuca-d69b1e834cc1558ff117688da7030dabd22099fa.tar.gz libuca-d69b1e834cc1558ff117688da7030dabd22099fa.tar.bz2 libuca-d69b1e834cc1558ff117688da7030dabd22099fa.tar.xz libuca-d69b1e834cc1558ff117688da7030dabd22099fa.zip |
Do something meaningful and check for frame grabber library
Diffstat (limited to 'src/uca.h')
-rw-r--r-- | src/uca.h | 35 |
1 files changed, 33 insertions, 2 deletions
@@ -1,15 +1,36 @@ #ifndef __UNIFIED_CAMERA_ACCESS_H #define __UNIFIED_CAMERA_ACCESS_H +#include <stdint.h> + struct uca_t; /* * \brief Camera probing and initialization * \return 0 if camera is not found or could not be initialized */ -typedef int (*uca_cam_init) (struct uca_t *uca); +typedef uint32_t (*uca_cam_init) (struct uca_t *uca); + +typedef uint32_t (*uca_cam_destroy) (struct uca_t *uca); + +typedef uint32_t (*uca_cam_set_dimensions) (struct uca_t *uca, uint32_t *width, uint32_t *height); + +typedef uint32_t (*uca_cam_set_bitdepth) (struct uca_t *uca, uint8_t *bitdepth); + +typedef uint32_t (*uca_cam_set_exposure) (struct uca_t *uca, uint32_t *exposure); + +typedef uint32_t (*uca_cam_set_delay) (struct uca_t *uca, uint32_t *delay); + +typedef uint32_t (*uca_cam_acquire_image) (struct uca_t *uca, void *buffer); + + + +#define UCA_ERR_INIT_NOT_FOUND 1 /**< camera probing failed */ + +#define UCA_ERR_DIMENSION_NOT_SUPPORTED 1 + +#define UCA_ERR_BITDEPTH_NOT_SUPPORTED 1 -typedef void (*uca_cam_destroy) (struct uca_t *uca); #define UCA_BIG_ENDIAN 1 #define UCA_LITTLE_ENDIAN 2 @@ -22,7 +43,17 @@ struct uca_t { unsigned int image_flags; /* Function pointers to camera-specific methods */ + uca_cam_set_dimensions cam_set_dimensions; + uca_cam_set_bitdepth cam_set_bitdepth; + uca_cam_set_exposure cam_set_exposure; + uca_cam_set_delay cam_set_delay; + + uca_cam_acquire_image cam_acquire_image; + + /* Private */ uca_cam_destroy cam_destroy; + + void *user; /**< private user data to be used by the camera driver */ }; struct uca_t *uca_init(); |