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

Update configure methods to use a parallel queue to run the the configuration check support #721

Closed youennf closed 9 months ago

youennf commented 9 months ago

Make close algorithm synchronously call the error callback and ensure the close algorithm is never called from a parallel queue. Update isConfigSupported to stop resolving the promise from a parallel queue.

This should partially fix https://github.com/w3c/webcodecs/issues/719.


Preview | Diff

youennf commented 9 months ago

This PR is changing configure to do the configuration check from the codec work queue. Assignment of [[codec implementation]] is now done in the codec work queue, while previously it was made from the JS thread. I am not sure why this was written this way. Does somebody know why it was done so?

I also added if needed since we might not always want to create a new [[codec implementation]] each time configure is called (say only bitrate is changing for instance).