w3c / webcodecs

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

The encoder/decoder configure methods is not using a queue to check for configuration support #719

Closed youennf closed 9 months ago

youennf commented 9 months ago

Following on https://github.com/web-platform-tests/interop/issues/382#issuecomment-1731669384 and https://github.com/web-platform-tests/wpt/pull/42127, we could improve the spec related to the configure methods.

In particular:

Other editorial notes while reading the spec (probably applicable to all decoders/encoders) :

youennf commented 9 months ago

@dalecurtis, I filed this issue following on our WPT test discussions. Let me know if that aligns with your thoughts. I can also submit the corresponding PR(s) if that helps.

dalecurtis commented 9 months ago

I'm not sure about [[codec saturated]] since that might have performance implications, but the rest sgtm and matches what our implementation (after the recent fixes). Your help with the PRs would be most welcome, thanks!

youennf commented 9 months ago

Additional remark related to [[codec implementation]]as spec says it should only be used from the [[codec queue]]. But the spec currently signals or clears [[codec implementation]] from reset/close algorithms, which can be called from JS directly, without queueing a task to the [[codec queue]].