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 363795 - Impossible to reset a pad to "unnegotiated" from Python
Impossible to reset a pad to "unnegotiated" from Python
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-python
git master
Other All
: Normal enhancement
: 0.10.8
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-10-20 23:54 UTC by René Stadler
Modified: 2007-02-04 10:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Allow passing "None" to GstPad.set_caps (862 bytes, patch)
2006-10-20 23:56 UTC, René Stadler
committed Details | Review

Description René Stadler 2006-10-20 23:54:28 UTC
From the documentation of gst_pad_set_caps (pad, caps):
"It is possible to set NULL caps, which will make the pad unnegotiated again."

It seems to be impossible to do this from Python:
>>> import pygst; pygst.require ("0.10"); import gst
>>> pad = gst.element_factory_make ("fakesink").get_pad ("sink")
>>> pad.set_caps (None)
Traceback (most recent call last):
  • File "<stdin>", line 1 in ?
TypeError: could not convert to GstCaps

Attaching a patch that allows for that.
Comment 1 René Stadler 2006-10-20 23:56:01 UTC
Created attachment 75111 [details] [review]
Allow passing "None" to GstPad.set_caps
Comment 2 Edward Hervey 2007-02-04 10:55:04 UTC
2007-02-04  Rene Stadler  <mail@renestadler.de>

	reviewed by: Edward Hervey  <edward@fluendo.com>

	* gst/gstpad.override:
	Allow removing the negotiated pads of a cap by setting them to None.
	* testsuite/test_pad.py:
	Added un-negotian of pads' caps to test above patch.
	Fixes #363795