webcam doesn't work without GST_V4L2_USE_LIBV4L2
I was trying to debug why Microsoft Teams didn't show the webcam image on my system since it works on the browser. Gnome Cheese also says that there's no webcam available. I'm not sure about Microsoft Teams app, but Cheese definitely uses gstreamer so I tried via command line. This is what I get:
$ gst-launch-1.0 v4l2src ! xvimagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
Using the env variable GST_V4L2_USE_LIBV4L2=1, looks like this (and it works):
GST_V4L2_USE_LIBV4L2=1 gst-launch-1.0 v4l2src ! xvimagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Output window was closed
Additional debug info:
xvimagesink.c(554): gst_xv_image_sink_handle_xevents (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0
Execution ended after 0:00:02.805569936
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
Using the same env variable with cheese makes it work. (sadly doesn't work with Teams, but it's not my point here)
Not really sure this is a gstreamer bug, but I though on reporting it just in case it is.
Edit: Forgot to say that I'm using Fedora 32 and the camera is a Logitech, Inc. QuickCam Communicate STX (046d:08d7) (gspca_zc3xx module)