[Telepathy] gst.LinkError in Telepathy Farsight
Tiago Katcipis
katcipis at inf.ufsc.br
Fri Jun 17 14:51:38 PDT 2011
Hi,
On Fri, Jun 17, 2011 at 9:54 AM, Mystilleef <mystilleef at gmail.com> wrote:
> I'm getting the following error with tp-farsight
>
> =========================================================================
> Traceback (most recent call last):
> File "/home/lateef/teletest/MediaChannelStreamer.py", line 54, in
> __stream_created_cb
> src.get_pad("src").link(srcpad)
> gst.LinkError: <enum GST_PAD_LINK_WRONG_HIERARCHY of type GstPadLinkReturn>
>
I think this happens because you are trying to link two pads and the
elements that owns the pads are not inside the same pipeline (the same bin
to me more exact).
> =========================================================================
>
> The code in question:
>
> ========================================================================
> def __stream_created_cb(self, channel, stream):
> print "Start of stream created!"
> stream.connect("src-pad-added", self.__src_pad_added_cb)
> srcpad = stream.get_property ("sink-pad")
> from gst import element_factory_make, STATE_PLAYING
> src = element_factory_make("audiotestsrc")
> src.get_pad("src").link(srcpad)
> src.set_property("is-live", True)
> src.set_state(STATE_PLAYING)
> self.__pipeline.add(src)
>
here it seems to be the problem, self.__pipeline.add(src) and
src.set_state(STATE_PLAYING) should be called before you call
src.get_pad("src").link(srcpad). You can link pads of elements that belong
to the same pipeline (bin) and are on the same state.
> print "End of stream created!"
> return False
>
> def __src_pad_added_cb(self, stream, pad, codec):
> print "Start of __src_pad_added_cb"
> from gst import STATE_PLAYING, parse_bin_from_description
> sink = parse_bin_from_description("audioconvert !
> audioresample !
> audioconvert ! autoaudiosink", True)
> pad.link(sink.get_pad("sink"))
> sink.set_state(STATE_PLAYING)
> self.__pipeline.add(sink)
>
Same problem here.
> print "End of __src_pad_added_cb"
> return False
>
> def __session_created_cb(self, channel, conference, participant):
> print "Start of __session_created_cb"
> self.__pipeline.add(conference)
> from gst import STATE_PLAYING
> self.__pipeline.set_state(STATE_PLAYING)
> print "End of __session_created_cb"
> return False
>
>
> ====================================================================================
>
> I'm not a Gstreamer expert so I appreciate any help.
>
Hope this helps.
Best regards,
Tiago Katcipis
> _______________________________________________
> telepathy mailing list
> telepathy at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/telepathy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/telepathy/attachments/20110617/d89c2d77/attachment.htm>
More information about the telepathy
mailing list