Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Aug 2019 06:26:32 +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:  <CAMODbkn=Vukqb9sDY=uB_kpc_f3Gs4NwE0ZfUVKo5VjURuPPLQ@mail.gmail.com>
In-Reply-To: <o90z-tsh2-wny@FreeBSD.org>
References:  <CAMODbkmYqnhq8cyHukBmttAEkrPE6xcVPrVgzgUN34BRGgMLqQ@mail.gmail.com> <o90z-tsh2-wny@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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, 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<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 p=
laces.
> https://cs.chromium.org/search/?q=3DVIDIOC_QUERYCAP
>
> Firefox also uses VIDIOC_QUERYCAP but doesn't seem to check capabilities.
> 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 program=
s
> > 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 delegati=
on");
>     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 streami=
ng");
>
>     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!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMODbkn=Vukqb9sDY=uB_kpc_f3Gs4NwE0ZfUVKo5VjURuPPLQ>