• Hardware Platform (Jetson / GPU)
Jetson
• DeepStream Version
5.0
• JetPack Version (valid for Jetson only)
4.4
• TensorRT Version
7.1
• Issue Type( questions, new requirements, bugs)
Questions, possible bug
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
This issue seems to be identical to Deadlock in gst_element_release_request_pad with nvstreammux, which has been fixed, according to the Issue.
I’m running into the same problem with dynamic source removal, using the code from the deepstream_reference_apps/runtime_source_add_delete at master · NVIDIA-AI-IOT/deepstream_reference_apps · GitHub.
The difference In my application is that I’m using RTSP sources, instead of URI sources.
First, the solution works properly as long as the first source added successfully connects. I can then add and remove additional sources without any problems.
However, if the first source fails to connect due to a socket timeout, unlinking the source and releasing the requested sink pad will result in deadlock.
I’m able to use the following code snippet, from your example in my application
static void
stop_release_source (gint source_id)
{
GstStateChangeReturn state_return;
gchar pad_name[16];
GstPad *sinkpad = NULL;
state_return =
gst_element_set_state (g_source_bin_list[source_id], GST_STATE_NULL);
switch (state_return) {
case GST_STATE_CHANGE_SUCCESS:
g_print ("STATE CHANGE SUCCESS\n\n");
g_snprintf (pad_name, 15, "sink_%u", source_id);
sinkpad = gst_element_get_static_pad (streammux, pad_name);
gst_pad_send_event (sinkpad, gst_event_new_flush_stop (FALSE));
gst_element_release_request_pad (streammux, sinkpad);
g_print ("STATE CHANGE SUCCESS %p\n\n", sinkpad);
gst_object_unref (sinkpad);
gst_bin_remove (GST_BIN (pipeline), g_source_bin_list[source_id]);
source_id--;
g_num_sources--;
break;
with deadlock occurring at
gst_element_release_request_pad (streammux, sinkpad);
Is something additional required to make the above work on a failed connection?
Thanks
Robert