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

What is the expected timing of MSTP video frame enqueuing with other track events (configurationchange, applyConstraints promise resolution) #115

Open
youennf opened this issue Nov 19, 2024 · 3 comments

Comments

@youennf
Copy link
Contributor

youennf commented Nov 19, 2024

It would be nice for a web application to know when the settings of a track actually kicks in for enqueued VideoFrames in MSTP.

For some properties like size, VideoFrame object already has this info.
For plenty of settings, this is not the case (surface type, deviceId, all image settings)...

@youennf
Copy link
Contributor Author

youennf commented Nov 19, 2024

A first solution is to synchronise the events/promise resolution tasks with VideoFrame enqueuing tasks. Plus reusing the same task source.
That way MediaStreamTrack exposed settings apply to enqueued VideoFrames (as long as web page eagerly reads VideoFrames).

Another solution is to expose the settings in some other form.
For instance in VideoFrame directly (VideoFrameMetadata).
Or add a synchronisation mechanism between VideoFrame and MediaStreamTrack in case we do not want to expose all track settings in VideoFrameMetadata.

@jan-ivar
Copy link
Member

MSTP has a buffer. How do you plan to contend with maxBufferSize?

I agree specifying timing is good. However, I don't think we can give any meaningful synchronous guarantees, given the async nature of ReadableStreams. I'm not sure we should either. If we couple things too tightly, I worry JS won't be able to add a transform into a pipe without breaking things.

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

3 participants