Hi,<br><br><div class="gmail_quote">On Fri, Jun 17, 2011 at 9:54 AM, Mystilleef <span dir="ltr"><<a href="mailto:mystilleef@gmail.com">mystilleef@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I'm getting the following error with tp-farsight<br>
<br>
=========================================================================<br>
Traceback (most recent call last):<br>
File "/home/lateef/teletest/MediaChannelStreamer.py", line 54, in<br>
__stream_created_cb<br>
src.get_pad("src").link(srcpad)<br>
gst.LinkError: <enum GST_PAD_LINK_WRONG_HIERARCHY of type GstPadLinkReturn><br></blockquote><div><br>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).<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
=========================================================================<br>
<br>
The code in question:<br>
<br>
========================================================================<br>
def __stream_created_cb(self, channel, stream):<br>
print "Start of stream created!"<br>
stream.connect("src-pad-added", self.__src_pad_added_cb)<br>
srcpad = stream.get_property ("sink-pad")<br>
from gst import element_factory_make, STATE_PLAYING<br>
src = element_factory_make("audiotestsrc")<br>
src.get_pad("src").link(srcpad)<br>
src.set_property("is-live", True)<br>
src.set_state(STATE_PLAYING)<br>
self.__pipeline.add(src)<br></blockquote><div><br>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.<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
print "End of stream created!"<br>
return False<br>
<br>
def __src_pad_added_cb(self, stream, pad, codec):<br>
print "Start of __src_pad_added_cb"<br>
from gst import STATE_PLAYING, parse_bin_from_description<br>
sink = parse_bin_from_description("audioconvert ! audioresample !<br>
audioconvert ! autoaudiosink", True)<br>
pad.link(sink.get_pad("sink"))<br>
sink.set_state(STATE_PLAYING)<br>
self.__pipeline.add(sink)<br></blockquote><div><br>Same problem here.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
print "End of __src_pad_added_cb"<br>
return False<br>
<br>
def __session_created_cb(self, channel, conference, participant):<br>
print "Start of __session_created_cb"<br>
self.__pipeline.add(conference)<br>
from gst import STATE_PLAYING<br>
self.__pipeline.set_state(STATE_PLAYING)<br>
print "End of __session_created_cb"<br>
return False<br>
<br>
====================================================================================<br>
<br>
I'm not a Gstreamer expert so I appreciate any help.<br></blockquote><div><br>Hope this helps.<br><br>Best regards,<br>Tiago Katcipis<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
_______________________________________________<br>
telepathy mailing list<br>
<a href="mailto:telepathy@lists.freedesktop.org">telepathy@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/telepathy" target="_blank">http://lists.freedesktop.org/mailman/listinfo/telepathy</a><br>
</blockquote></div><br>