Thursday, January 02, 2025

Re: support multiply webcam in chromium-based browsers

On Thu, 02 Jan 2025 19:11:05 +0100,
Klemens Nanni <kn@openbsd.org> wrote:
>
> 31.12.2024 23:11, Kirill A. Korinsky пишет:
> > Robert,
> >
> > I'd like to adjust one patch on all chrome-based browsers in ports tree.
> >
> > A few days ago I had commited a fix [1] in uvideo.c which allows user to
> > select in Firefox between connected webcams.
> >
> > Thus, the same can be done in Chrome-based browsers, but it needs small
> > adjustment in the patch.
> >
> > I had used the same limit of number of possible devices with libwebrtc [2],
> > and updated unveil files to allow /dev/video0 and /dev/video1 which is
> > created by default.ta
>
> Makes sense to unveil all default devices, but trying to open 64 of them like
> libWebRTC? I guess we'd be fine with probing just the first two, matching unveil.
>
> No objection, I can see how matching similar code might make sense, but that
> limit sounds absurdly high.
>

On my usual setup I have three devices and use /dev/video0 and /dev/video2,
and the only way to increase such hard limit, is recompile the chrome which
requires a lot of space (almost 40Gb) and a lot of times (depends of CPU,
migth be a days or two).

I may put here 8 or 16 or anything, but I prefer to match some behaviour and
webrtc looks as good as it can be.

Keep in mind that this code is running only when user visits a page which
looking for devices. It's very rare, and shouldn't create any issue.

--
wbr, Kirill

No comments:

Post a Comment