I am developing an IP Streaming based media player. I am using the following pipelines:
Src:
gst-launch-1.0 -vvv udpsrc port=5004 ! application/x-rtp, payload=96 ! rtph2 64depay ! h264parse ! imxvpudec ! imxipuvideosink sync=false
Sink:
C:\gstreamer\1.0\x86_64\bin\gst-launch-1.0.exe -v filesrc location=C:\\gstreamer\\1.0\\x86_64\\bin\\hash.h264 ! h264parse ! rtph264pay ! udpsink host=153.77.205.139 port=5004 sync=true
This was the proof of concept. Now, We wanted to have an application which can perform the same operation but with a little tweak when there is no streaming or when no data from the sink, we need to switch to offline base media player, means play a set of videos offline and when there is data on udp port, switch to streaming.
Following are my queries:
Please help. I am ready to help you if you need more details
For udpsrc there is timeout property, which sends a message on bus if there is no data available (you can try setting it to 1 second), for streaming is complted you should get EOS on the bus again. (try this pipeline gst-launch-1.0 -vvvm udpsrc port=5004 timeout=100000000 ! application/x-rtp, payload=96 ! rtph2 64depay ! h264parse ! imxvpudec ! imxipuvideosink sync=false
)