Re: [webrtc-encoded-transform] Encoded frame IDLs share definitions with WebCodecs (#99)

> The spec encourages users to close() immediately when they no longer need the frame (and Chrome actually warns users if it GC's a frame that wasn't closed()). I'm adding further clarity to the ref-counting behavior in [w3c/webcodecs#167](https://github.com/w3c/webcodecs/pull/167).

This is the kind of things I am worried.
It would be nice to have most web dev flows not needing to call close(), enqueuing a frame in a sink can call close() directly. 
That will make web pages actually call clone() when they really need to.
But this is really outside the scope of this current thread.

I think I agree with you on raw frames vs. encoded frames.
It is nice if the same model applies to both frames but this is not a must.

> With the Encoded*Chunk readInto() PR, this entails one copy when reading from the encoder output. I think it strikes a good balance between keeping I/O types immutable (making it easy to reason about TOCTOU issues) and not being too onerous.

Making it easy to reason about TOCTOU issues is mostly a concern from browser implementors.
We just need to make sure that a packetizer or a decoder will not read data that can be modified by JS during its processing.
Transferring data like done in WebRTC encoded transform spec solves this issue AFAIUI.

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


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

Received on Monday, 26 April 2021 19:05:37 UTC