<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Comments on article "Python, sockets, GStreamer and the Garbage collector"</title>
<link>http://base-art.net/Articles/107/</link>
<description>&lt;p&gt;Long time no blog, eh? Anyway I was today hooking up &lt;a class="reference" href="http://telepathy.freedesktop.org"&gt;Telepathy&lt;/a&gt;
Stream Tubes with &lt;a class="reference" href="http://gstreamer.org"&gt;GStreamer&lt;/a&gt; so that I could stream video over
local-xmpp, go figure why... :)&lt;/p&gt;
&lt;p&gt;Everything was fine:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p class="first"&gt;on one side, offer a stream tube in a multi-user room and setup
a pipeline like this one:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
videotestsrc ! gdppay ! multifdsink
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;on client side, join the room and accept the tube, hooked into
the following pipeline with a socket:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
fdsrc ! gdpdepay ! xvimagesink
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;when server is notified of new client, add its socket fd in
multifdsink and start playback&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But it wasn't working, multifdsink was removing the fd by itself
from the list and client wasn't receiving data. I spent some time
this afternoon trying to figure out why and thought I might share
the solution, if it can serve to anyone using multifdsink in
Python. Because I wasn't keeping references of the client socket
instances in my code, they were garbage-collected by Python, so
the fd was becoming invalid, hence the rejection by multifdsink.&lt;/p&gt;
&lt;p&gt;Keeping a list of the socket instances and cleaning it up when
the sink emits the client-removed signal does the trick and I got
my video streaming over local-xmpp working. Those Tubes are so
much fun, thanks Collabora &amp;amp; Telepathy folks for this nice stuff!&lt;/p&gt;
</description>
<language>en</language>
<copyright>The contents of this blog are available for non-commercial use only.</copyright>
<generator>Alinea http://pythonfr.org/alinea/</generator>


<item>
<title>phil on Python, sockets, GStreamer and the Garbage collector</title>
<link>http://base-art.net/Comments/275/</link>
<guid isPermaLink="true">http://base-art.net/Comments/275/</guid>
<description><![CDATA[
&lt;p&gt;&lt;a class="reference" href="http://gist.github.com/117247"&gt;http://gist.github.com/117247&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You'll need Coherence trunk too: &lt;a class="reference" href="http://coherence.beebits.net/"&gt;http://coherence.beebits.net/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately this strategy doesn't work on Jabber because the Telepathy Gabble manager handles stream tubes as in-bound connections. So I started looking at how I could use Farsight Stream Engine to achieve video streaming over Jabber ;)&lt;/p&gt;

]]></description>
<dc:creator>phil</dc:creator>
<dc:date>2009-05-24T20:40:03Z</dc:date>
</item>

<item>
<title>wiflye81 on Python, sockets, GStreamer and the Garbage collector</title>
<link>http://base-art.net/Comments/274/</link>
<guid isPermaLink="true">http://base-art.net/Comments/274/</guid>
<description><![CDATA[
&lt;p&gt;It's great and seem simple at the same time, can  we have a little sample ?&lt;/p&gt;

]]></description>
<dc:creator>wiflye81</dc:creator>
<dc:date>2009-05-24T20:05:03Z</dc:date>
</item>


</channel>
</rss>