diff options
author | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-03-18 10:42:11 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-03-18 10:42:11 +0100 |
commit | a95fb6dad12ef73b05e79198763465f418090e99 (patch) | |
tree | 08cc1f9d142c1352570958518dfb874aa1e841c7 /src/cameras/pco.c | |
parent | 384d9c7e478ed9b6b64b050a4251475519fc9580 (diff) | |
download | uca-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/pco.c')
-rw-r--r-- | src/cameras/pco.c | 13 |
1 files changed, 12 insertions, 1 deletions
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) |