VirtualBox

5 年 前 建立

5 年 前 更新

#18725 new defect

WebCam passtrough doesn't properly pass format capabilities to guest GStreamer

回報者: SuperPrower 負責人:
元件: other 版本: VirtualBox 6.0.8
關鍵字: webcam 副本:
Guest type: Linux Host type: Linux

描述

When attaching a webcam to a Guest OS using Devices->Webcams menu, resulting device in the Guest system reports following format capabilities to GStreamer:

...
0:00:00.206792405 15881  0x88fee00 INFO                    v4l2 gstv4l2object.c:1202:gst_v4l2_object_fill_format_list:<camerasrc-real-src-actual-src-v4l:src>   MJPG
0:00:00.207621489 15881  0x88fee00 INFO                    v4l2 gstv4l2object.c:4136:gst_v4l2_object_probe_caps:<camerasrc-real-src-actual-src-v4l:src> probed caps:
image/jpeg, width=(int)1280, height=(int)960, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 };
image/jpeg, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 };
image/jpeg, width=(int)1184, height=(int)656, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 };
...

(continues in similar fashion with similar formats)

This results in webcam being incompatible with CameraBin pipeline:

0:00:00.208131863 15881  0x88fee00 INFO        GST_ELEMENT_PADS gstutils.c:1227:gst_element_get_compatible_pad:<src-crop> Could not find a compatible pad to link to camerasrc-real-src:src
0:00:00.208198762 15881  0x88fee00 INFO                GST_PADS gstutils.c:1035:gst_pad_check_link: trying to link camerasrc-real-src:src and src-crop:sink
0:00:00.209174846 15881  0x88fee00 INFO                GST_PADS gstpad.c:2378:gst_pad_link_prepare: trying to link camerasrc-real-src:src and src-crop:sink
0:00:00.209487092 15881  0x88fee00 INFO                GST_PADS gstpad.c:2434:gst_pad_link_prepare: caps are incompatible
0:00:00.209526143 15881  0x88fee00 INFO                GST_PADS gstpad.c:2529:gst_pad_link_full: link between camerasrc-real-src:src and src-crop:sink failed: no common format
0:00:00.209583393 15881  0x88fee00 INFO           GST_PARENTAGE gstbin.c:1799:gst_bin_remove_func:<camerasrc> removed child "src-crop"
0:00:00.209642419 15881  0x88fee00 WARN                 default camerabingeneral.c:87:gst_camerabin_add_element_full:<camerasrc> error: linking src-crop failed
0:00:00.209701572 15881  0x88fee00 INFO        GST_ERROR_SYSTEM gstelement.c:2145:gst_element_message_full_with_details:<camerasrc> posting message: GStreamer error: negotiation problem.

While on guest system or when attaching as a regular USB device, it reports the following format capabilities:

...
0:00:00.213225446 15913  0x92dee00 INFO                    v4l2 gstv4l2object.c:1202:gst_v4l2_object_fill_format_list:<camerasrc-real-src-actual-src-v4l:src>   YUYV
0:00:00.213341622 15913  0x92dee00 INFO                    v4l2 gstv4l2object.c:4136:gst_v4l2_object_probe_caps:<camerasrc-real-src-actual-src-v4l:src> probed caps:
video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 15/1 };
video/x-raw, format=(string)YUY2, width=(int)352, height=(int)288, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 15/1 };
...

And everything works fine. This makes a webcam incompatible with any application that uses gstreamers' camerabin, for example, a Qt applications.

Attached are exempts from different logs, but there isn't much of interest except for what is provided.

This has been tested on two Host 64-bit machines running Arch Linux and Ubuntu 18.04, with 64-bit Ubuntu 18.04 Guest and another 32-bit Linux-based Guest OS. Results are identical.

附加檔案 (1)

wcamlog (13.5 KB ) - 5 年 前, 由 SuperPrower 新增
Excerpts from logs

下載所有附檔: .zip

更動歷史 (2)

5 年 前SuperPrower 編輯

附檔: 新增 wcamlog

Excerpts from logs

comment:1 5 年 前SuperPrower 編輯

While on guest system -> While on host system. Exempts -> excerpts. And there are probably some other typos and grammar mistakes - sorry for that.

注意: 瀏覽 TracTickets 來幫助您使用待辦事項功能

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette