forked from tTh/FloatImg
tracking a non existant bug
This commit is contained in:
parent
785b521d4f
commit
ffda756fde
@ -106,7 +106,8 @@ char *dev_name = "/dev/video0";
|
|||||||
struct buffer *buffers;
|
struct buffer *buffers;
|
||||||
|
|
||||||
int foo;
|
int foo;
|
||||||
double period = 10.0; /* delai entre les captures */
|
double period = 10.0; /* delai entre les captures
|
||||||
|
en secondes */
|
||||||
int nbre_capt = 1; /* nombre de captures */
|
int nbre_capt = 1; /* nombre de captures */
|
||||||
int opt;
|
int opt;
|
||||||
int width = 640;
|
int width = 640;
|
||||||
@ -144,7 +145,6 @@ while ((opt = getopt(argc, argv, "c:d:ghn:o:O:p:r:s:uv")) != -1) {
|
|||||||
optarg);
|
optarg);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
period *= 1e6;
|
|
||||||
break;
|
break;
|
||||||
case 'r': rotfactor = atoi(optarg); break;
|
case 'r': rotfactor = atoi(optarg); break;
|
||||||
case 's': parse_WxH(optarg, &width, &height);
|
case 's': parse_WxH(optarg, &width, &height);
|
||||||
@ -162,7 +162,7 @@ if (verbosity > 1) {
|
|||||||
fprintf(stderr, "*** GrabVidSeq (%s, %s) libv %d, pid=%d\n",
|
fprintf(stderr, "*** GrabVidSeq (%s, %s) libv %d, pid=%d\n",
|
||||||
__DATE__, __TIME__, FIMG_VERSION, getpid());
|
__DATE__, __TIME__, FIMG_VERSION, getpid());
|
||||||
fprintf(stderr, "grabing %d picz, ", nbre_capt);
|
fprintf(stderr, "grabing %d picz, ", nbre_capt);
|
||||||
fprintf(stderr, "period is %.3f milliseconds\n", period/1e3);
|
fprintf(stderr, "period is %.3f seconds\n", period);
|
||||||
fprintf(stderr, "framesize is %dx%d\n", width, height);
|
fprintf(stderr, "framesize is %dx%d\n", width, height);
|
||||||
// fprintf(stderr, "destdir is '%s'\n", dest_dir);
|
// fprintf(stderr, "destdir is '%s'\n", dest_dir);
|
||||||
if (upscaling) fprintf(stderr, "upscaling is on\n");
|
if (upscaling) fprintf(stderr, "upscaling is on\n");
|
||||||
@ -277,7 +277,7 @@ for (i = 0; i < nbre_capt; i++) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(verbosity > 1) {
|
if(verbosity > 1) {
|
||||||
fprintf(stderr, "%6d / %6d %9.3f\n", i, nbre_capt,
|
fprintf(stderr, "%6d / %6d %9.3f\r", i, nbre_capt,
|
||||||
fimg_timer_get(0));
|
fimg_timer_get(0));
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
@ -309,15 +309,15 @@ for (i = 0; i < nbre_capt; i++) {
|
|||||||
out_name);
|
out_name);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (nbre_capt > 1 && period > 1.0) {
|
if (nbre_capt > 1 && period > 0.001) {
|
||||||
usleep(period);
|
/* suspend execution for
|
||||||
|
microsecond intervals */
|
||||||
|
usleep((int)(period*1E6));
|
||||||
}
|
}
|
||||||
|
|
||||||
xioctl(fd, VIDIOC_QBUF, &buf);
|
xioctl(fd, VIDIOC_QBUF, &buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
fflush(stdout);
|
|
||||||
|
|
||||||
if (verbosity) {
|
if (verbosity) {
|
||||||
t_final = fimg_timer_get(0);
|
t_final = fimg_timer_get(0);
|
||||||
fprintf(stderr, "pid %d : elapsed %.3g s -> %.2f fps\n", getpid(),
|
fprintf(stderr, "pid %d : elapsed %.3g s -> %.2f fps\n", getpid(),
|
||||||
@ -398,8 +398,6 @@ switch (foo) {
|
|||||||
}
|
}
|
||||||
// free buffers
|
// free buffers
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
fimg_destroy(&cumul);
|
fimg_destroy(&cumul);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user