After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 663580 - v4l2src negotiation failure with weird pixel-aspect-ratios
v4l2src negotiation failure with weird pixel-aspect-ratios
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-11-07 18:51 UTC by Sjoerd Simons
Modified: 2011-11-14 12:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.48 KB, patch)
2011-11-07 18:51 UTC, Sjoerd Simons
committed Details | Review

Description Sjoerd Simons 2011-11-07 18:51:16 UTC
Created attachment 200912 [details] [review]
proposed patch

The following pipeline fails:

gst-launch-0.10 v4l2src ! video/x-raw-yuv,width=320,height=240,pixel-aspect-ratio=[1/2147483647, 2147483647/1 ]  ! xvimagesink

v4l2src tries to fixate the pixel-aspect-ratio to 1/2147483647, which xvimagesink is rightfully unhappy with. 

v4l2src doesn't support any non-square pixel-aspect-ratios (or at least determining this is the case), so it should exposes 1/1 in its caps
Comment 1 Olivier Crête 2011-11-07 20:03:01 UTC
v4l2 actually has an API for non-square pixels. See the VIDIOC_CROPCAP ioctl, especially the pixelaspect member of struct v4l2_cropcap. That said, the UVC driver doesn't properly expose it (even though the UVC spec also exposes the pixel aspect ratio).
Comment 2 Sjoerd Simons 2011-11-08 10:38:18 UTC
Yes, a more complete fix was to add support for that. But as it it's not supported i opted for doing the simple fix now and stop my pipelines from exploding ;)
Comment 3 Raul Gutierrez Segales 2011-11-11 21:11:28 UTC
The patch fixed the problem for me.
Comment 4 Sjoerd Simons 2011-11-14 10:45:08 UTC
Discussed with Wim, seems the best solution for now (until we get the info from v4l)

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 5 Tim-Philipp Müller 2011-11-14 12:40:37 UTC
commit e7ae593993af5dcc4b7c46dee25aae23c63864ce
Author: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Date:   Mon Nov 7 18:43:26 2011 +0000

    v4l2: Set pixel-aspect-ratio to 1/1
    
    We don't currently support setting the pixel-aspect-ratio from V4L2. So
    simply set it to be 1/1 in the caps to prevent negotiation failures when
    fixating to weird values (e.g. when the downstream caps has
    pixel-aspect-ratio = [ MIN, MAX ] )
    
    https://bugzilla.gnome.org/show_bug.cgi?id=663580