tcpserversrc plugin received EOS message when client is fcomplete

Nicolas Dufresne nicolas at ndufresne.ca
Tue Dec 1 18:58:57 UTC 2020


Le mardi 01 décembre 2020 à 02:33 -0600, karimchtx a écrit :
> Hi,
> 
> I'm tryiing to prototype a basic client/server to stream voice over ethernet
> using gstreamer and python bindings.
> 
> On the server side, I wrote the following pipeline (running on linux)
> 
> /pipeline = Gst.parse_launch('tcpserversrc host=192.168.56.101 port=3000  !
> audioconvert ! audioresample ! mypluginsink')
> /
> 
> 
> 
> On the client side, a basic pipeline to stream from the microphone (running
> on w10):
> 
> /gst-launch-1.0 directsoundsrc ! audio/x-raw, endianness=1234, signed=true,
> width=16, depth=16, rate=44100, channels=1, format=S16LE ! audioconvert !
> tcpclientsink host=192.168.56.101 port=3000
> /
> 
> It works fine.
> As I launch the client, I have the following logs on the server:
> 
> /
> :00:00.042089283 18031      0x17592c0 DEBUG           tcpserversrc
> gsttcpserversrc.c:411:gst_tcp_server_src_start:<tcpserversrc0> IP address
> for host 192.168.56.101 is 192.168.56.101
> 0:00:00.042232221 18031      0x17592c0 DEBUG           tcpserversrc
> gsttcpserversrc.c:426:gst_tcp_server_src_start:<tcpserversrc0> opened
> receiving server socket
> 0:00:00.042244461 18031      0x17592c0 DEBUG           tcpserversrc
> gsttcpserversrc.c:429:gst_tcp_server_src_start:<tcpserversrc0> binding
> server socket to address
> 0:00:00.042258213 18031      0x17592c0 DEBUG           tcpserversrc
> gsttcpserversrc.c:435:gst_tcp_server_src_start:<tcpserversrc0> listening on
> server socket
> 0:00:00.042266942 18031      0x17592c0 DEBUG           tcpserversrc
> gsttcpserversrc.c:452:gst_tcp_server_src_start:<tcpserversrc0> listening on
> port 3000
> Entering main loop.
> 0:00:43.054073351 18031      0x1515a30 DEBUG           tcpserversrc
> gsttcpserversrc.c:197:gst_tcp_server_src_create:<tcpserversrc0> closing
> server socket/
> 
> 
> I can speak into the mic, and the server does the job.
> But as I quit the client program, I have the following logs on the server:
> 
> /0:01:28.784458656 18031      0x1515a30 DEBUG           tcpserversrc
> gsttcpserversrc.c:256:gst_tcp_server_src_create:<tcpserversrc0> Connection
> closed
> Received EOS-Event on bus, exiting/

tcpserversrc is a single stream server. As the following connection will offer a
completely new stream, you will have to flush the pipeline before being able to
accept new connections. The EOS message guaraties that you must flush (or reset)
your pipeline. Just don't exit you program on EOS and handle it accordingly.

A simple way to handle EOS in that case could be to simply cycble the pipeline
through NULL state and back into PLAYING.

> 
> 
> I don't understand why it received EOS message when the client closes its
> connection.
> Is there a way to tune the server pipeline so that it keeps on listening to
> the source address ?
> 
> Thanks.
> 
> Karim
> 
> 
> 
> 
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




More information about the gstreamer-devel mailing list