summaryrefslogtreecommitdiffstats
path: root/src/cameras/ipe.c
diff options
context:
space:
mode:
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;