blue screen after disconnecting camera

Nicolas Dufresne nicolas at ndufresne.ca
Mon Feb 20 19:31:02 UTC 2017


Le lundi 20 février 2017 à 02:21 -0800, ronitzagade a écrit :
> i run this command  gst-launch-1.0 v4l2src ! capsfilter
> caps=video/x-raw,width=640,height=480 ! autovideosink  on imx6 its work
> properly but when i disconnect camera device  manually its showing me blue
> screen but i want image insted of blue screen what pipeline should be so i
> can set camera disconnect image

You could use GstDeviceMonitor[0] to track when devices get added or
removed. Note that v4l2src usually also post an error, I'm not sure
exactly what code, but you should make sure to handle errors from this
element properly. Combining both is ideal.

When a camera is disconnected, or fails in a fatal way, you can then do
whatever is required to display the image you want.


[0] https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer
/html/gstreamer-GstDeviceMonitor.html#gstreamer-
GstDeviceMonitor.description
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170220/a79a0e95/attachment.sig>


More information about the gstreamer-devel mailing list