Re: [webrtc-insertable-streams] Optimizing encoded frame buffer allocation and memory copies (#49)

For the readable stream, if you make it a readable byte stream, then you get all the reduced-copy mechanisms automatically.

For writable stream, you could transfer the array buffer the moment it is written to the underlying sink, which then allows the browser code to take ownership of the underlying data and use it directly. For this, you don't need the (mostly-defunct) https://github.com/domenic/proposal-arraybuffer-transfer, which is about exposing the primitive to JavaScript. Instead, you can do it on a spec/implementation level, using https://streams.spec.whatwg.org/#transfer-array-buffer

-- 
GitHub Notification of comment by domenic
Please view or discuss this issue at https://github.com/w3c/webrtc-insertable-streams/issues/49#issuecomment-735998694 using your GitHub account


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

Received on Monday, 30 November 2020 19:40:12 UTC