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 433442 - gst_element_link fails on playing elements in different bins.
gst_element_link fails on playing elements in different bins.
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal critical
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-04-25 21:32 UTC by Olivier Crête
Modified: 2007-04-26 16:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Olivier Crête 2007-04-25 21:32:34 UTC
I have a bin in a pipeline. With a src inside the bin and the sink outside.  If I try to link both with gst_element_link while the bin is playing, it doesn't work with 0.10.12 or CVS HEAD. It works fine with 0.10.11 and below.

I think its linked with the patch from bug #339326. Is linking running elements even supposed to work?

This small python script exhibits the problem:

import pygtk, gtk, gobject
import pygst
pygst.require("0.10")
import gst

def linkelem():
	src.link(sink)
	sink.set_state(gst.STATE_PLAYING)
	
gtk.gdk.threads_init()

pipeline = gst.Pipeline()
bin = gst.Bin()
src = gst.element_factory_make("videotestsrc")
sink = gst.element_factory_make("ximagesink");
pipeline.add(bin)
bin.add(src)
pipeline.add(sink)

# Works here
#linkelem()

pipeline.set_state(gst.STATE_PLAYING)

# breaks here
linkelem()

gtk.main()
Comment 1 Olivier Crête 2007-04-25 22:34:43 UTC
a pipeline.get_state(-1) is sometimes necessary after the set_state (otherwise there may be a race condition).
Comment 2 Dafydd Harries 2007-04-26 14:09:53 UTC
With libgst 0.10.12, I get the same behaviour even without the bin (works if linked before playing, doesn't if linked after playing).
Comment 3 Olivier Crête 2007-04-26 15:27:11 UTC
Arg, having unlinked sinks is BAD... sorry