fdsrc from python socket ?

Adrien Aubourg adrien.aubourg at gmail.com
Sat Mar 29 10:56:34 PDT 2014


Heya !

Prior to the brand new version of Python which include the new asyncio
module, I wanted to play a bit around a server/client streaming
architecture using multifdsink and fdsrc.

If I use udpsink/udpsrc and tcpsink/tcpsrc, streamings work as expected.
But if I use created socket (TCP connection) from Python asyncio module (or
just with the Python socket module), I can't make it work anymore:

The sender sends gstreamer buffer to multifdsink. By looking at the client
socket, I can see the buffer flowing. By putting a filesink just behing the
fdsrc, the dump is not null. But once I put any element behind the fdsrc
(like an encoder for instance), the filesink is null.

I read this blog entry [1], and I'm pretty sure that the file descriptor is
not freed, I still keep a reference to it. The author use gdppay/gdpdepay
around the socket sink/src element. I did that and there were no buffer
from gdpdepay (filesink file is empty, but it's not if I put it right after
the fdsrc).

Python scripts are attached (Python3.4 only !).

Thank you very much !
Adrien

[1] http://base-art.net/Articles/107/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140329/0eff13d4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: client.py
Type: text/x-python
Size: 1595 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140329/0eff13d4/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: server.py
Type: text/x-python
Size: 1741 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140329/0eff13d4/attachment-0001.py>


More information about the gstreamer-devel mailing list