From a95fb6dad12ef73b05e79198763465f418090e99 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Fri, 18 Mar 2011 10:42:11 +0100 Subject: Add (possible) meta data transmission and integrate callback in pco and pf --- src/cameras/pco.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/cameras/pco.c') diff --git a/src/cameras/pco.c b/src/cameras/pco.c index 1ca16f4..59c689d 100644 --- a/src/cameras/pco.c +++ b/src/cameras/pco.c @@ -212,7 +212,7 @@ uint32_t uca_pco_stop_recording(struct uca_camera *cam) return UCA_NO_ERROR; } -uint32_t uca_pco_grab(struct uca_camera *cam, char *buffer) +uint32_t uca_pco_grab(struct uca_camera *cam, char *buffer, void *meta_data) { uint16_t *frame; uint32_t err = cam->grabber->grab(cam->grabber, (void **) &frame, &cam->current_frame); @@ -224,6 +224,17 @@ uint32_t uca_pco_grab(struct uca_camera *cam, char *buffer) return UCA_NO_ERROR; } +uint32_t uca_pco_register_callback(struct uca_camera *cam, uca_cam_grab_callback callback, void *user) +{ + if (cam->callback == NULL) { + cam->callback = callback; + cam->callback_user = user; + cam->grabber->register_callback(cam->grabber, callback, NULL, user); + return UCA_NO_ERROR; + } + return UCA_ERR_GRABBER_CALLBACK_ALREADY_REGISTERED; +} + uint32_t uca_pco_init(struct uca_camera **cam, struct uca_grabber *grabber) { if (grabber == NULL) -- cgit v1.2.3