[Telepathy] gst.LinkError in Telepathy Farsight
Olivier Crête
olivier.crete at collabora.com
Fri Jun 17 15:41:03 PDT 2011
You want to do it in this order:
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.set_property("is-live", True)
self.__pipeline.add(src)
src.get_pad("src").link(srcpad)
src.set_state(STATE_PLAYING)
On Fri, 2011-06-17 at 18:35 -0400, Mystilleef wrote:
> 2011/6/17 Olivier Crête <olivier.crete at collabora.com>:
> > Hi,
> >
> > On Fri, 2011-06-17 at 18:04 -0400, Mystilleef wrote:
> >> On Fri, Jun 17, 2011 at 5:51 PM, Tiago Katcipis <katcipis at inf.ufsc.br> wrote:
> >> >> ========================================================================
> >> >> 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.
> >>
> >> I think you're right. I also had to set "STATE_PLAYING" in an idle handler.
> >
> > You don't have to change the state in a idle handler, it should matter.
> >
>
> It crashes with the following error if I don't put it in an idle handler
>
> ===================================================================================================
> (run:14061): GStreamer-CRITICAL **:
> Trying to dispose element autoaudiosrc0, but it is in PLAYING instead
> of the NULL state.
> You need to explicitly set elements to the NULL state before
> dropping the final reference, to allow them to clean up.
> This problem may also be caused by a refcounting bug in the
> application or some element.
>
> (run:14061): tp-fs-DEBUG: stream 0 0xa25b020 (audio)
> _tf_stream_bus_message: Codecs changed
> (run:14061): tp-fs-DEBUG: stream 0 0xa25b020 (audio)
> _tf_stream_try_sending_codecs: called (send_local:0 send_supported:0)
> (run:14061): tp-fs-DEBUG: stream 0 0xa25b020 (audio)
> _tf_stream_try_sending_codecs: 0: audio PCMU clock:8000 channels:0
> (run:14061): tp-fs-DEBUG: stream 0 0xa25b020 (audio)
> _tf_stream_try_sending_codecs: 101: audio telephone-event clock:8000
> channels:0 events=0-15
> (run:14061): tp-fs-DEBUG: stream 0 0xa25b020 (audio)
> _tf_stream_bus_message: Send codec changed: 0: audio PCMU clock:8000
> channels:0 params:(nil)
> fish: Job 1, “./run ” terminated by signal SIGSEGV (Address boundary error)
> ==========================================================================================
--
Olivier Crête
olivier.crete at collabora.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/telepathy/attachments/20110617/62a169c0/attachment.pgp>
More information about the telepathy
mailing list