shootgun debugging
This commit is contained in:
parent
71205d4ab0
commit
e7ad5188ca
@ -35,6 +35,8 @@
|
||||
#define SAVE_AS_CUMUL 1
|
||||
#define SAVE_AS_FIMG 0
|
||||
|
||||
#define NBR_BUFFERS 4
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
#define CLEAR(x) memset(&(x), 0, sizeof(x))
|
||||
@ -192,7 +194,7 @@ if ((fmt.fmt.pix.width != width) || (fmt.fmt.pix.height != height)) {
|
||||
fprintf(stderr,"--- Ok 1\n");
|
||||
|
||||
CLEAR(req);
|
||||
req.count = 2;
|
||||
req.count = NBR_BUFFERS;
|
||||
req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
req.memory = V4L2_MEMORY_MMAP;
|
||||
xioctl(fd, VIDIOC_REQBUFS, &req);
|
||||
@ -220,7 +222,7 @@ for (n_buffers = 0; n_buffers < req.count; ++n_buffers) {
|
||||
|
||||
(void)fimg_timer_set(0);
|
||||
|
||||
for (i = 0; i < n_buffers; ++i) {
|
||||
for (i = 0; i < NBR_BUFFERS; ++i) {
|
||||
CLEAR(buf);
|
||||
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
buf.memory = V4L2_MEMORY_MMAP;
|
||||
@ -286,7 +288,10 @@ for (i = 0; i < nbre_capt; i++) {
|
||||
buf.memory = V4L2_MEMORY_MMAP;
|
||||
xioctl(fd, VIDIOC_DQBUF, &buf);
|
||||
|
||||
fprintf(stderr, "xioctl VIDIOC_DQBUF done\n"); fflush(stderr);
|
||||
if(verbosity > 2) {
|
||||
fprintf(stderr, "xioctl VIDIOC_DQBUF done\n");
|
||||
fflush(stderr);
|
||||
}
|
||||
|
||||
#if SAVE_AS_CUMUL
|
||||
if (upscaling) {
|
||||
@ -403,7 +408,7 @@ fimg_destroy(&cumul);
|
||||
|
||||
type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
xioctl(fd, VIDIOC_STREAMOFF, &type);
|
||||
for (i = 0; i < n_buffers; ++i) {
|
||||
for (i = 0; i < NBR_BUFFERS; ++i) {
|
||||
v4l2_munmap(buffers[i].start, buffers[i].length);
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ de capture des images, précisément dans cet appel système :
|
||||
buf.memory = V4L2_MEMORY_MMAP;
|
||||
xioctl(fd, VIDIOC_DQBUF, &buf);
|
||||
|
||||
Quand le programme semble figé, un strace -p <pi> sort le même
|
||||
Quand le programme semble figé, un strace -p <pid> sort le même
|
||||
message en rafale _très_ féroce :
|
||||
|
||||
ioctl(3, VIDIOC_DQBUF, {type=V4L2_BUF_TYPE_VIDEO_CAPTURE}) = -1 EAGAIN (Resource temporarily unavailable)
|
||||
|
Loading…
Reference in New Issue
Block a user