diff options
author | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-03-18 09:37:35 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-03-18 09:37:35 +0100 |
commit | 40d450c588a9f2548e6ae677d4d448bdec5d6a6a (patch) | |
tree | 024dd76eca988ccc2c194bc70084aa223089fc53 /src/uca-cam.h | |
parent | 406445e7694222e16da863908d93c87c27778ec3 (diff) | |
download | uca-40d450c588a9f2548e6ae677d4d448bdec5d6a6a.tar.gz uca-40d450c588a9f2548e6ae677d4d448bdec5d6a6a.tar.bz2 uca-40d450c588a9f2548e6ae677d4d448bdec5d6a6a.tar.xz uca-40d450c588a9f2548e6ae677d4d448bdec5d6a6a.zip |
Pass registered user data to callback
Diffstat (limited to 'src/uca-cam.h')
-rw-r--r-- | src/uca-cam.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/uca-cam.h b/src/uca-cam.h index ca80ec9..4ccb07e 100644 --- a/src/uca-cam.h +++ b/src/uca-cam.h @@ -137,8 +137,10 @@ typedef uint32_t (*uca_cam_stop_recording) (struct uca_camera *cam); * \param[in] image_number Current frame number * * \param[in] buffer Image data + * + * \param[in] user User data registered in uca_cam_register_callback() */ -typedef void (*uca_cam_grab_callback) (uint32_t image_number, void *buffer); +typedef void (*uca_cam_grab_callback) (uint32_t image_number, void *buffer, void *user); /** * Register callback for given frame grabber. To actually start receiving @@ -147,8 +149,10 @@ typedef void (*uca_cam_grab_callback) (uint32_t image_number, void *buffer); * \param[in] grabber The grabber for which the callback should be installed * * \param[in] cb Callback function for when a frame arrived + * + * \param[in] user User data that is passed to the callback function */ -typedef uint32_t (*uca_cam_register_callback) (struct uca_camera *cam, uca_cam_grab_callback cb); +typedef uint32_t (*uca_cam_register_callback) (struct uca_camera *cam, uca_cam_grab_callback cb, void *user); /** * \brief Grab one image from the camera @@ -224,7 +228,9 @@ typedef struct uca_camera { uint32_t frame_width; /**< current frame width */ uint32_t frame_height; /**< current frame height */ uint32_t current_frame; /**< last grabbed frame number */ + uca_cam_grab_callback callback; + void *user_callback; /**< user data for callback */ void *user; /**< private user data to be used by the camera driver */ } uca_camera_t; |