Very new to gstreamer, need to reconnect source and keep alive tcp connection

Anonymousey spycrab101 at googlemail.com
Sun Apr 12 08:40:24 PDT 2015


Hi. I was wondering how I would go about reconnecting the stream when I
change channel at the source end while keeping the tcp connection alive.

here is my current pipeline :

gst-launch-1.0 -v souphttpsrc location="http://192.168.0.5:31344" !
decodebin name=demux demux. ! queue ! audioconvert dithering=0 !
"audio/x-raw" ! avenc_mp2 bitrate=128000 ! mux. mpegtsmux name=mux !
tcpserversink host=192.168.0.101 port=5000 demux. ! queue ! videoconvert !
omxh264enc target-bitrate=2036000 control-rate=variable !
"video/x-h264,profile=high" ! h264parse ! mux.

output :

//GstPipeline:pipeline0/GstTCPServerSink:tcpserversink0.GstPad:sink: caps =
video/mpegts, systemstream=(boolean)true, packetsize=(int)188,
streamheader=(buffer)<
47400030a600ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000b00d0001c100000001e020a2c32941,
474020308600ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0002b02d0001c10000e041f00c050448444d5688040ffffcfc1be041f00a050848444d56ff1b443f03e042f000f78f3e48
>
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock/

However once I change channel at the source end I get this output :

//GstPipeline:pipeline0/GstDecodeBin:demux/GstTSDemux:tsdemux0.GstPad:video_0201:
caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:demux/GstTSDemux:tsdemux0.GstPad:audio_0295:
caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:demux/GstTSDemux:tsdemux0.GstPad:audio_0281:
caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:demux/GstTSDemux:tsdemux0.GstPad:private_0241:
caps = NULL
Got EOS from element "pipeline0".
Execution ended after 0:02:48.378181041
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
/

With no connection to client obviously..

If I change my pipeline to and add "is-live"

gst-launch-1.0 -v souphttpsrc location="http://192.168.0.5:31344"
*is-live=true* ! decodebin name=demux demux. ! queue ! audioconvert
dithering=0 ! "audio/x-raw" ! avenc_mp2 bitrate=128000 ! mux. mpegtsmux
name=mux ! tcpserversink host=192.168.0.101 port=5000 demux. ! queue !
videoconvert ! omxh264enc target-bitrate=2036000 control-rate=variable !
"video/x-h264,profile=high" ! h264parse ! mux.

output ends in :

//GstPipeline:pipeline0/GstDecodeBin:demux/GstMultiQueue:multiqueue0:
max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:demux/GstMultiQueue:multiqueue0:
max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:demux/GstMultiQueue:multiqueue0:
max-size-bytes = 2097152
/GstPipeline:pipeline0/GstDecodeBin:demux/GstMultiQueue:multiqueue0:
max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:demux/GstMultiQueue:multiqueue0:
max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:demux/GstMultiQueue:multiqueue0:
max-size-bytes = 2097152
/GstPipeline:pipeline0/GstDecodeBin:demux/GstMultiQueue:multiqueue1:
max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:demux/GstMultiQueue:multiqueue1:
max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:demux/GstMultiQueue:multiqueue1:
max-size-bytes = 2097152
/GstPipeline:pipeline0/GstDecodeBin:demux/GstMultiQueue:multiqueue0:
max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:demux/GstMultiQueue:multiqueue0:
max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:demux/GstMultiQueue:multiqueue0:
max-size-bytes = 2097152/

With no connection to client.

Questions :

How do I respond to EOS events with a reconnection? while keeping the
connection alive.
Can I get the "is-live" command to work properly? So my stream does act live
a live source.

Thanks.





--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Very-new-to-gstreamer-need-to-reconnect-source-and-keep-alive-tcp-connection-tp4671539.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list