Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU) GPU
• DeepStream Version DeepStream SDK 5.0
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only) 11.3
I am trying to find a way to restart deepstream-app in a controlled manner. I know of file_loop property that you can set to 1 in the config file, but I would like to, for example, pause the pipeline and after some time start the next loop. Do you know which part of the code I should modify?
I have tried modifying the deepstream-spp.c code by adding the following snippet under EOS message event:
case GST_MESSAGE_EOS:{
/*
* In normal scenario, this would use g_main_loop_quit() to exit the
* loop and release the resources. Since this application might be
* running multiple pipelines through configuration files, it should wait
* till all pipelines are done.
*/
NVGSTDS_INFO_MSG_V ("Received EOS. Restarting ...\n");
gboolean ret = TRUE;
NvDsSrcParentBin *bin = &appCtx->pipeline.multi_src_bin;
NvDsSrcBin *subBin = &bin->sub_bins[0];
gst_element_set_state (subBin->bin, GST_STATE_PAUSED);
ret = gst_element_seek (subBin->bin, 1.0, GST_FORMAT_TIME,
(GstSeekFlags) (GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_FLUSH),
GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE);
if (!ret)
GST_WARNING ("Error in seeking pipeline");
gst_element_set_state (subBin->bin, GST_STATE_PLAYING);
/*
NVGSTDS_INFO_MSG_V ("Received EOS. Exiting ...\n");
appCtx->quit = TRUE;
return FALSE;
break;
*/
}
However, I get the following results:
Which means after restarting it doesn’t receive any frames, so I was wondering if you know what the problem is?
Thank you
Mahshid