How do I remove a stream at run time?

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) GPU
• DeepStream Version 5.1
• JetPack Version (valid for Jetson only)
• TensorRT Version 7.2
• NVIDIA GPU Driver Version (valid for GPU only) 440
• Issue Type( questions, new requirements, bugs) questions

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
I ues unlink_element_from_streammux_sink_pad() to do this, but it doesn’t always work.
Is there an official method to remove a stream?

Please refer to deepstream_reference_apps/runtime_source_add_delete at master · NVIDIA-AI-IOT/deepstream_reference_apps (

Thank you for your answer, but when I nested the stop_release_source into nvstreammux_eosmonitor_probe_func, it blocked

We don’t know anything about your code. Please try the sample app first. And you need to debug with your code.

It is better to upgrade to DeepStream 6.0 GA since there are some bug fixes which will improve nvstreammux dynamic link/unlink cases.

The upgrade will change too much of my code.
deepstream_sink_bin.c (28.3 KB)
I uploaded deepStream_source_bin.c.
Execute the command:./deepstream-test5-app -c configs/test5_config_file_src_infer.txt
Modified the nvStreammux_eosMonitor_probe_func function and create_multi_source_bin.
Other file changes are only their own business logic and do not involve pipeline

I upgraded to DeepStream 6.0. The problem still exists.

Add the stop_release_source of deepStream_reference_apps /runtime_source_add_delete to deepstream-source_bin will block .
Blocking position is:gst_element_release_request_pad (streammux, sinkpad);

Please upgrade to DeepStream 6.0 GA and have a try.