mediacapture-transform icon indicating copy to clipboard operation
mediacapture-transform copied to clipboard

Memory locality

Open aboba opened this issue 3 years ago • 1 comments

@padenot is proposing a change to the WebCodecs API to improve memory locality. I would like to understand if this has any implications for Mediacapture-transform.

Currently, VideoFrame buffers can be released by calling close(), which will typically happen after they have been used as input (e.g. in WebCodecs encoder). Once released, VideoFrame buffers can presumably be reused, at the implementation's discretion. It therefore isn't clear to me whether there a way for mediacapture-transform to make use of the additional WebCodecs arguments that are being proposed. For example, would a BYOB reader be helpful?

aboba avatar May 03 '21 23:05 aboba

Copying a bit of my comment from the WC bug:

Re: capture, this too uses pooling internally. See here for an overview of the IPC API that dishes out buffers and to observers (render processes) which then release them at some later point.

To the core question raised, I'm not sure yet. Waiting to see some rough psuedo code.

chcunningham avatar May 04 '21 02:05 chcunningham