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 451388 - [v4l2src] Could not negotiate format
[v4l2src] Could not negotiate format
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.6
Other All
: Normal normal
: 0.10.7
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 456040 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-06-26 20:53 UTC by Alexander Eichner
Modified: 2007-07-18 11:42 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
the described patch (4.90 KB, patch)
2007-06-26 20:55 UTC, Alexander Eichner
none Details | Review

Description Alexander Eichner 2007-06-26 20:53:39 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
Comment 1 Alexander Eichner 2007-06-26 20:54:56 UTC
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
Comment 2 Alexander Eichner 2007-06-26 20:55:35 UTC
Created attachment 90704 [details] [review]
the described patch
Comment 3 Jan Schmidt 2007-07-12 09:45:04 UTC
*** Bug 456040 has been marked as a duplicate of this bug. ***
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2007-07-18 11:42:46 UTC
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