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/pf.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/pf.c')
-rw-r--r-- | src/cameras/pf.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/cameras/pf.c b/src/cameras/pf.c index 7f6ad0f..ab6a490 100644 --- a/src/cameras/pf.c +++ b/src/cameras/pf.c @@ -171,7 +171,7 @@ uint32_t uca_pf_stop_recording(struct uca_camera *cam) return UCA_NO_ERROR; } -uint32_t uca_pf_grab(struct uca_camera *cam, char *buffer) +uint32_t uca_pf_grab(struct uca_camera *cam, char *buffer, void *metadata) { uint16_t *frame; uint32_t err = cam->grabber->grab(cam->grabber, (void **) &frame, &cam->current_frame); @@ -182,6 +182,17 @@ uint32_t uca_pf_grab(struct uca_camera *cam, char *buffer) return UCA_NO_ERROR; } +uint32_t uca_pf_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; +} + static uint32_t uca_pf_destroy(struct uca_camera *cam) { pfDeviceClose(0); |