GNOME Bugzilla – Bug 740403
v4l2object: reuse caps framerate if not overwritten by v4l2 device
Last modified: 2015-01-23 00:08:17 UTC
Created attachment 291057 [details] [review] [PATCH] v4l2object: reuse caps framerate if not overwritten by v4l2 device This patch enables gstreamer buffer duration setting when using v4l2src on freescale i.mx6 (which enables correct mp4mux muxing after encoding). Maybe this is to much a workaround and the right thing to do would be to fix the vl42 kernel driver to fill in the numerator/denominator values...
I take note of this patch. Clearly we need to change something as I don't see any protection against denominator 0 (division by zero). I think the kernel behaviour is wrong, but I'll need to prove it from the spec. At least in that situation we so S_PARMS worked, it's just weird that the driver is taking this extra time to clear the structure.
Created attachment 292413 [details] [PATCH] v4l2object: Always set format Right now we try to be clever by detecting if device format have changed or not, and skip setting format in this case. This is valid behaviour with V4L2, but it's also very error prone. The rational for not setting these all the time is for speed, though I can't measure any noticeable gain on any HW I own. Also, until recently, we where doing get/set on the format for each format we where probing, making it near to impossible that the format would match. This also fixes bug where we where skipping frame-rate setting if format didn't change. https://bugzilla.gnome.org/show_bug.cgi?id=740403 --- sys/v4l2/gstv4l2object.c | 70 +----------------------------------------------- 1 file changed, 1 insertion(+), 69 deletions(-)
Here's my response to that. I'm would appreciate some input (at least making sure it fixes the issue you are seeing). The context is that until recently, we had terrible hack that would get/set format while probing. This was actually leading toward format changing all the time. Clearly that had drastic performance issue, since getting/setting format thousands of times can take time. Though there is no measurable rational for avoiding a single format set, and this code has been the source of bugs for a long time. So I think we should just strip it up, and always set the format and the framerate.
I'm sorry, this was the wrong bug, similar name. Ignore comment 2 and 3
Review of attachment 291057 [details] [review]: Re-read this one, and I think it's a fair workaround.
Comment on attachment 291057 [details] [review] [PATCH] v4l2object: reuse caps framerate if not overwritten by v4l2 device Merged in git master: commit c88e042458cf8f612ccb8680c9305eb287fdc2cd Author: Peter Seiderer <ps.report@gmx.net> Date: Fri Nov 14 12:59:31 2014 +0100 v4l2object: reuse caps framerate if not overwritten by v4l2 device Enables duration setting in v4l2src. https://bugzilla.gnome.org/show_bug.cgi?id=740403