Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is maxBufferSize needed for video? #76

Open
youennf opened this issue Feb 2, 2022 · 0 comments
Open

Is maxBufferSize needed for video? #76

youennf opened this issue Feb 2, 2022 · 0 comments

Comments

@youennf
Copy link
Contributor

youennf commented Feb 2, 2022

My recollection from past discussions is that feedback was provided that maxBufferSize is probably unneeded and potentially harmful for processing video frames (there is some discussion #69 (comment) at least). As such, I do not think this particular feature has reached consensus.

It is potentially harmful for video tracks as video frames may be scarce resources and buffering them may block the camera to provide fresher frames. If a web developer sets the maxBufferSize to 10 and the camera pool is 9, if web developer waits for 1 second, camera will not be able to produce new frames during that 1 second.

It is potentially unneeded as this buffering can probably be implemented in pure JavaScript by calling read() synchronously whenever the callbacks of the previous read() promise are called.
By letting JS do the buffering, they can for instance decide to decimate the frames if the buffer grows too large in the most suitable way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant