[Bug 735660] v4l2: fix new v4l2 code not working with certain devices (regression)

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri Aug 29 12:43:25 PDT 2014


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

--- Comment #12 from Nicolas Dufresne <nicolas.dufresne at collabora.co.uk> 2014-08-29 19:43:23 UTC ---
> (In reply to comment #8)
> As I've already said in comment #3 before you even started registering your
> objections, it may be better to only try with 1 buffer if the request with 0
> buffers fails. And yes that code path should have a comment explaining this is
> a workaround for certain devices.
> 
> Or even better why do the probe if the device supports normal mmap buffers at
> all? AFAIK if the device claims V4L2_CAP_STREAMING it must at least support the
> standard mmap type buffers, so we can just assume that. We should probably
> double check this with Hans V.

He already stated that in theory even old videobuf base devices could have
CAP_STREAMING and USERPTR only, but said in practice, all the 18 affected
drivers support MMAP (very few will also do USERPTR).

So yes, I think this is a plan, and this will simply bring back the old
behavior, which is to assume that CAP_STREAM mean that MMAP is supported
without the need to alloc/free any buffers. Note also that we found that MFC
driver has this bug where you can only free buffers through REQBUFS(0), so to
reallocate you need to REQBUFS(0) -> REQBUFS(N). I blindly thought this was
normal initially, hence the code doing that. Harmless in general, but I'll try
and add comment so we remember this is also a hack.

(In reply to comment #10)
> Talking about this, I was a bit baffled by the s_fmt fallback path in
> get_nearest_size, do you know if any devices which actually need that ? AFAIK
> ALL drivers should support try_fmt just fine.

About this one, we blindly removed it in 1.4 if I remember correctly, as it was
causing important performance issue. Might be a bit rough, but I think remove
some hack when they cause issues is the only way to progress and get new stuff
in. Thanks for reporting btw.

-- 
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