[MPlayer-dev-eng] [PATCH] Fix V4L2 buffer operations and tuner handling

Laurent Pinchart laurent.pinchart at skynet.be
Wed Dec 6 11:42:03 CET 2006


Hi Benjamin,

> > this patch fixes problems with video acquisition through the V4L2 API.
> > Two separate issues are addressed, which prevented MPlayer from working
> > with UVC
> > (USB Video Class) devices.
> >
> > - Many V4L2 devices (mostly webcams) have no tuner. For those devices the
> > concept of norm just doesn't apply. VIDIOC_G_STD should not be called for
> > those tuner-less devices.
> >
> > - The buffer management (using VIDIOC_QBUF, VIDIOC_DQBUF and
> > VIDIOC_REQBUFS)
> > code doesn't set the buffer memory type to V4L2_MEMORY_MMAP. While many
> > drivers fails to check the parameter, it is nonetheless mandatory to set
> > it
> > to the correct value.
>
> The patch looks good to me but please resend without the cosmetic changes.
> All of the patch isn't needed.

Cosmetic changes have been removed, as well as the VIDIOC_G_STD changes. I'm 
working on a better fix for the last one (division by zero when VIDIOC_G_STD 
fails come to mind).

Please apply the buffer management patch. The VIDIOC_G_STD issue only affects 
mencoder, so this patch is useful on its own for mplayer.

Laurent Pinchart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tvi_v4l2.buffer.patch
Type: text/x-diff
Size: 2045 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20061206/22698d7b/attachment.patch>


More information about the MPlayer-dev-eng mailing list