Re: [mediacapture-transform] Memory management for incoming frames (#6)

For the case where apps are reading fast enough and simply want to drop some of the frames, Harald and Guido gave a good summary on how to release the frame. The method is now called close() (was destroy()). https://github.com/w3c/webrtc-encoded-transform/issues/99#issuecomment-824494217 has some additional details.

Also, for the case where apps are _not_ reading fast enough, the MediaStreamTrackProcessorInit now includes a [maxBufferSize argument](https://w3c.github.io/mediacapture-transform/#dom-mediastreamtrackprocessorinit-maxbuffersize) that gives the app control over the frame dropping behavior. The queue lives inside the MediaStreamTrackProcessor and it's oldest item is dequeued to satisfy read requests from the ReadableStream. If the arrival of a new frame would cause the queue to exceed maxBufferSize, the oldest item in the queue is dropped prior to enqueueing the newest arrival. 

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


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

Received on Thursday, 22 April 2021 18:18:50 UTC