uvcsink using arbitrary sources

Markus Fritsche mfritsche at reauktion.de
Fri Sep 1 14:25:28 UTC 2023


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;

mfritsche at usbcam:~ $ GST_DEBUG=2,uvcsink:5 gst-launch-1.0 videotestsrc ! 
jpegenc ! queue ! uvcsink v4l2sink::device=/dev/video0
0:00:00.005081094   710  0x1a56280 WARN         GST_PERFORMANCE 
gstbuffer.c:498:_priv_gst_buffer_initialize: No 64-bit atomic int 
defined for this platform/toolchain!
Setting pipeline to PAUSED ...
0:00:00.187630625   710  0x1a56280 DEBUG                uvcsink 
gstuvcsink.c:849:gst_uvc_sink_change_state:<uvcsink0> NULL -> READY
0:00:00.201542813   710  0x1a56280 DEBUG                uvcsink 
gstuvcsink.c:849:gst_uvc_sink_change_state:<uvcsink0> READY -> PAUSED
Pipeline is PREROLLING ...
Redistribute latency...
0:00:00.203438281   710  0x1c69ec0 DEBUG                uvcsink 
gstuvcsink.c:246:gst_uvc_sink_query:<uvcsink0> caps image/jpeg, 
parsed=(boolean)true, width=(int)1280, height=(int)720, 
colorimetry=(string){ 2:4:7:1 }, framerate=(fraction)15/1
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
0:00:00.264182917   710  0x1a56280 DEBUG                uvcsink 
gstuvcsink.c:849:gst_uvc_sink_change_state:<uvcsink0> PAUSED -> PLAYING
Redistribute latency...
New clock: GstSystemClock
0:00:00.407091771   710  0x1c69e50 DEBUG                uvcsink 
gstuvcsink.c:627:gst_uvc_sink_task:<uvcsink0> UVC_EVENT_SETUP
0:00:00.407189375   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:403:uvc_events_process_setup:<uvcsink0> bRequestType a1 bRequest 
86 wValue 0400 wIndex 0100 wLength 0001
0:00:00.407228490   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:357:uvc_events_parse_control:<uvcsink0> 
UVC_CT_EXPOSURE_TIME_ABSOLUTE_CONTROL: GET_INFO
0:00:00.407572969   710  0x1c69e50 DEBUG                uvcsink 
gstuvcsink.c:627:gst_uvc_sink_task:<uvcsink0> UVC_EVENT_SETUP
0:00:00.407621094   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:403:uvc_events_process_setup:<uvcsink0> bRequestType a1 bRequest 
81 wValue 0200 wIndex 0000 wLength 0001
0:00:00.407653906   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:352:uvc_events_parse_control:<uvcsink0> 
UVC_VC_REQUEST_ERROR_CODE_CONTROL
0:00:00.408012240   710  0x1c69e50 DEBUG                uvcsink 
gstuvcsink.c:627:gst_uvc_sink_task:<uvcsink0> UVC_EVENT_SETUP
0:00:00.408061250   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:403:uvc_events_process_setup:<uvcsink0> bRequestType a1 bRequest 
86 wValue 0900 wIndex 0100 wLength 0001
0:00:00.408098281   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:357:uvc_events_parse_control:<uvcsink0> 
UVC_CT_IRIS_ABSOLUTE_CONTROL: GET_INFO
0:00:00.408539792   710  0x1c69e50 DEBUG                uvcsink 
gstuvcsink.c:627:gst_uvc_sink_task:<uvcsink0> UVC_EVENT_SETUP
0:00:00.408599479   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:403:uvc_events_process_setup:<uvcsink0> bRequestType a1 bRequest 
81 wValue 0200 wIndex 0000 wLength 0001
0:00:00.408632135   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:352:uvc_events_parse_control:<uvcsink0> 
UVC_VC_REQUEST_ERROR_CODE_CONTROL
0:00:00.409065677   710  0x1c69e50 DEBUG                uvcsink 
gstuvcsink.c:627:gst_uvc_sink_task:<uvcsink0> UVC_EVENT_SETUP
0:00:00.409115156   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:403:uvc_events_process_setup:<uvcsink0> bRequestType a1 bRequest 
86 wValue 0200 wIndex 0200 wLength 0001
0:00:00.409151406   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:363:uvc_events_parse_control:<uvcsink0> UVC_PU_BRIGHTNESS_CONTROL: 
GET_INFO
0:00:00.409622812   710  0x1c69e50 DEBUG                uvcsink 
gstuvcsink.c:627:gst_uvc_sink_task:<uvcsink0> UVC_EVENT_SETUP
0:00:00.409670104   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:403:uvc_events_process_setup:<uvcsink0> bRequestType a1 bRequest 
81 wValue 0200 wIndex 0000 wLength 0001
0:00:00.409702448   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:352:uvc_events_parse_control:<uvcsink0> 
UVC_VC_REQUEST_ERROR_CODE_CONTROL
0:00:25.981039782   710  0x1c69e50 DEBUG                uvcsink 
gstuvcsink.c:627:gst_uvc_sink_task:<uvcsink0> UVC_EVENT_SETUP
0:00:25.981140251   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:403:uvc_events_process_setup:<uvcsink0> bRequestType a1 bRequest 
81 wValue 0100 wIndex 0001 wLength 0022
0:00:25.981179990   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:292:uvc_events_process_streaming:<uvcsink0> UVC_VS_PROBE_CONTROL: 
GET_CUR
0:00:25.981421344   710  0x1c69e50 DEBUG                uvcsink 
gstuvcsink.c:627:gst_uvc_sink_task:<uvcsink0> UVC_EVENT_SETUP
0:00:25.981470824   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:403:uvc_events_process_setup:<uvcsink0> bRequestType 21 bRequest 
01 wValue 0100 wIndex 0001 wLength 0022
0:00:25.981506761   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:292:uvc_events_process_streaming:<uvcsink0> UVC_VS_PROBE_CONTROL: 
SET_CUR
0:00:25.981592594   710  0x1c69e50 DEBUG                uvcsink 
gstuvcsink.c:644:gst_uvc_sink_task:<uvcsink0> UVC_EVENT_DATA
0:00:25.981622646   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:256:uvc_events_process_data:<uvcsink0> setting probe control
0:00:25.981722855   710  0x1c69e50 DEBUG                uvcsink 
gstuvcsink.c:627:gst_uvc_sink_task:<uvcsink0> UVC_EVENT_SETUP
0:00:25.981769521   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:403:uvc_events_process_setup:<uvcsink0> bRequestType a1 bRequest 
81 wValue 0100 wIndex 0001 wLength 0022
0:00:25.981804626   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:292:uvc_events_process_streaming:<uvcsink0> UVC_VS_PROBE_CONTROL: 
GET_CUR
0:00:25.982005459   710  0x1c69e50 DEBUG                uvcsink 
gstuvcsink.c:627:gst_uvc_sink_task:<uvcsink0> UVC_EVENT_SETUP
0:00:25.982065459   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:403:uvc_events_process_setup:<uvcsink0> bRequestType a1 bRequest 
83 wValue 0100 wIndex 0001 wLength 0022
0:00:25.982100719   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:292:uvc_events_process_streaming:<uvcsink0> UVC_VS_PROBE_CONTROL: 
GET_MAX
0:00:25.982311709   710  0x1c69e50 DEBUG                uvcsink 
gstuvcsink.c:627:gst_uvc_sink_task:<uvcsink0> UVC_EVENT_SETUP
0:00:25.982358011   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:403:uvc_events_process_setup:<uvcsink0> bRequestType a1 bRequest 
82 wValue 0100 wIndex 0001 wLength 0022
0:00:25.982392855   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:292:uvc_events_process_streaming:<uvcsink0> UVC_VS_PROBE_CONTROL: 
GET_MIN
0:00:25.984359782   710  0x1c69e50 DEBUG                uvcsink 
gstuvcsink.c:627:gst_uvc_sink_task:<uvcsink0> UVC_EVENT_SETUP
0:00:25.984406292   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:403:uvc_events_process_setup:<uvcsink0> bRequestType 21 bRequest 
01 wValue 0100 wIndex 0001 wLength 0022
0:00:25.984441136   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:292:uvc_events_process_streaming:<uvcsink0> UVC_VS_PROBE_CONTROL: 
SET_CUR
0:00:25.984516136   710  0x1c69e50 DEBUG                uvcsink 
gstuvcsink.c:644:gst_uvc_sink_task:<uvcsink0> UVC_EVENT_DATA
0:00:25.984545719   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:256:uvc_events_process_data:<uvcsink0> setting probe control
0:00:25.984674730   710  0x1c69e50 DEBUG                uvcsink 
gstuvcsink.c:627:gst_uvc_sink_task:<uvcsink0> UVC_EVENT_SETUP
0:00:25.984721969   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:403:uvc_events_process_setup:<uvcsink0> bRequestType a1 bRequest 
81 wValue 0100 wIndex 0001 wLength 0022
0:00:25.984756865   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:292:uvc_events_process_streaming:<uvcsink0> UVC_VS_PROBE_CONTROL: 
GET_CUR
0:00:25.984980251   710  0x1c69e50 DEBUG                uvcsink 
gstuvcsink.c:627:gst_uvc_sink_task:<uvcsink0> UVC_EVENT_SETUP
0:00:25.985027282   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:403:uvc_events_process_setup:<uvcsink0> bRequestType 21 bRequest 
01 wValue 0200 wIndex 0001 wLength 0022
0:00:25.985062074   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:292:uvc_events_process_streaming:<uvcsink0> UVC_VS_COMMIT_CONTROL: 
SET_CUR
0:00:25.985146449   710  0x1c69e50 DEBUG                uvcsink 
gstuvcsink.c:644:gst_uvc_sink_task:<uvcsink0> UVC_EVENT_DATA
0:00:25.985193480   710  0x1c69e50 DEBUG                uvcsink 
uvc.c:261:uvc_events_process_data:<uvcsink0> setting commit control
0:00:25.986229105   710  0x1c69e50 DEBUG                uvcsink 
gstuvcsink.c:610:gst_uvc_sink_task:<uvcsink0> UVC_EVENT_STREAMON
0:00:25.997803115   710  0x1c69ec0 DEBUG                uvcsink 
gstuvcsink.c:246:gst_uvc_sink_query:<uvcsink0> caps image/jpeg, 
parsed=(boolean)true, width=(int)1280, height=(int)720, 
colorimetry=(string){ 2:4:7:1 }, framerate=(fraction)15/1
0:00:25.997892959   710  0x1c69ec0 DEBUG                uvcsink 
gstuvcsink.c:348:gst_uvc_sink_to_v4l2sink:<uvcsink0> switching to 
v4l2sink
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
0:00:26.531746032   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
0:00:26.532065511   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

The last line then repeats once per frame. avenc_mjpeg refuses to play.

Best regards,
   Markus


More information about the gstreamer-devel mailing list