RTSP Stream Does Not Reopen With External NTP After Pipeline is Set to Null
Describe your issue
Create a pipeline using playbin
and play an RTSP stream that has a NTP server in the refclk. Set the pipeline to null and then recreate the pipeline and try to open up the stream again. The stream does not open on 1.22.7 and 1.22.10. The stream opens again if you restart the application (reinitializing gstreamer). However the issue does not occur on 1.14.5.
Expected Behavior
After recreating the pipeline, the stream should play again.
Observed Behavior
After recreating the pipeline, the stream does not play again and crashes the application if you try and set it to null.
Setup
- Operating System: Android 12
- Device: Android Box with an RK3588 SoC
- Server GStreamer Version: 1.22.3 or 1.20.3
- Client GStreamer Version: 1.22.10
Steps to reproduce the bug
- Setup an NTP server like chronyd.
Server Side based off of RTSP net clock examples.
- Create an ntp clock client
ntp_clock = GstNet.NtpClock.new("ntp-clock", "ip", 123, 0)
- Create a
RTSPMediaFactory
- Set launch pipeline to play something. I used
"GST_DEBUG=3 ./test-netclock.out "uridecodebin uri=file://.../BBB-SYNC-4K-60-H264-FULL.mp4 ! queue ! videoconvert ! videorate ! video/x-raw,framerate=30/1 ! queue ! x264enc bitrate=4000 ! queue ! rtph264pay name=pay0 pt=96""
- factory.set_shared(True)
- factory.set_clock(ntp_clock)
- ... whatever else to get the RTSP server running.
- Open the RTSP stream using
gst-launch
andplaybin
. Keep this open!
Client Side
- Based off Android Gst examples
- Create a pipeline by openning the stream using
playbin uri=...
- Check the GStreamer logs for
refclk
and ensure this is not local and contains your NTP server information. If not, you need to make sure the first stream is open and then you open the client side. - Set the pipeline to null state.
- Unref the pipeline and set data->pipeline to NULL
- Recreate the pipeline, set the uri and set it to play.
How reproducible is the bug?
Always!
Solutions you have tried
- Recreating the g loop and then recreating the pipeline.
- Set the GStreamer version to 1.14.5 and the issue disappears.
Related non-duplicate issues
- May or may not be related to #3306 , but the NTP clock running in the background still happens in 1.14.5.
Additional Information
Edited by Tyler