summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de>2011-03-18 09:37:35 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de>2011-03-18 09:37:35 +0100
commit40d450c588a9f2548e6ae677d4d448bdec5d6a6a (patch)
tree024dd76eca988ccc2c194bc70084aa223089fc53 /test
parent406445e7694222e16da863908d93c87c27778ec3 (diff)
downloaduca-40d450c588a9f2548e6ae677d4d448bdec5d6a6a.tar.gz
uca-40d450c588a9f2548e6ae677d4d448bdec5d6a6a.tar.bz2
uca-40d450c588a9f2548e6ae677d4d448bdec5d6a6a.tar.xz
uca-40d450c588a9f2548e6ae677d4d448bdec5d6a6a.zip
Pass registered user data to callback
Diffstat (limited to 'test')
-rw-r--r--test/grab-async.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/grab-async.c b/test/grab-async.c
index 8086d92..ba3ae85 100644
--- a/test/grab-async.c
+++ b/test/grab-async.c
@@ -5,7 +5,7 @@
#include "uca.h"
#include "uca-cam.h"
-void grab_callback(uint32_t image_number, void *buffer)
+void grab_callback(uint32_t image_number, void *buffer, void *user)
{
printf("got picture number %i\n", image_number);
}
@@ -35,10 +35,10 @@ int main(int argc, char *argv[])
uca_cam_alloc(cam, 10);
- cam->register_callback(cam, &grab_callback);
+ cam->register_callback(cam, &grab_callback, NULL);
cam->start_recording(cam);
- printf("waiting for 10 seconds\n");
- sleep(10);
+ printf("waiting for 5 seconds\n");
+ sleep(5);
cam->stop_recording(cam);
uca_destroy(u);