You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently our APIs for reading out payload bytes & Header Extension bytes just pass an ArrayBuffer, but this requires new buffers to be allocated and GCed for every interaction, a cost which adds up at the frequencies & data volumes we're looking at. A bring-your-own-buffer approach would allow apps to maintain their own buffer pools, potentially even directly writing into a WASM memory block, thus avoiding another copy.
Currently our APIs for reading out payload bytes & Header Extension bytes just pass an ArrayBuffer, but this requires new buffers to be allocated and GCed for every interaction, a cost which adds up at the frequencies & data volumes we're looking at. A bring-your-own-buffer approach would allow apps to maintain their own buffer pools, potentially even directly writing into a WASM memory block, thus avoiding another copy.
WebCodecs has taken this approach with all interfaces have a
copyTo(AllowSharedBufferSource destination);
method - eg seehttps://www.w3.org/TR/webcodecs/#ref-for-dom-encodedaudiochunk-copyto.
I suggest we follow this pattern for RTCRtpPacket.payload and RTCRtpHeaderExtension.value.
The text was updated successfully, but these errors were encountered: