* An issue with: pwc, v4l2, VIDIOC_DQBUF and mplayer
@ 2008-07-04 22:37 audetto
0 siblings, 0 replies; only message in thread
From: audetto @ 2008-07-04 22:37 UTC (permalink / raw)
To: video4linux-list
Sorry if the message arrives twice, but when sending from gmail I
always get
"Message has a suspicious header"
=====================================================
Hi,
I have a Logitech QuickCam 4000 Pro USB and I am trying to use mplayer
to play the video.
This is the command I use
mplayer -tv width=640:height=480:driver=v4l2 -fps 15 tv://
But when I quit mplayer hangs in the following line, while shutting
down the video
/* unqueue all remaining buffers */
memset(&buf,0,sizeof(buf));
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
buf.memory = V4L2_MEMORY_MMAP;
while (!ioctl(priv->video_fd, VIDIOC_DQBUF, &buf));
Which is more or less at line 1111 of stream/tvi_v4l2.c.
The problem is that the ioctl call VIDIOC_DQBUF never returns.
Reading the doc for VIDIOC_DQBUF
http://www.linuxtv.org/downloads/video4linux/API/V4L2_API/spec/r8849.
htm
The function should stop if there is no block to unqueue, unless it
has been opened with O_NONBLOCK.
mplayer DOES NOT use O_NONBLOCK, so the call is allowed to block.
The problems are 2
1) I've tried to open with O_NONBLOCK and the ioctl blocks anyway.
pwc-v4l.c at line 1120 does not check for O_NONBLOCK.
Is this a bug?
2) should mplayer handle the situation in a different way? is there a
way to check if there are queued blocks?
Andrea
_________________________________________________________________
Tiscali Family: Adsl e Telefono senza limiti e senza scatto alla risposta. PER TE CON LO SCONTO DEL 25% FINO AL 2010. In più il software parental control Magic Desktop Basic è GRATIS! Attiva entro il 10/07/08. http://abbonati.tiscali.it/promo/tuttoincluso/
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-07-04 22:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-04 22:37 An issue with: pwc, v4l2, VIDIOC_DQBUF and mplayer audetto
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.