[Bug 670257] [v4l2src] fails to renegotiate from ready to paused

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Jun 20 13:48:28 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=670257
  GStreamer | gst-plugins-good | git

--- Comment #16 from Youness Alaoui <youness.alaoui at collabora.co.uk> 2012-06-20 20:48:24 UTC ---
Thanks Robert, good find! The bug is not in uvc, it's in v4l2src.
The uvc_queue_allocated only checks if the queue->count is != 0. The
queue->count is set with the VIDIOC_REQBUFS ioctl, which itself is called when
the gst_v4l2_bufferpool is created :
v4l2 gstv4l2bufferpool.c:350:gst_v4l2_buffer_pool_new:<src> STREAMING,
requesting 2 MMAP buffers
And when we go to READY, the buffer pool is destroyed :
v4l2 gstv4l2bufferpool.c:447:gst_v4l2_buffer_pool_destroy:<src> destroy pool

So when we do the set_format, the driver finds that there are no buffers
allocated, so it returns that error...

The issue though is that v4l2src does the set_format *then* it creates the
buffers. that's why it fails. I think the driver starts with a pre-initialized
buffer, the set-format works, then new buffers get created. When we go to
ready, those buffes are destroyed, and the uvc driver has 0 buffers left in the
queue, so when we try to set format, it fails.

The issue is that if I try to make it allocate the buffers before setting the
format, v4l2src will complain that we shouldn't have buffers allocated when
trying to set the format...
since i'm not too familiar with v4l2, I don't really know what should be done
here.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list