Re: uvcsink using arbitrary sources

Michael Tretter via gstreamer-devel <[email protected]>
Newsgroups gmane.comp.video.gstreamer.devel
Message-ID <[email protected]>
On Fri, 01 Sep 2023 16:25:28 +0200, Markus Fritsche wrote:
> On 31.08.2023 15:53, Michael Tretter via gstreamer-devel wrote:
> > On Fri, 18 Aug 2023 14:18:04 +0200, Markus Fritsche via gstreamer-devel
> > wrote:
> > > What additional info should I provide?
> 
> > Can you test if the patches in
> > https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5170
> > help?
> 
> I went ahead and merged the PR as well as the one referenced. I created a
> new device using the uvc-gadget.sh skript from the freedesktop uvc-gadget
> repo:
> 
>         create_frame $FUNCTION 1280 720 mjpeg mjpeg
> 
>         mkdir functions/$FUNCTION/streaming/header/h
>         cd functions/$FUNCTION/streaming/header/h
> #       ln -s ../../uncompressed/yuyv
>         ln -s ../../mjpeg/mjpeg
> 
> (changed 'm' to 'mjpeg' and no yuyv formats).
> 
> > Please also provide the log of the pipeline with GST_DEBUG=uvcsink:5.
> > The
> > uvcsink should log its internal state changes and there should be
> > something
> > right before the pipeline stops.
> 
> With that, I started the Windows Camera App;
> 
[...]
> 0:00:25.997892959   710  0x1c69ec0 DEBUG                uvcsink
> gstuvcsink.c:348:gst_uvc_sink_to_v4l2sink:<uvcsink0> switching to v4l2sink

Here the uvcsink switches to the internal v4l2sink. That means the UVC device
should start streaming,

> 0:00:26.531331084   710  0x1c69e88 WARN                GST_CAPS
> gstpad.c:5788:pre_eventfunc_check:<v4l2sink:sink> caps image/jpeg,
> sof-marker=(int)0, width=(int)1280, height=(int)720,
> pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)15/1,
> interlace-mode=(string)progressive, colorimetry=(string)2:4:7:1,
> multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
> not accepted

but the internal v4l2sink does not accept the negotiated caps.

Try to add a capsfilter with exactly the caps in this warning to your pipeline
right before the uvcsink. The v4l2sink is a bit picky regarding the caps, as
the V4L2 output device of the UVC gadget is not entirely compliant to the V4L2
API [0].

You may also increase the loglevel of GST_CAPS, check the log for caps that
would be accepted by the v4l2sink, and only add the missing fields to the
capsfilter.

Michael

[0] https://lore.kernel.org/linux-media/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.