Stop code based on GStreamer signal status

I’m developing on Jetson, I can’t share the gstreamer code here because it’s too long, my problem is to stop and continue the code, depending on the signal from the camera.
If the camera is not connected, I want to stop the code, and when the camera is connected, I want the code to continue again.
I am developing on C++.
What headings would you recommend I look under?
What is the example code of GStreamer about this topic?
I would be very grateful if you could help me how to follow the method.
I wish you the best of luck…

Hi,
We would suggest destroy the gstreamer pipeline when the camera is disconnected. And re-initialize the pipeline the the camera is connected. If the source is nvarguscamerasrc plugin, please refer to the samples:
GStreamer freeze when using qtmux and NVIDIA-accelerated h264/h265 encoding - #7 by DaneLLL
GStreamer C++ nvarguscamerasrc - #5 by DaneLLL

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