bus_call() is a callback, it is not recommended to do pipeline change in this callback.
For how to remove source, we have a sample. Runtime source addition/removal with DeepStream, DeepStream Reference Application on GitHub — DeepStream 6.1.1 Release documentation → deepstream_reference_apps/runtime_source_add_delete at master · NVIDIA-AI-IOT/deepstream_reference_apps · GitHub