How to restart deepstream-app?

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:
image

Which means after restarting it doesn’t receive any frames, so I was wondering if you know what the problem is?

Thank you
Mahshid

When you PAUSE, you need to RESUME but not restart. Please learn basic gstreamer knowledge and coding skills first. Overview (gstreamer.freedesktop.org)

Thanks for the genius idea! but when I say start the next loop I mean resuming the pipeline …
BTW, for those who have the same problem, I solved the problem by resetting the src bin.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.