Web lists-archives.com

Re: how to make qbuf




Em Tuesday 07 July 2009, 서정민 escreveu:
> Hi.

	Hi,

> I'm making V4l2 device driver for mplayer.

	mplayer already implements v4l2 specification, you do not need to implement a 
driver for it.

> But
> It's too difficult to understand V4l2 driver internal structure.
>
> I can't understand how to use VIDIOC_QBUF, VIDIOC_DQBUF ioctl and 'struct
> videobuf_queue'

	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-
single/v4l2.html

> Thanks.
> --
> video4linux-list mailing list
> Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/video4linux-list


-- 
Lamarque V. Souza
http://www.geographicguide.com/brazil.htm
Linux User #57137 - http://counter.li.org/

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list