How to check gstreamer changed state from READY to PAUSED i.e. [gstreamer] gstCamera end of pipeline using python api?

Hello All,

For reading live input stream we are using jetson.utils.videoSource python API.

input = jetson.utils.videoSource(’/dev/video2’, argv=sys.argv)
img = input.Capture()

But gstreamer pipeline get PAUSED and the program execution is getting stuck at img=input.capture() line in code.

We also applied this logic to check whether streaming is working or not using the below code snippet:

if input.IsStreaming():
img = input.Capture()

But input.IsStreaming() returns False when the streaming is open. Is this IsStreaming() function working properly?

So, How to check what is the state of the GStreamer pipeline and start the GStreamer pipeline again using python API?

Hi,
For checking state of a gstreamer pipeline, please refer to this post:
raspberry pi - Restarting GStreamer Pipeline in Python on EOS - Stack Overflow

If you would like to restart a pipeline, we suggest sendo EoS, switch to NULL state and re-initialize the pipeline. Please take a look at:
Nvoverlaysink ignores properties when pipeline is restarted - #6 by DaneLLL

1 Like