Bug 237423 - www/qt5-webengine: enable video capture device implementation
Summary: www/qt5-webengine: enable video capture device implementation
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords: easy, patch, patch-ready
Depends on:
Blocks:
 
Reported: 2019-04-20 22:07 UTC by Christoph Moench-Tegeder
Modified: 2020-01-06 05:32 UTC (History)
4 users (show)

See Also:
tcberner: maintainer-feedback+


Attachments
port video capture device patches from chromium (3.75 KB, patch)
2019-04-20 22:07 UTC, Christoph Moench-Tegeder
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Moench-Tegeder freebsd_committer freebsd_triage 2019-04-20 22:07:52 UTC
Created attachment 203840 [details]
port video capture device patches from chromium

currently, qt5-webengine-using ports (e.g. qmapshack, once I fixed it) print a warning:
[40533:463527936:0420/214650.072475:ERROR:create_video_capture_device_factory.cc(58)] Not implemented reached in std::unique_ptr<VideoCaptureDeviceFactory> media::(anonymous namespace)::CreatePlatformSpecificVideoCaptureDeviceFactory(scoped_refptr<base::SingleThreadTaskRunner>)

This can be fixed by porting the corresponding patched from the chromium port (which makes me wonder, how many copies of chromium with all their embedded libraries at what patch level do I need? but that's not to be discussed here).
See attaches patch.
Comment 1 Kai Knoblich freebsd_committer freebsd_triage 2019-04-20 23:02:25 UTC
There is already a review at Phabricator that also contains those patches: 

https://reviews.freebsd.org/D19900
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-06-13 08:45:29 UTC
A commit references this bug:

Author: kai
Date: Thu Jun 13 08:44:41 UTC 2019
New revision: 504068
URL: https://svnweb.freebsd.org/changeset/ports/504068

Log:
  www/qt5-webengine: Enable support for WebRTC and video capture devices

  When accessing video capture devices warnings like below are emitted [2]:

  [40533:463527936:0420/214650.072475:ERROR:create_video_capture_device_factory.cc(58)] Not implemented reached in std::unique_ptr<VideoCaptureDeviceFactory> media::(anonymous namespace)::CreatePlatformSpecificVideoCaptureDeviceFactory(scoped_refptr<base::SingleThreadTaskRunner>)

  Also websites that want to access the camera, microphone, etc. exhibit
  broken behavior, e.g. no dialogs to permit access on the desired capture
  devices come up. [1]

  Thus add the related patches from www/chromium [2] that enable support for
  video capture devices and explicitly activate the WebRTC feature. [1]

  PR:		236915 [1], 237423 [2]
  Submitted by:	cmt [2]
  Reported by:	thea20lineisameme@protonmail.com [1]
  Reviewed by:	rakuco, tcberner (kde), Lorenzo Salvadore
  Approved by:	tcberner (kde)
  Differential Revision:	https://reviews.freebsd.org/D19900

Changes:
  head/UPDATING
  head/www/qt5-webengine/Makefile
  head/www/qt5-webengine/files/patch-clang
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_create__video__capture__device__factory.cc
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_shared__memory__handle__provider.cc
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_shared__memory__handle__provider.h
  head/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_webrtc.gni
Comment 3 Martin Birgmeier 2019-06-13 19:39:07 UTC
On FreeBSD 12 using portmaster to upgrade fails with:

In file included from ../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/base/synchronization/lock.h:11:
../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/base/synchronization/lock_impl.h:70:12: warning: releasing mutex 'native_handle_' that was not held [-Wthread-safety-analysis]
  int rv = pthread_mutex_unlock(&native_handle_);
           ^
In file included from /usr/tmp/a/SRC/FreeBSD-ports/head/www/qt5-webengine/work/qtwebengine-everywhere-src-5.12.2/src/core/web_contents_delegate_qt.cpp:61:
In file included from /usr/tmp/a/SRC/FreeBSD-ports/head/www/qt5-webengine/work/qtwebengine-everywhere-src-5.12.2/src/core/web_engine_context.h:43:
/usr/tmp/a/SRC/FreeBSD-ports/head/www/qt5-webengine/work/qtwebengine-everywhere-src-5.12.2/src/core/build_config_qt.h:89:2: error: Config sanity check for ENABLE_WEBRTC failed
#error Config sanity check for ENABLE_WEBRTC failed
 ^
1 warning and 1 error generated.
[4/125] CXX obj/QtWebEngineCore/web_contents_adapter.o
FAILED: obj/QtWebEngineCore/web_contents_adapter.o 
/usr/bin/c++ -B/usr/local/bin -MMD -MF obj/QtWebEngineCore/web_contents_adapter.o.d -DCHROMIUM_VERSION=\"69.0.3497.128\" -DV8_DEPRECATION_WARNINGS -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DQT_NO_KEYWORDS -DQT_USE_QSTRINGBUILDER -DQ_FORWARD_DECLARE_OBJC_CLASS=QT_FORWARD_DECLARE_CLASS -DQTWEBENGINECORE_VERSION_STR=\"5.12.2\" -DQTWEBENGINEPROCESS_NAME=\"QtWebEngineProcess\" -DBUILDING_CHROMIUM -D_THREAD_SAFE -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_WEBCHANNEL_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_POSITIONING_LIB -DQT_CORE_LIB -DQT_WEBENGINECOREHEADERS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_HAS_PNG_LIBRARY -DSK_HAS_WEBP_LIBRARY -DSK_HAS_JPEG_LIBRARY -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DLEVELDB_PLATFORM_CHROMIUM=1 -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DGTEST_RELATIVE_PATH -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -DWEBRTC_BSD -DABSL_ALLOCATOR_NOTHROW=1 -DNO_MAIN_THREAD_WRAPPING -DMESA_EGL_NO_X11_HEADERS -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/skia/config -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/skia/include/core -Igen -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium -I/usr/tmp/a/SRC/FreeBSD-ports/head/www/qt5-webengine/work/qtwebengine-everywhere-src-5.12.2/src/core -I/usr/tmp/a/SRC/FreeBSD-ports/head/www/qt5-webengine/work/qtwebengine-everywhere-src-5.12.2/src/core/api -I/usr/local/include/libdrm -I/usr/local/include/qt5 -I/usr/local/include/qt5/QtQuick -I/usr/local/include/qt5/QtGui -I/usr/local/include/qt5/QtWebChannel -I/usr/local/include/qt5/QtQml -I/usr/local/include/qt5/QtNetwork -I/usr/local/include/qt5/QtPositioning -I/usr/local/include/qt5/QtCore -I/usr/local/include/qt5/QtWebEngineCore -I/usr/local/include/qt5/QtWebEngineCore/5.12.2 -I/usr/local/include/qt5/QtWebEngineCore/5.12.2/QtWebEngineCore -I/usr/local/include/qt5/QtQuick/5.12.2 -I/usr/local/include/qt5/QtQuick/5.12.2/QtQuick -I/usr/local/include/qt5/QtGui/5.12.2 -I/usr/local/include/qt5/QtGui/5.12.2/QtGui -I/usr/local/include/qt5/QtQml/5.12.2 -I/usr/local/include/qt5/QtQml/5.12.2/QtQml -I/usr/local/include/qt5/QtCore/5.12.2 -I/usr/local/include/qt5/QtCore/5.12.2/QtCore -I.moc -I/usr/local/include/libdrm -Igen/.moc -I/usr/local/lib/qt5/mkspecs/freebsd-clang -Igen -Igen -Igen -Igen -Igen -Igen -Igen -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/libyuv/include -Igen -Igen -Igen -Igen -Igen -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/khronos -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/gpu -Igen -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/ced/src -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/icu/source/common -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/icu/source/i18n -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/protobuf/src -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/protobuf/src -Igen/protoc_out -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/boringssl/src/include -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/skia/config -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/skia/ext -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/skia/include/c -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/skia/include/config -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/skia/include/core -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/skia/include/effects -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/skia/include/encode -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/skia/include/gpu -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/skia/include/images -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/skia/include/lazy -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/skia/include/pathops -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/skia/include/pdf -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/skia/include/pipe -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/skia/include/ports -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/skia/include/utils -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/skia/src/gpu -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/skia/src/sksl -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/leveldatabase -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/leveldatabase/src -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/leveldatabase/src/include -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/libwebm/source -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/v8/include -Igen/v8/include -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/webrtc_overrides -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/webrtc -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/mesa/src/include -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/webrtc_overrides -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/testing/gtest/include -I../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/webrtc -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -Wno-unknown-attributes -Wno-unknown-pragmas -Wno-unknown-warning-option -funwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -no-canonical-prefixes -m64 -Wall -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-address-of-packed-member -Wno-nonportable-include-path -Wno-user-defined-warnings -Wno-unused-lambda-capture -Wno-null-pointer-arithmetic -Wno-enum-compare-switch -Wno-ignored-pragma-optimize -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fno-exceptions -Wall -W -pthread -Wno-header-guard -isystem../../../../../../../../../../../../local/include/nss -isystem../../../../../../../../../../../../local/include/nss/nss -isystem../../../../../../../../../../../../local/include/nspr -isystem ../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/third_party/abseil-cpp -Wno-parentheses-equality -Wno-tautological-compare -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=gnu++14 -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -std=gnu++1y -fno-exceptions -Wall -W -pthread -Wno-unused-parameter -Wno-unused-variable -c /usr/tmp/a/SRC/FreeBSD-ports/head/www/qt5-webengine/work/qtwebengine-everywhere-src-5.12.2/src/core/web_contents_adapter.cpp -o obj/QtWebEngineCore/web_contents_adapter.o
In file included from /usr/tmp/a/SRC/FreeBSD-ports/head/www/qt5-webengine/work/qtwebengine-everywhere-src-5.12.2/src/core/web_contents_adapter.cpp:46:
In file included from /usr/tmp/a/SRC/FreeBSD-ports/head/www/qt5-webengine/work/qtwebengine-everywhere-src-5.12.2/src/core/browser_accessibility_qt.h:44:
In file included from ../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/content/browser/accessibility/browser_accessibility.h:19:
In file included from ../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/content/browser/accessibility/browser_accessibility_position.h:13:
In file included from ../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/ui/accessibility/ax_position.h:21:
In file included from ../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/ui/accessibility/ax_enum_util.h:8:
In file included from gen/ui/accessibility/ax_enums.mojom.h:14:
In file included from ../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/base/callback.h:14:
In file included from ../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/base/callback_internal.h:14:
In file included from ../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/base/memory/ref_counted.h:18:
In file included from ../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/base/sequence_checker.h:10:
In file included from ../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/base/sequence_checker_impl.h:13:
In file included from ../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/base/synchronization/lock.h:11:
../../../../qtwebengine-everywhere-src-5.12.2/src/3rdparty/chromium/base/synchronization/lock_impl.h:70:12: warning: releasing mutex 'native_handle_' that was not held [-Wthread-safety-analysis]
  int rv = pthread_mutex_unlock(&native_handle_);
           ^
In file included from /usr/tmp/a/SRC/FreeBSD-ports/head/www/qt5-webengine/work/qtwebengine-everywhere-src-5.12.2/src/core/web_contents_adapter.cpp:61:
In file included from /usr/tmp/a/SRC/FreeBSD-ports/head/www/qt5-webengine/work/qtwebengine-everywhere-src-5.12.2/src/core/web_engine_context.h:43:
/usr/tmp/a/SRC/FreeBSD-ports/head/www/qt5-webengine/work/qtwebengine-everywhere-src-5.12.2/src/core/build_config_qt.h:89:2: error: Config sanity check for ENABLE_WEBRTC failed
#error Config sanity check for ENABLE_WEBRTC failed
 ^
1 warning and 1 error generated.
ninja: build stopped: subcommand failed.
*** [run_ninja] Error code 1

make[5]: stopped in /usr/tmp/a/SRC/FreeBSD-ports/head/www/qt5-webengine/work/.build/src/core
1 error

make[5]: stopped in /usr/tmp/a/SRC/FreeBSD-ports/head/www/qt5-webengine/work/.build/src/core
*** [sub-gn_run-pro-make_first] Error code 2

make[4]: stopped in /usr/tmp/a/SRC/FreeBSD-ports/head/www/qt5-webengine/work/.build/src/core
1 error

make[4]: stopped in /usr/tmp/a/SRC/FreeBSD-ports/head/www/qt5-webengine/work/.build/src/core
*** [sub-core-make_first] Error code 2

make[3]: stopped in /usr/tmp/a/SRC/FreeBSD-ports/head/www/qt5-webengine/work/.build/src
1 error

make[3]: stopped in /usr/tmp/a/SRC/FreeBSD-ports/head/www/qt5-webengine/work/.build/src
*** [sub-src-make_first] Error code 2

make[2]: stopped in /usr/tmp/a/SRC/FreeBSD-ports/head/www/qt5-webengine/work/.build
1 error

make[2]: stopped in /usr/tmp/a/SRC/FreeBSD-ports/head/www/qt5-webengine/work/.build
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /a/SRC/FreeBSD-ports/head/www/qt5-webengine
*** Error code 1

Stop.
make: stopped in /a/SRC/FreeBSD-ports/head/www/qt5-webengine
make  71.03s user 9.36s system 276% cpu 29.110 total
Comment 4 Kai Knoblich freebsd_committer freebsd_triage 2019-06-13 19:48:58 UTC
(In reply to Martin Birgmeier from comment #3)

Hi Martin,

have you already tried to do "pkg delete -f qt5-webengine" as noted in UPDATING?
Comment 5 Martin Birgmeier 2019-06-14 06:06:30 UTC
I have not... thanks for the gentle reminder to always look in UPDATING first.

-- Martin
Comment 6 Tobias C. Berner freebsd_committer freebsd_triage 2019-11-09 12:50:41 UTC
Is this still an issue for you?