Re: [whatwg/streams] Allow web devs to synchronize branches with tee()? (#1157)

{ synchronized: true} would slow down the fastest consumer which is undesirable in a realtime video pipeline.
The slow consumer also probably wants to process the freshest frame consumed by the fast consumer.

If we look at what happens in existing native pipelines like 'render local + encode local', frames are being dropped as needed by both renderer and encoder.

> That was assuming that you wanted to drop frames mid-stream, which was a misunderstanding on my part.

I believe this is what we actually want in our use case.

> a frame-dropper transform seems like it should be able to coexist well with a `tee({synchronized: true})` option.

I do not see how that would work without custom resynchronisation between the two consumers.
We cannot expect one consumer to always be the slow one.
Also, as a real example and getting back to 'render local + encode local', rendering may stop pulling frames in case user switches to another tab, but encode is of course expected to continue.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/1157#issuecomment-894110215

Received on Friday, 6 August 2021 08:51:59 UTC