Re: how to make qbuf
- Date: Wed, 8 Jul 2009 12:57:01 -0300
- From: Lamarque Vieira Souza <lamarque@xxxxxxxxx>
- Subject: Re: how to make qbuf
Em Tuesday 07 July 2009, 서정민 escreveu:
> I'm making V4l2 device driver for mplayer.
mplayer already implements v4l2 specification, you do not need to implement a
driver for it.
> It's too difficult to understand V4l2 driver internal structure.
> I can't understand how to use VIDIOC_QBUF, VIDIOC_DQBUF ioctl and 'struct
VIDIOC_QBUF queues a buffer (struct v4l2_buffer) to a buffer list managed by
the device driver (usually a kernel module). The driver fills the buffer with
needed information (image data, compression type, etc) and the application
must use VIDIOC_DQBUF to get the filled buffer from the device driver's buffer
list. Applications, such as mplayer must use VIDIOC_QBUF and VIDIOC_DQBUF.
videobuf_queue is used by the device driver (kernel space) to manage the
buffer list. If you are creating/changing an application (mplayer) you do not
need to know about videobuf_queue. If you are creating a device driver for a
capture device (webcam, etc) in kernel space then using videobuf_queue will
make your life easier.
> Why does v4l2 driver need to use 'videobuf_queue'?
videobuf_queue is not mandatory but it will make it easier to manage video
frames and implement some needed ioctls in the device driver.
> Please. tell me v4l2 driver internal operation.
You can read more bout v4l2 here http://v4l2spec.bytesex.org/spec-
> video4linux-list mailing list
> Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
Lamarque V. Souza
Linux User #57137 - http://counter.li.org/
video4linux-list mailing list