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 471823 - [v4l2src] Fails to negotiate capabilities with Macbook Pro isight
[v4l2src] Fails to negotiate capabilities with Macbook Pro isight
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.7
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 475424 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-08-30 13:02 UTC by Matthew Garrett
Modified: 2007-09-11 14:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Working code with GST_CAPS:5,GST_NEGOTIATION:5 (308.43 KB, text/plain)
2007-08-30 13:28 UTC, Matthew Garrett
  Details
Broken code with GST_CAPS:5,GST_NEGOTIATION:5 (173.98 KB, text/plain)
2007-08-30 13:31 UTC, Matthew Garrett
  Details
Patch against cvs head to fix fraction init (709 bytes, patch)
2007-09-07 15:43 UTC, Matthew Garrett
committed Details | Review

Description Matthew Garrett 2007-08-30 13:02:09 UTC
Running 

gst-launch-0.10 v4l2src ! video/x-raw-yuv,format=\(fourcc\)UYVY,width=320,height=240 ! ffmpegcolorspace ! ximagesink

gives me a failure to negotiate capabilities error. Reverting 

http://webcvs.freedesktop.org/gstreamer/gst-plugins-good/sys/v4l2/gstv4l2src.c?r1=1.80&r2=1.81

makes it work again. Restoring the old code path to gst_v4l2src_get_caps is sufficient, so I'm assuming that there's some breakage in how the caps are set up. I'm using the driver from http://files.i-nz.net/projects/linux-kernel/isight/uvcvideo-isight.tar.gz - I'll try to dump the caps from the two versions now.
Comment 1 Matthew Garrett 2007-08-30 13:28:39 UTC
Created attachment 94631 [details]
Working code with GST_CAPS:5,GST_NEGOTIATION:5
Comment 2 Matthew Garrett 2007-08-30 13:31:39 UTC
Created attachment 94634 [details]
Broken code with GST_CAPS:5,GST_NEGOTIATION:5
Comment 3 Wim Taymans 2007-09-05 00:17:31 UTC
Seem like the framerate discovery code failed to find a framerate and ended up with an empty list of rates. I see two possible causes: broken driver or min/max framerates reported by the driver were equal. Does this patch commited to CVS fix it for you?

        * sys/v4l2/v4l2src_calls.c:
        (gst_v4l2src_probe_caps_for_format_and_size):
        Add some more debugging in the framerate function.
        Iterate stepwise framerate up to and _including_ the max and if nothing
        was added to the list, add a dummy 0/1 to 100/1 framerate so that we
        don't end up with an empty list.

http://webcvs.freedesktop.org/gstreamer/gst-plugins-good/sys/v4l2/v4l2src_calls.c?r1=1.63&r2=1.64

If it still fails can you reopen and attach a log with GST_DEBUG=*v4l2*:5 ?
Comment 4 Tim-Philipp Müller 2007-09-05 11:20:15 UTC
Not directly related to the problem reported, just thought I'd mention it since it's iSight-related: v4l2src works great for me now (Macbook Pro 3rd generation, gutsy kernel/drivers), but then it seems like it was only ever really broken for me with the v4l2src from the 0.10.6 -good release, and the error I get with that was different too (namely: Could not get buffers from device "/dev/video0").  That is with the drivers and driver versions as they ship in gutsy though, which might be different from the versions Matthew is using.
Comment 5 Matthew Garrett 2007-09-07 15:43:16 UTC
Wim,

I need the following patch, but otherwise it works fine. Simple thinko in merging?
Comment 6 Matthew Garrett 2007-09-07 15:43:58 UTC
Created attachment 95138 [details] [review]
Patch against cvs head to fix fraction init
Comment 7 Wim Taymans 2007-09-07 16:04:39 UTC
Seems like it has always been wrong.. commited your patch to CVS now. Thanks for testing.
Comment 8 Wim Taymans 2007-09-11 14:42:42 UTC
*** Bug 475424 has been marked as a duplicate of this bug. ***