Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU) GPU
• DeepStream Version5.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) 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 is a blocking situation.
This is the code, gst_element_set_state (src_bin->bin,
GST_STATE_NULL) triggering a block.
gboolean
reset_source_pipeline (gpointer data)
{
NvDsSrcBin *src_bin = (NvDsSrcBin *) data;
GstState state, pending;
GstStateChangeReturn ret;
NVGSTDS_INFO_MSG_V ("1111111111111111111");
g_mutex_lock(&src_bin->bin_lock);
NVGSTDS_INFO_MSG_V ("1111111111111111111.5");
gettimeofday (&src_bin->last_buffer_time, NULL);
gettimeofday (&src_bin->last_reconnect_time, NULL);
NVGSTDS_INFO_MSG_V ("1111111111111111111.6");
g_mutex_unlock(&src_bin->bin_lock);
NVGSTDS_INFO_MSG_V ("2222222222222222");
if (gst_element_set_state (src_bin->bin,
GST_STATE_NULL) == GST_STATE_CHANGE_FAILURE) {
NVGSTDS_INFO_MSG_V ("22222222.5");
GST_ERROR_OBJECT (src_bin->bin, "Can't set source bin to NULL");
return FALSE;
}
NVGSTDS_INFO_MSG_V ("3333333333333333");
NVGSTDS_INFO_MSG_V ("Resetting source %d", src_bin->bin_id);
GST_CAT_INFO (NVDS_APP, "Reset source pipeline %s %p\n,", __func__, src_bin);
if (!gst_element_sync_state_with_parent (src_bin->bin)) {
GST_ERROR_OBJECT (src_bin->bin, "Couldn't sync state with parent");
}
ret = gst_element_get_state (src_bin->bin, &state, &pending, 0);
GST_CAT_DEBUG (NVDS_APP, "Bin %d %p: state:%s pending:%s ret:%s",
src_bin->bin_id, src_bin, gst_element_state_get_name(state),
gst_element_state_get_name(pending),
gst_element_state_change_return_get_name(ret));
if (ret == GST_STATE_CHANGE_ASYNC || ret == GST_STATE_CHANGE_NO_PREROLL) {
if (!src_bin->async_state_watch_running)
g_timeout_add (20, watch_source_async_state_change, src_bin);
src_bin->async_state_watch_running = TRUE;
src_bin->reconfiguring = TRUE;
} else if (ret == GST_STATE_CHANGE_SUCCESS && state == GST_STATE_PLAYING) {
src_bin->reconfiguring = FALSE;
}
return FALSE;
}