Enabling a Pause/Play feature for the DeepStream Pipeline using an external GPIO signal

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU): Jetson AGX ORIN DevKit
• DeepStream Version: 6.1
• Issue Type( questions, new requirements, bugs): Question
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description) I am using this samples from this repo deepstream_python_apps/apps/deepstream-test1-usbcam at master · NVIDIA-AI-IOT/deepstream_python_apps · GitHub


Hello everyone,
I am trying to enable a Pause/Play feature on the Deepstream-test1-usbcam sample script for a low power use case. So far, I have managed to have it functional using a Gtk.Switch by reworking the app and integrating the Deepstream pipeline through a GTK Loop instead of the default GLib.MainLoop. An important thing to mention is that I am using the exact same pipeline. I noticed that I am able to change the state of the Pipeline (PAUSED to PLAYING and vice versa) by pressing the switch manually (using a mouse click). In contrast, when I try to change the Gtk.switch state from a process created outside the Gtk Thread, we notice that the Gtk.Switch state is changing but the Gst Pipeline state is not and we are getting an error message “Unable to set device in gst_nvstreammux_change_state” , the Pipeline GstState keeps in PLAYING State continuously. I suppose it is important to mention that the sink is configured to set the plugin property sync to false. For the nvstreammux element, we are setting the plugin property gpu-id to 0. Do you have any idea what could be causing that behavior ?
Otherwise, do you have in mind any other suggestion to enable Pausing and Playing the pipeline based on an external GPIO signal retrieved on Polling using a Parallel process send this True/False flag through a Queue.

I can provide further details to help understand the question if needed. Thank you,

I think you are talking about a SW issue, so what is the software API of the switch(mouse click is not a SW API)?

DeepStream is based on GStreamer(which is based on glib), the state controlling thread should be different to the pipeline main thread(GLib.MainLoop thread). Please refer to GStreamer. Quickstart Guide — DeepStream 6.0 Release documentation (gstreamer.freedesktop.org). And please refer to python resources for how to created new thread with python.

There is no update from you for a period, assuming this is not an issue anymore.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

This is DeepStream forum, your request is out of DeepStream scope. Please google python resources.

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