Re: [mediacapture-transform] MSTP's VideoFrame lifetime management model assumes a single consumer (#56)

> How would MSTP know when it was safe to close() the frame. Is the idea that you allow a single pass of the main thread to use the frame after its read from the ReadableStream? I'm not immediately sure if that is architecturally (from streams spec pov) feasible. Such a design would also have footguns.

A proposed alternative for VideoFrame exposure to MediaStreamTrack is to have a callback which returns a promise. Video Frame is closed when promise is settled.
Translated to WebCodecs, that would mean VideoFrameOutputCallback returning a promise. This would introduce backpressure to WebCodecs which is a nice feature provided by streams.
With that model, there is no need for MSTG to automatically call close.

-- 
GitHub Notification of comment by youennf
Please view or discuss this issue at https://github.com/w3c/mediacapture-transform/issues/56#issuecomment-898332741 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 13 August 2021 09:43:02 UTC