buffer index when streaming user-ptr buffers
In the V4L2 spec, the description for v4l2_buffer.index says "This field is only used for memory mapping I/O..."
However, in v4l-utils/contrib/capture-example.c, even user-pointer buffers are indeed given a buf.index before being passed to VIDIOC_QBUF.
And at least in the OMAP ISP driver, this information is relied upon in
QBUF regardless of V4L2_MEMORY_MMAP/USERPTR. videobuf-core also uses v4l2_buffer->index even if b->memory == V4L2_MEMORY_USERPTR.
Is this a bug in the OMAP driver and videobuf-core, and an unnecessary assignment in capture-example? Or is the V4L2 spec out of touch/ out of date?
-Michael
MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
Hi Michael,
Quoted 9 lines · On Tuesday 14 June 2011 17:50:13 Michael Jones wrote:
In the V4L2 spec, the description for v4l2_buffer.index says "This field is only used for memory mapping I/O..."
However, in
v4l-utils/contrib/capture-example.c, even user-pointer buffers are indeed given a buf.index before being passed toVIDIOC_QBUF.
And at least in the OMAP ISP driver, this information is relied upon in
QBUF regardless of V4L2_MEMORY_MMAP/USERPTR. videobuf-core also usesv4l2_buffer->indexeven ifb->memory==V4L2_MEMORY_USERPTR.
Quoted 3 lines
Is this a bug in the OMAP driver and videobuf-core, and an unnecessary assignment in capture-example? Or is the V4L2 spec out of touch/ out of date?
The spec is out of date. The index field is used for userptr buffers as well.
Signature · 3 lines
Regards, Laurent Pinchart