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
{{ message }}
Repository navigation
How decodeQueueSize and encodeQueueSize behave will introduce web compatibility issues, and need to be better defined. #864
Whenever decode() or encode() is called, we are to increase respectively decodeQueueSize or encodeQueueSize and enqueue a control message while immediately processing the control message.
If the codec is saturated, then we are to abort.
However "Codec Saturation" is defined as:
**_Codec Saturation
The state of an underlying codec implementation where the number of active decoding or encoding requests has reached an implementation specific maximum such that it is temporarily unable to accept more work. The maximum may be any value greater than 1, including infinity (no maximum). While saturated, additional calls to decode() or encode() will be buffered in the control message queue, and will increment the respective decodeQueuSize and encodeQueueSize attributes. The codec implementation will become unsaturated after making sufficient progress on the current workload._**
If a UA choose for a maximum a value of infinity; a side effect is that decodeQueueSize and encodeQueueSize will only ever be observed with a value of 0.
If the UA chose to have an unlimited queue and decodeQueueSize be always 0, then such rate limitation will be ineffective.
In the demo above, this causes the ring buffer to become full almost instantly and decoded audio frames are all dropped, and playback never progress.
While it's obviously an issue in this reference player itself, it will be used by others as an example (I already know of a few parties that based their work on it)
changed the title [-]How decodeQueueSize and encodeQueueSize behaves will introduce web compatibility issues, and need to be better defined.[/-][+]How decodeQueueSize and encodeQueueSize behave will introduce web compatibility issues, and need to be better defined.[/+]on Dec 12, 2024
Activity
[-]How decodeQueueSize and encodeQueueSize behaves will introduce web compatibility issues, and need to be better defined.[/-][+]How decodeQueueSize and encodeQueueSize behave will introduce web compatibility issues, and need to be better defined.[/+][WebCodecs] Limit the number of codec operations we can enqueue
[WebCodecs] Limit the number of codec operations we can enqueue