public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* More videobuf and streaming I/O questions
@ 2010-02-20 14:00 Hans Verkuil
  2010-02-21 23:12 ` Laurent Pinchart
  0 siblings, 1 reply; 12+ messages in thread
From: Hans Verkuil @ 2010-02-20 14:00 UTC (permalink / raw)
  To: linux-media; +Cc: Mauro Carvalho Chehab

I have a few more questions regarding the streaming I/O API:

1) The spec mentions that the memory field should be set for VIDIOC_DQBUF.
But videobuf doesn't need it and it makes no sense to me either unless it
is for symmetry with VIDIOC_QBUF. Strictly speaking QBUF doesn't need it
either, but it is a good sanity check.

Can I remove the statement in the spec that memory should be set for DQBUF?
The alternative is to add a check against the memory field in videobuf, but
that's rather scary.

2) What to do with REQBUFS when called with a count of 0? Thinking it over I
agree that it shouldn't do an implicit STREAMOFF. But I do think that it is
useful to allow as a simple check whether the I/O method is supported.

So a count of 0 will either return an error if streaming is still in progress
or if the proposed I/O method is not supported, otherwise it will return 0
while leaving count to 0.

This allows one to use REQBUFS to test which I/O methods are supported by
the driver without having the driver allocating any buffers.

This will become more important with embedded systems where almost certainly
additional I/O methods will be introduced (in particular non-contiguous plane
support).

Currently a count of 0 will result in an error in videobuf.

Note that drivers do not generally check for valid values of the memory field
at the moment. So that is another thing we need to improve. But before I start
working on that, I first want to know exactly how REQBUFS should work.

Regards,

	Hans

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-02-26 14:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-20 14:00 More videobuf and streaming I/O questions Hans Verkuil
2010-02-21 23:12 ` Laurent Pinchart
2010-02-22  9:47   ` Jean-Francois Moine
2010-02-23 12:45     ` Laurent Pinchart
2010-02-23  7:41   ` Pawel Osciak
2010-02-25 23:46     ` Laurent Pinchart
2010-02-26  7:36       ` Pawel Osciak
2010-02-26 12:04         ` Mauro Carvalho Chehab
2010-02-26 13:05           ` Muralidharan Karicheri
2010-02-26 14:29             ` Laurent Pinchart
2010-02-26 14:41               ` Karicheri, Muralidharan
2010-02-26 14:24           ` Laurent Pinchart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox