[gst-devel] TCP networking help.

Shaun Savage savages at tvlinux.org
Thu Dec 8 06:27:04 CET 2005


Thomas Vander Stichele wrote:

>On Wed, 2005-12-07 at 11:28 -0800, Savage, ShaunX V wrote:
>  
>
>>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. 
>>    
>>
>
>You have no synchronization in your pipeline at all.  So the pipeline
>will play as fast as it can, consuming 100% cpu until it reaches EOS.
>In this mode, you probably aren't starting up the client pipeline fast
>enough :)
>
>You could do a bunch of things:
>
>a) put in an element in between that "knows" what sort of data it is so
>that it can timestamp the data correctly
>  
>
Which element would do that?
I am testing with .ogg and then I will move to mpeg4 in avi file, then 
theora.

>b) use identity and the datarate property to limit the rate of data
>  
>
I think I understand this one.

>c) use tcpserversrc on the consumer pipeline, which will block until it
>receives data, then start up the serving pipeline with tcpclientsink.
>This configuration will in fact block until the sending side starts.
>
>  
>
Is there away to throttle  the TCP stream using windowing or ack from 
the client side? or do I have to create my own handshaking protocol.


On the client side .

tcpclientsrc -> queue -> [ decoder ] -> audioconvert -> alsasink
or
tcpclientsrc -> queue -> demux -> { video -> queue -> decode -> play
                                                  -> { audio -> queue -> 
decode -> play

>hope that helps,
>Thomas
>
>
>
>  
>
>> 
>>
>>How do you setup a listen socket on a server?
>>
>>What am I missing??  
>>
>>
>>    
>>
>
>Dave/Dina : future TV today ! - http://www.davedina.org/
><-*- thomas (dot) apestaart (dot) org -*->
>Are you happy where you're sleeping ?
>Does he keep you safe and warm ?
>Does he tell you when you're sorry ?
>Does he tell you when you're wrong ?
><-*- thomas (at) apestaart (dot) org -*->
>URGent, best radio on the net - 24/7 ! - http://urgent.fm/
>
>
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
>for problems?  Stop!  Download the new AJAX search engine that makes
>searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
>http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
>_______________________________________________
>gstreamer-devel mailing list
>gstreamer-devel at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>  
>





More information about the gstreamer-devel mailing list