From owner-freebsd-chromium@freebsd.org Thu Aug 8 18:36:14 2019 Return-Path: Delivered-To: freebsd-chromium@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D89F5AEA3A for ; Thu, 8 Aug 2019 18:36:14 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 464HBk5Kd1z4hMZ for ; Thu, 8 Aug 2019 18:36:14 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id B69B8AEA38; Thu, 8 Aug 2019 18:36:14 +0000 (UTC) Delivered-To: chromium@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B65B6AEA35 for ; Thu, 8 Aug 2019 18:36:14 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 464HBk4Q5hz4hMY; Thu, 8 Aug 2019 18:36:14 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1354) id 77035198AE; Thu, 8 Aug 2019 18:36:14 +0000 (UTC) From: Jan Beich To: Frederic Chardon Cc: chromium@freebsd.org Subject: Re: No webcam in chrome (works in firefox) References: Date: Thu, 08 Aug 2019 20:36:09 +0200 In-Reply-To: (Frederic Chardon's message of "Mon, 29 Jul 2019 22:46:51 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: freebsd-chromium@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FreeBSD-specific Chromium issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Aug 2019 18:36:14 -0000 (redirecting to a better list) Frederic Chardon writes: > Hi > > I can't make chrome to recognize my webcam. webcamd is running, pwcview, > firefox or mpv all works > Ports are at revision 507476 and base at 350255 (amd64). > > There is no camera listed in chrome://media-internals and typing > "navigator.mediaDevices.getUserMedia({video:true});" in the javascript > console throw a NotFoundError. > > ktrace shows that open() succeed > 83513 chrome CALL openat(AT_FDCWD,0x81812d101,0) > 83513 chrome NAMI "/dev/video0" > 83513 chrome RET openat 159/0x9f > 83513 chrome CALL ioctl(0x9f,0x40685600,0x7fffde9f2aa8) 0x40685600 is probably VIDIOC_QUERYCAP, used by Chromium in a number of places. https://cs.chromium.org/search/?q=VIDIOC_QUERYCAP Firefox also uses VIDIOC_QUERYCAP but doesn't seem to check capabilities. https://searchfox.org/mozilla-central/search?q=VIDIOC_QUERYCAP > 83513 chrome RET ioctl 0 > 83513 chrome CALL close(0x9f) > 83513 chrome RET close 0 > > So this is rather not a permission issue (and anyway, the other programs > all work) Can you show output from the following? I don't have a camera, so no clue which capabilities Chromium wants. $ cat a.c #include #include #include int main(void) { int fd; if ((fd = open("/dev/video0", O_RDWR)) == -1) err(1, "failed to open /dev/video0"); struct v4l2_capability cap = {}; if (ioctl(fd, VIDIOC_QUERYCAP, &cap) == -1) err(1, "VIDIOC_QUERYCAP failed"); warnx("/dev/video0 capabilities: %#x", cap.capabilities); if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) warnx("V4L2_CAP_VIDEO_CAPTURE is missing"); if (cap.capabilities & V4L2_CAP_VIDEO_OUTPUT) warnx("V4L2_CAP_VIDEO_OUTPUT is present, not allowed for delegation"); if (!(cap.capabilities & V4L2_CAP_STREAMING)) warnx("V4L2_CAP_STREAMING is missing"); if (!(cap.capabilities & V4L2_CAP_VIDEO_M2M_MPLANE)) warnx("V4L2_CAP_VIDEO_M2M_MPLANE is missing, required for streaming"); return 0; } $ pkg install v4l_compat $ cc a.c -isystem/usr/local/include $ ./a.out > > Is it a known issue? Or am I missing something? > Thanks Did previous www/chromium major versions work fine?