Date: Wed, 14 Aug 2019 16:19:10 +0200 From: Frederic Chardon <chardon.frederic@gmail.com> To: Jan Beich <jbeich@freebsd.org> Cc: chromium@freebsd.org Subject: Re: No webcam in chrome (works in firefox) Message-ID: <CAMODbknKXDHXvZrJA4VUjpNZ%2BcvKDnA7qddL9FGWtsd1hD4LvQ@mail.gmail.com> In-Reply-To: <CAMODbkn=Vukqb9sDY=uB_kpc_f3Gs4NwE0ZfUVKo5VjURuPPLQ@mail.gmail.com> References: <CAMODbkmYqnhq8cyHukBmttAEkrPE6xcVPrVgzgUN34BRGgMLqQ@mail.gmail.com> <o90z-tsh2-wny@FreeBSD.org> <CAMODbkn=Vukqb9sDY=uB_kpc_f3Gs4NwE0ZfUVKo5VjURuPPLQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Le ven. 9 ao=C3=BBt 2019 =C3=A0 06:26, Frederic Chardon <chardon.frederic@gmail.com> a =C3=A9crit : > > Le jeu. 8 ao=C3=BBt 2019 =C3=A0 20:36, Jan Beich <jbeich@freebsd.org> a = =C3=A9crit : > > > > (redirecting to a better list) > > > > Frederic Chardon <chardon.frederic@gmail.com> writes: > > > > > Hi > > > > > > I can't make chrome to recognize my webcam. webcamd is running, pwcvi= ew, > > > 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 javascrip= t > > > console throw a NotFoundError. > > > > > > ktrace shows that open() succeed > > > 83513 chrome CALL openat(AT_FDCWD,0x81812d101,0<O_RDONLY>) > > > 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=3DVIDIOC_QUERYCAP > > > > Firefox also uses VIDIOC_QUERYCAP but doesn't seem to check capabilitie= s. > > https://searchfox.org/mozilla-central/search?q=3DVIDIOC_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 progr= ams > > > 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 <linux/videodev2.h> > > #include <err.h> > > #include <fcntl.h> > > > > int main(void) > > { > > int fd; > > if ((fd =3D open("/dev/video0", O_RDWR)) =3D=3D -1) > > err(1, "failed to open /dev/video0"); > > > > struct v4l2_capability cap =3D {}; > > if (ioctl(fd, VIDIOC_QUERYCAP, &cap) =3D=3D -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 delega= tion"); > > 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 strea= ming"); > > > > return 0; > > } > > > > $ pkg install v4l_compat > > $ cc a.c -isystem/usr/local/include > > $ ./a.out > > > > a.out: /dev/video0 capabilities: 0x84a00001 > a.out: V4L2_CAP_VIDEO_M2M_MPLANE is missing, required for streaming > > > > > > Is it a known issue? Or am I missing something? > > > Thanks > > > > Did previous www/chromium major versions work fine? > > No idea, I only recently (~2 weeks) started needing a webcam. > > Thanks! I updated to latest version, no change. Can someone confirm that webcam works for them under chromium? Thanks
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMODbknKXDHXvZrJA4VUjpNZ%2BcvKDnA7qddL9FGWtsd1hD4LvQ>