Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -u uvccapture-0.5-nonoo-r3/Makefile uvccapture-0.5-nonoo-r4/Makefile
- --- uvccapture-0.5-nonoo-r3/Makefile 2011-09-24 19:41:52.000000000 +1000
- +++ uvccapture-0.5-nonoo-r4/Makefile 2011-09-24 22:53:22.000000000 +1000
- @@ -1,7 +1,7 @@
- CC=gcc
- CPP=g++
- APP_BINARY=uvccapture
- -VERSION = 0.5.3
- +VERSION = 0.5.4
- PREFIX=/usr/local/bin
- WARNINGS = -Wall
- diff -u uvccapture-0.5-nonoo-r3/uvccapture.c uvccapture-0.5-nonoo-r4/uvccapture.c
- --- uvccapture-0.5-nonoo-r3/uvccapture.c 2011-09-24 20:05:29.000000000 +1000
- +++ uvccapture-0.5-nonoo-r4/uvccapture.c 2011-09-24 22:53:04.000000000 +1000
- @@ -79,7 +79,9 @@
- fprintf (stderr,
- "-D<integer>\tPre-delay before capture\n");
- fprintf (stderr,
- - "-W\t\tConstantly capture images during the pre-delay loop\n");
- + "-P<integer>\tPost-delay after capture\n");
- + fprintf (stderr,
- + "-W\t\tConstantly capture images during the pre-delay and post-delay loops\n");
- fprintf (stderr, "Camera Settings:\n");
- fprintf (stderr, "-B<integer>\tBrightness\n");
- fprintf (stderr, "-C<integer>\tContrast\n");
- @@ -307,6 +309,7 @@
- unsigned char* imageWithDHT = NULL;
- int imageWithDHTSize = 0;
- int preDelay = 0;
- + int postDelay = 0;
- int backGround = 0;
- int preDelayCapture = 0;
- int cameraControlsEnabled = 0;
- @@ -412,6 +415,10 @@
- preDelay = atoi (&argv[1][2]);
- break;
- + case 'P':
- + postDelay = atoi (&argv[1][2]);
- + break;
- +
- case 'h':
- usage ();
- break;
- @@ -440,7 +447,7 @@
- fprintf (stderr, "Taking images using read\n");
- if (pre_capture_command[0])
- fprintf (stderr, "Executing '%s' before each image capture\n",
- - pre_capture_command[0]);
- + pre_capture_command[0]);
- if (post_capture_command[0])
- fprintf (stderr, "Executing '%s' after each image capture\n",
- post_capture_command[0]);
- @@ -516,7 +523,7 @@
- }
- while (run) {
- - if (preDelay) {
- + if (preDelay > 0) {
- if (verbose > 0)
- fprintf (stderr, "Pre-delay: %d, sleeping...\n", preDelay);
- @@ -600,6 +607,23 @@
- }
- if (delay == 0)
- break;
- +
- + if (postDelay > 0) {
- + if (verbose > 0)
- + fprintf (stderr, "Post-delay: %d, sleeping...\n", postDelay);
- +
- + for (int i = 0; i < postDelay; i++) {
- + if (run == 0)
- + break;
- + // allowing camera to adjust exposure
- + if (i == 0 || preDelayCapture) {
- + uvcGrab(videoIn);
- + videoIn->getPict = 0;
- + }
- +
- + sleep(1);
- + }
- + }
- }
- close_v4l2 (videoIn);
- free (videoIn);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement