Bug 245250 - www/chromium: webcam doesn't work in chrome
Summary: www/chromium: webcam doesn't work in chrome
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Conrad Meyer
Depends on:
Reported: 2020-04-01 19:25 UTC by Yuri Victorovich
Modified: 2020-04-10 15:01 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (chromium)


Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer 2020-04-01 19:25:36 UTC
https://www.onlinemictest.com/webcam-test/ says "We can't find your camera"

The V4L device otherwise works in Firefox, qTox, mplayer.

Version 80.0.3987.132 (Official Build) (64-bit)
Comment 1 Tamas Szakaly 2020-04-06 13:13:21 UTC
Although I've only tried this with www/qutebrowser (which uses www/qt5-webengine), not www/chromium, this might still be relevant (almost the same code, after all):

The following two patches essentially #ifdef out video capture code:
 - patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__factory__linux.cc
 - patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__linux.cc

With those patches, VideoCaptureDeviceFactoryLinux::HasUsableFormats always returns false, so capable devices are not even detected. I've removed those #ifdefs in www/qt5-webengine, and I've been using Facebook Messenger and Jitsi from qutebrowser for a few days now on a HardenedBSD 13.0-CURRENT laptop.

That said, I don't know if those patches fix some problem that just luckily don't occur on my box, or they were just left there accidentally. I've tried git --follow and internet searches, but wasn't able to find the reason they exist.
Comment 2 Conrad Meyer freebsd_committer 2020-04-07 19:44:02 UTC
As far as I can tell, they were introduced for no documented reason in r416521.
Comment 3 Conrad Meyer freebsd_committer 2020-04-07 19:54:50 UTC
I'm preparing a patch: https://reviews.freebsd.org/D24330
Comment 4 commit-hook freebsd_committer 2020-04-08 00:23:20 UTC
A commit references this bug:

Author: cem
Date: Wed Apr  8 00:22:47 UTC 2020
New revision: 531050
URL: https://svnweb.freebsd.org/changeset/ports/531050

  www/chromium: Un-remove v4l video capture support

  This support was removed in r416521. The revision message did not document the
  removal nor justify patching out a major port feature.

  This restores that support.

  The earlier revision should probably be audited for other patches which (a) add
  update burden to this already huge port and (b) remove expected functionality.

  PR:		245250
  Submitted by:	Tamas Szakaly <sghctoma AT gmail.com>
  Reported by:	yuri@
  Approved by:	jrm
  Differential Revision:	https://reviews.freebsd.org/D24330

Comment 5 Marcin Cieślak 2020-04-10 15:01:19 UTC
There is progress (it gets detected), but I am getting green flicker, for which I have opened https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245505