Issue: I am reading frames from a camera source using Gstreamer 1.0. I have used the tcp protocol in the gstreamer pipeline. When I disconnect the camera source the last frame keeps displaying in the appsink and there are no messages received from bus (It provides a NONE message).
Expecting: When the camera source is disconnected, Error message should be displayed. The pipeline should restart next only when the camera source is disconnected again.
I’m not sure what you mean by “The last frame keeps displaying in the appsink”. We might be missing some more context about what you’re doing exactly.
appsink will make available buffers to the application as they arrive. If the camera connection breaks off, the data that’s already in the pipeline will still continue to flow, just no more new data arrives. appsink doesn’t repeat anything usually.
When the TCP connection to the camera breaks, you should get an ERROR message on the bus.
I don’t know what a NONE message is, that sounds like a bug somewhere (but could be in your printing code of course).
Clarity on what I am doing, I am actually trying to achieve “video loss scenario” using Gstreamer.
How do I catch and return an error message when there is a stream loss.
As you have mentioned when camera breaks, an error message should be generated instead a “None” message is returned.
The ERROR message would be something you would get on the pipeline’s GstBus.
Perhaps check the behaviour with gst-launch-1.0 first, then try to catch things in your app.