From 338c435be149cdc0a64e548d3ff3a86d12b1ac38 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Wed, 19 Oct 2011 14:29:57 +0200 Subject: Fix: timestamp mode --- test/control.c | 3 +++ test/grab.c | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/control.c b/test/control.c index 44befe8..156fea3 100644 --- a/test/control.c +++ b/test/control.c @@ -358,6 +358,9 @@ int main(int argc, char *argv[]) uca_cam_get_property(cam, UCA_PROP_HEIGHT, &height, 0); uca_cam_get_property(cam, UCA_PROP_BITDEPTH, &bits_per_sample, 0); + uint32_t mode = UCA_TIMESTAMP_ASCII | UCA_TIMESTAMP_BINARY; + uca_cam_set_property(cam, UCA_PROP_TIMESTAMP_MODE, &mode); + g_thread_init(NULL); gdk_threads_init(); gtk_init (&argc, &argv); diff --git a/test/grab.c b/test/grab.c index ab3263f..6ade84a 100644 --- a/test/grab.c +++ b/test/grab.c @@ -54,8 +54,7 @@ int main(int argc, char *argv[]) int counter = 0; while ((error == UCA_NO_ERROR) && (counter < 20)) { - error = uca_cam_grab(cam, (char *) buffer, NULL); - printf("error = 0x%x\n", error); + handle_error(uca_cam_grab(cam, (char *) buffer, NULL)); snprintf(filename, FILENAME_MAX, "frame-%08i.raw", counter++); FILE *fp = fopen(filename, "wb"); fwrite(buffer, width*height, pixel_size, fp); -- cgit v1.2.3