summaryrefslogtreecommitdiffstats
path: root/src/cameras/ipe.c
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de>2011-03-18 10:42:11 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de>2011-03-18 10:42:11 +0100
commita95fb6dad12ef73b05e79198763465f418090e99 (patch)
tree08cc1f9d142c1352570958518dfb874aa1e841c7 /src/cameras/ipe.c
parent384d9c7e478ed9b6b64b050a4251475519fc9580 (diff)
downloaduca-a95fb6dad12ef73b05e79198763465f418090e99.tar.gz
uca-a95fb6dad12ef73b05e79198763465f418090e99.tar.bz2
uca-a95fb6dad12ef73b05e79198763465f418090e99.tar.xz
uca-a95fb6dad12ef73b05e79198763465f418090e99.zip
Add (possible) meta data transmission and integrate callback in pco and pf
Diffstat (limited to 'src/cameras/ipe.c')
-rw-r--r--src/cameras/ipe.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/cameras/ipe.c b/src/cameras/ipe.c
index 4b3d021..a9f1ff2 100644
--- a/src/cameras/ipe.c
+++ b/src/cameras/ipe.c
@@ -88,11 +88,21 @@ static uint32_t uca_ipe_stop_recording(struct uca_camera *cam)
return UCA_NO_ERROR;
}
-static uint32_t uca_ipe_grab(struct uca_camera *cam, char *buffer)
+static uint32_t uca_ipe_grab(struct uca_camera *cam, char *buffer, void *meta_data)
{
return UCA_NO_ERROR;
}
+static uint32_t uca_ipe_register_callback(struct uca_camera *cam, uca_cam_grab_callback cb, void *user)
+{
+ if (cam->callback == NULL) {
+ cam->callback = cb;
+ cam->callback_user = user;
+ return UCA_NO_ERROR;
+ }
+ return UCA_ERR_GRABBER_CALLBACK_ALREADY_REGISTERED;
+}
+
static uint32_t uca_ipe_destroy(struct uca_camera *cam)
{
pcilib_close(GET_HANDLE(cam));
@@ -118,7 +128,10 @@ uint32_t uca_ipe_init(struct uca_camera **cam, struct uca_grabber *grabber)
uca->start_recording = &uca_ipe_start_recording;
uca->stop_recording = &uca_ipe_stop_recording;
uca->grab = &uca_ipe_grab;
+ uca->register_callback = &uca_ipe_register_callback;
+ uca->callback = NULL;
+ uca_>callback_user = NULL;
uca->state = UCA_CAM_CONFIGURABLE;
uca->user = handle;
*cam = uca;