diff options
author | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-03-18 11:10:00 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-03-18 11:10:00 +0100 |
commit | ef5dfb7febd8881158e493451a27a2500ced14cb (patch) | |
tree | 142d3fce467aa076a4f38437058a5e93f1fecdb7 /src/uca-cam.h | |
parent | 750080d576dadb9c29ac5f565b8e16c8b9aa4a7d (diff) | |
download | uca-ef5dfb7febd8881158e493451a27a2500ced14cb.tar.gz uca-ef5dfb7febd8881158e493451a27a2500ced14cb.tar.bz2 uca-ef5dfb7febd8881158e493451a27a2500ced14cb.tar.xz uca-ef5dfb7febd8881158e493451a27a2500ced14cb.zip |
Initialize all camera fields with NULL to catch errors early on
Diffstat (limited to 'src/uca-cam.h')
-rw-r--r-- | src/uca-cam.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/uca-cam.h b/src/uca-cam.h index ec84c27..d52f390 100644 --- a/src/uca-cam.h +++ b/src/uca-cam.h @@ -43,8 +43,10 @@ enum uca_cam_state { * * \param[in] n_buffers Number of sub-buffers with size frame_width*frame_height. */ +/* FIXME: put this into vtable?! */ uint32_t uca_cam_alloc(struct uca_camera *cam, uint32_t n_buffers); + /** * Retrieve current state of the camera. * @@ -55,6 +57,15 @@ uint32_t uca_cam_alloc(struct uca_camera *cam, uint32_t n_buffers); */ enum uca_cam_state uca_cam_get_state(struct uca_camera *cam); +/** + * Allocates memory for a new uca_camera structure and initializes all fields to + * sane values. + * + * \return Pointer to block of memory for a uca_camera structure + * + * \note This is is a utility function used internally by drivers + */ +struct uca_camera *uca_cam_new(void); /* * --- virtual methods -------------------------------------------------------- |