[gst-devel] TCP networking help.

Wim Taymans wim at fluendo.com
Wed Dec 7 12:04:02 CET 2005


On Wed, 2005-12-07 at 11:28 -0800, Savage, ShaunX V wrote:

Howdy,

tcpserversink is constructed in such a way that when you set it to
PLAYING, it will start sending to all connected clients, if nothing is
connected, all data gets lost.

You can't really use gst-launch to use this element the way you want to
use it since it will automatically set the pipeline to PLAYING, even
before you have a chance to connect anything to it in the PAUSED state.

the other way around works though, starting the receiver first, then
starting the sender:

  gst-launch -v tcpserversrc ! fakesink

and then

  gst-launch filesrc location=.... ! tcpclientsink

Hope this helps,
Wim
 

> Hi All
> 
>  
> 
> Time for bleeding edge help.  My goal is to connect one (or more)
> clients to a server using tcpserversink and tcpclientsource.
> 
>  
> 
> What I think I want to do.  I am writing it in C but I will use
> commandline notations.
> 
> On the server side have a pipeline of “filesrc !  tcpserversink”  I
> set the location on filesrc and I add a (client_added) signal handler
> on tcpserversink.
> 
>  
> 
> If the pipeline is paused , nothing, when set to running
> 
>  
> 
>  Setting to PLAYING
> 
> DEBUG (0x8ff40a8 - 0:00:00.371545000)        tcpserversink(15845)
> gsttcpserversink.c(262):gst_tcp_server_sink_init_send:<server-sink>
> opened sending server socket with fd 17
> 
> DEBUG (0x8ff40a8 - 0:00:00.371694000)        tcpserversink(15845)
> gsttcpserversink.c(290):gst_tcp_server_sink_init_send:<server-sink>
> binding server socket to address
> 
> DEBUG (0x8ff40a8 - 0:00:00.371859000)        tcpserversink(15845)
> gsttcpserversink.c(310):gst_tcp_server_sink_init_send:<server-sink>
> listening on server socket 17 with queue of 5
> 
> DEBUG (0x8ff40a8 - 0:00:00.372002000)        tcpserversink(15845)
> gsttcpserversink.c(319):gst_tcp_server_sink_init_send:<server-sink>
> listened on server socket 17, returning from connection setup
> 
> Running
> 
> End-of-stream
> 
> Returned, stopping playback
> 
> Deleting pipeline
> 
>  
> 
> The pipeline does not wait so there is no time for clients to
> connect. 
> 
>  
> 
> How do you setup a listen socket on a server?
> 
> What am I missing??  
> 
> 
-- 
Wim Taymans <wim at fluendo.com>





More information about the gstreamer-devel mailing list