gst-launch-1.0 rtspsrc location=rtsp://****** do-retransmission=false latency=0 drop-on-latency=true ! rtph264/5depay ! h264/5parse ! vah264/5dec ! vapostproc ! glimagesink
The pipeline is applied for H264/5 RTSP streaming. Dynamic pad is applied for rtspsrc to detect stream type dynamically. Two separate bins are created to include rtph264/5depay ! h264/5parse ! vah264/5dec ! vapostproc ! glimagesink and linked to rtspsrc dynamically. When cameras are switched, only location of rtspsrc is changed and the pipeline is not destroyed and recreated in the purpose of mitigating stack overflow and memory leak. The code works fine for cameras with the same format H264 or H265. However, video QML widget as sink freezes when cameras with different formats H264/5 are switched and bins are toggled to be linked to rtspsrc.
What has been tried:
- flushed the qml sink while the same qml sink is applied in both bins
- removed the previous bin from pipeline
What are the root causes for this problem? How to fix the problem?