w3c / webcodecs

WebCodecs is a flexible web API for encoding and decoding audio and video.
https://w3c.github.io/webcodecs/
Other
971 stars 136 forks source link

Support Serialization with forStorage=true #291

Open chcunningham opened 3 years ago

chcunningham commented 3 years ago

VideoFrame and AudioData don't currently'support forStorage=true.

@padenot mentioned that apps will want this https://github.com/w3c/webcodecs/pull/286/files/01117f8cd1ab2fe293991e4cdc27ab5811f20781#r656313078

sandersdan commented 3 years ago

The main reason this wasn't implemented in Chrome's version is that hardware-backed frames don't behave exactly the same when deserialized after a readback, and also it requires synchronous readback during serialization. This is not so much a problem for AudioFrame (and is probably a UA quality-of-implementation issue for VideoFrame).

The most direct comparisons are ImageBitmap (can be stored) and ArrayBuffer (can be stored unless it is a SharedArrayBuffer).

ChunMinChang commented 1 year ago

It seems this conflicts with #590. Is this request still needed?