diff options
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); |