How to notice is disconnected my camera on my jetson tx2 board with use gstreamer?

Hi, I have a camera modul and a jetson tx2 board. I use the Gstreamer C++ code for video stream, video record and image processing.
I want to notice is disconnected my camera on my jetson board with gstreamer. I have searched some gstreamer subtopics. Than I have encountered topic Gstreamer EOS message handling and Gstreamer Bus. I have examined these topic code but I could not understand that how to work gstreamer bus and message system.

How do I detect camera disconnection on my Jetson cards with gstreamer message?

Hi,
If you use nvaguscamerasrc plugin, there is event handler in the code. Please check if there is message sending from low-level driver to application level when the camera is disconnected.

And do you use latest Jetpack 4.6.2(r32.7.2)?

Jetpack 4.4
I don’t use nvaguscamerasrc in my pipe, I use v4l2src

Hi,
The v4l2src plugin is a native plugin. Not sure if it has error handling for the case. If you run a simple command v4l2src ! fakesink and the camera is disconnected, does the command stops running?

nvarguscamersrc plugin is for Bayer camera sensor and cannot be applied to this use-case.

No, commend did not stop. My pipeline stay running

Hi,
We suggest try v4l2-ctl command and check when the camera is disconnected, if the v4l2-ctl command stops. If v4l2-ctl command can stop, one possible solution is to refer to source code of v4l2-ctl and customize the v4l2src plugin to add the error handling.

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