summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-10-21 11:25:46 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-10-21 11:25:46 +0200
commitccaf5dfc7727ea32920527a7622509b9724ae42f (patch)
tree0a94f7a4a77b75fb83582de11005ab41221eea6c /test
parent7e1ec3056d1fdb6786c452ba6ed7e978355a98c2 (diff)
downloadlibuca-ccaf5dfc7727ea32920527a7622509b9724ae42f.tar.gz
libuca-ccaf5dfc7727ea32920527a7622509b9724ae42f.tar.bz2
libuca-ccaf5dfc7727ea32920527a7622509b9724ae42f.tar.xz
libuca-ccaf5dfc7727ea32920527a7622509b9724ae42f.zip
Add: readout state
Diffstat (limited to 'test')
-rw-r--r--test/grab-async.c6
-rw-r--r--test/grab.c2
2 files changed, 5 insertions, 3 deletions
diff --git a/test/grab-async.c b/test/grab-async.c
index 945bf15..22774d7 100644
--- a/test/grab-async.c
+++ b/test/grab-async.c
@@ -51,11 +51,11 @@ int main(int argc, char *argv[])
uca_cam_register_callback(cam, &grab_callback, &props);
uca_cam_start_recording(cam);
- printf("grabbing for 2 seconds\n");
- sleep(2);
+ printf("grabbing for 1 second ... ");
+ fflush(stdout);
+ sleep(1);
uca_cam_stop_recording(cam);
printf("done\n");
- fflush(stdout);
uca_destroy(u);
return 0;
diff --git a/test/grab.c b/test/grab.c
index 59a4fb3..d4f458a 100644
--- a/test/grab.c
+++ b/test/grab.c
@@ -36,6 +36,8 @@ int main(int argc, char *argv[])
handle_error(uca_cam_set_property(cam, UCA_PROP_DELAY, &val));
val = UCA_TIMESTAMP_ASCII | UCA_TIMESTAMP_BINARY;
handle_error(uca_cam_set_property(cam, UCA_PROP_TIMESTAMP_MODE, &val));
+ val = 1;
+ handle_error(uca_cam_set_property(cam, UCA_PROP_GRAB_AUTO, &val));
uint32_t width, height, bits;
handle_error(uca_cam_get_property(cam, UCA_PROP_WIDTH, &width, 0));