Problem when trying to pause and resume deepstream-app process in Python?

• Hardware Platform (Jetson / GPU): Jetson
• DeepStream Version: 5.1
• JetPack Version (valid for Jetson only): 4.5.1
• Issue Type( questions, new requirements, bugs): Question

I´m executing deepstream-app process using a Python module called “subprocess” (with Popen() function). I tried to pause and resume the process using next lines of code:

os.kill(deepstream_pid, signal.SIGSTOP)
os.kill(deepstream_pid, signal.SIGCONT)

The process seems to have been paused properly but it doesn´t continue when resuming. Furthermore, I´m using CSI camera as source0 in Deepstream configuration file and when trying to resume the process the error I get is related to the source element:

ERROR from src_elem: TIMEOUT
Debug info: Argus Error Status
ERROR from src_elem: Internal data stream error.
Debug info: gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin0/GstNvArgusCameraSrc:src_elem:
streaming stopped, reason error (-5)

Do you know why is this happening or if is there another working way to do it?

Thanks in advance.

What app are you using?

Are you referring to which app of deepstream?
If yes, I´m using deepstream-app. I´m executing a command like this:
deepstream-app -c <path_to_config_file>

But instead of executing it in terminal, I´m using python module called “subprocess”.

deepstream-app does not support stopping with STOP SIGNAL.

Oh ok, I didn´t know that. Thank you for your response.

And is there another way to do it?

deepstream-test5 supports pause, resume and quit app by keyboard. Please check the source code.