Intent to Implement and Ship: WebCodecs dequeue event

188 views
Skip to first unread message

Chris Cunningham

unread,
Aug 5, 2022, 4:38:30 PM8/5/22
to blink-dev

Contact emails

chcunn...@chromium.org

Explainer

https://github.com/w3c/webcodecs/blob/main/explainer.md

Specification

https://w3c.github.io/webcodecs

Summary

This feature tracks adding a single event named "dequeue" and event handler to the audio and video encoder and decoder interfaces (e.g. AudioDecoder.ondequeue).

Authors initially queue up encoding or decoding work by calling encode() or decode() respectively. The new "dequeue" event is fired to indicate when the underlying codec has ingested some/all of the queued work. The decrease in the queue size is already reflected by a lower value of encoder.encodeQueueSize and decoder.decodeQueueSize attributes. The new event eliminates the need for authors to setTimeout() poll to determine when the queue has decreased (i.e. when they should queue up more work).

See mentions of "dequeue" in the WebCodecs specification https://w3c.github.io/webcodecs/#audiodecoder-event-summary



Blink component

Blink>Media>WebCodecs

TAG review

https://github.com/w3ctag/design-reviews/issues/612 
Note that TAG did not review this new "dequeue" event specifically.

TAG review status

Issues addressed

Risks



Interoperability and Compatibility

Low risk. At present Chromium is the only implementer of WebCodecs generally. This is a minor addition to WebCodecs APIs that should be straightforward for future implementers to incorporate. The spec change to add this event was approved by representatives from Edge and Firefox. https://github.com/w3c/webcodecs/pull/439



Gecko: Positive (https://github.com/mozilla/standards-positions/issues/209) Firefox is helping co-edit spec (Paul Adenot)

WebKit: No signal Expressed mixed interest/concerns. https://lists.webkit.org/pipermail/webkit-dev/2020-May/031191.html https://lists.webkit.org/pipermail/webkit-dev/2021-February/031691.html

Web developers: Strongly positive 
See blurbs from OT participants at the bottom of the I2S.

Other signals: Edge: Positive, co-editing the spec (Bernard Aboba)

Ergonomics

No risks



Activation

No risks



Security

No risks



WebView application risks

No risks.



Debuggability

The event may be debugged in typical fashion by setting breakpoints or logging in the event handler.



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests?

Yes

Requires code in //chrome?

False

Tracking bug

https://crbug.com/1341116

Non-OSS dependencies

No dependencies.


Estimated milestones

105


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5195706034290688

This intent message was generated by Chrome Platform Status.

Philip Jägenstedt

unread,
Aug 5, 2022, 6:03:02 PM8/5/22
to Chris Cunningham, blink-dev
LGTM1, seems like a simple and useful addition!

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CALG6eSrkzPiW8tconoPnduyaY%3DZSPHSFE6djL6kcDWHsk%3DtnrA%40mail.gmail.com.

Mike West

unread,
Aug 9, 2022, 4:16:41 AM8/9/22
to Philip Jägenstedt, Chris Cunningham, blink-dev
LGTM2. I agree with Philip's suggestion that this is a small change that doesn't require running Web Codecs back through TAG review, and that the continued support of an editor at Mozilla is sufficient to consider their position on the underlying API unchanged.

-mike


Yoav Weiss

unread,
Aug 9, 2022, 4:33:42 AM8/9/22
to Mike West, Philip Jägenstedt, Chris Cunningham, blink-dev

Chris Cunningham

unread,
Aug 9, 2022, 1:38:39 PM8/9/22
to Yoav Weiss, Mike West, Philip Jägenstedt, blink-dev
Thanks everyone!

Kevin Baving

unread,
Jan 26, 2023, 5:59:39 PM1/26/23
to blink-dev, chcunn...@chromium.org
Hey is the ondequeue already published?

-kevin

Dale Curtis

unread,
Jan 26, 2023, 6:14:20 PM1/26/23
to Kevin Baving, blink-dev, chcunn...@chromium.org

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
Reply all
Reply to author
Forward
0 new messages