GNOME Bugzilla – Bug 451388
[v4l2src] Could not negotiate format
Last modified: 2007-07-18 11:42:46 UTC
Please describe the problem: with gst-plugins-good version 0.10.6 the v4l2src is not working anymore with my Terratec Cinergy 600 TV card (saa7134). It aborts with:ERROR: Pipeline doesn't want to pause. ERROR: from element /pipeline0/v4l2src0: Could not negotiate format Steps to reproduce: 1. execute gst-launch-0.10 v4l2src ! xvimagesink 2. 3. Actual results: alexander@Alkesh:~$ gst-launch-0.10 v4l2src ! xvimagesink Setting pipeline to PAUSED ... (gst-launch-0.10:24488): GLib-GObject-WARNING **: IA__g_object_notify: object class `GstV4l2Src' has no property named `frequency' ERROR: Pipeline doesn't want to pause. ERROR: from element /pipeline0/v4l2src0: Could not negotiate format Additional debug info: gstbasesrc.c(2056): gst_base_src_start (): /pipeline0/v4l2src0: Check your filtered caps, if any Setting pipeline to NULL ... FREEING pipeline ... Expected results: A window should appear with the received TV signal in it Does this happen every time? yes Other information: it worked with gst-plguins-good version 0.10.5
The attached patch solves these issues for me. Description of the patch: 1. v4l2src->num_buffers is initialized with zero but the property has a minimum value of GST_V4L2_MIN_BUFFERS. If the queue-size is not changed by the application this would give an invalid argument error. The patch fixes this: v4l2src->num-buffers is initialized to GST_V4L2_MIN_BUFFERS 2. the first ioctl call in gst_v4l2src_probe_caps_for_format (v4l2src_calls.c) fails with a invalid argument error though VIDIOC_ENUM_FRAMESIZES is defined the actual patch undefines these. But maybe the return value should checked and if this is an error it should fallback to the old version? 3. The code for kernels < 2.6.19 in gst_v4l2src_probe_caps_for_format (v4l2src_calls.c) sets the property range from 1 to GST_V4L2_MAX_SIZE. The command ./gst-launch-0.10 v4l2src ! xvimagesink exits with an error because the maximum texture size from xvimagesink is chosen but in my case this is 2046x2046 and this is to big for the saa7134 driver. The patch checks the size with gst_v4l2src_get_size_limits
Created attachment 90704 [details] [review] the described patch
*** Bug 456040 has been marked as a duplicate of this bug. ***
I applied the changes with modifications. Thanks! 2007-07-18 Stefan Kost <ensonic@users.sf.net> Patch by: Alexander Eichner <alexeichi@yahoo.de> * sys/v4l2/gstv4l2src.c: (gst_v4l2src_init): Use define here. * sys/v4l2/gstv4l2tuner.c: (gst_v4l2_tuner_set_frequency_and_notify): Don't touch the property - its still disabled. * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_probe_caps_for_format), (gst_v4l2src_grab_frame), (gst_v4l2src_get_size_limits): * sys/v4l2/v4l2src_calls.h: Improve fallback format negotionation. Fixes #451388