From 16ac35aaa9cddafba90abacea388ff409cbd1f2f Mon Sep 17 00:00:00 2001 From: Bernard Aboba Date: Wed, 1 Mar 2023 15:44:10 -0800 Subject: [PATCH 1/2] Add EventHandler for Encoder/Decoder changes Fixes https://github.com/w3c/webcodecs/issues/604 Work-in-progress, do not merge. --- index.src.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.src.html b/index.src.html index da0fcc9c..baab2e55 100644 --- a/index.src.html +++ b/index.src.html @@ -262,6 +262,7 @@ readonly attribute CodecState state; readonly attribute unsigned long decodeQueueSize; attribute EventHandler ondequeue; + attribute EventHandler onDecoderChange; undefined configure(AudioDecoderConfig config); undefined decode(EncodedAudioChunk chunk); @@ -589,6 +590,7 @@ readonly attribute CodecState state; readonly attribute unsigned long decodeQueueSize; attribute EventHandler ondequeue; + attribute EventHandler onDecoderChange; undefined configure(VideoDecoderConfig config); undefined decode(EncodedVideoChunk chunk); @@ -943,6 +945,7 @@ readonly attribute CodecState state; readonly attribute unsigned long encodeQueueSize; attribute EventHandler ondequeue; + attribute EventHandler onEncoderChange; undefined configure(AudioEncoderConfig config); undefined encode(AudioData data); @@ -1316,6 +1319,7 @@ readonly attribute CodecState state; readonly attribute unsigned long encodeQueueSize; attribute EventHandler ondequeue; + attribute EventHandler onEncoderChange; undefined configure(VideoEncoderConfig config); undefined encode(VideoFrame frame, optional VideoEncoderEncodeOptions options = {}); From 91ba3b2527fa61738b148d7ae43cf88a8fdd1dd6 Mon Sep 17 00:00:00 2001 From: Bernard Aboba Date: Wed, 1 Mar 2023 15:52:55 -0800 Subject: [PATCH 2/2] Add EventHandler definitions --- index.src.html | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/index.src.html b/index.src.html index baab2e55..94f6fffe 100644 --- a/index.src.html +++ b/index.src.html @@ -354,7 +354,10 @@ : dequeue :: Fired at the {{AudioDecoder}} when the {{AudioDecoder/decodeQueueSize}} has decreased. - + +: onDecoderChange +:: Fired at the {{AudioDecoder}} when the {{AudioDecoder/powerEfficient}} or + {{AudioDecoder/decoderId}} value changes. Methods {#audiodecoder-methods} ------------------------------- @@ -686,6 +689,10 @@ : dequeue :: Fired at the {{VideoDecoder}} when the {{VideoDecoder/decodeQueueSize}} has decreased. + +: onDecoderChange +:: Fired at the {{VideoDecoder}} when the {{VideoDecoder/powerEfficient}} or + {{VideoDecoder/decoderId}} value changes. Methods {#videodecoder-methods} ------------------------------- @@ -1041,6 +1048,10 @@ : dequeue :: Fired at the {{AudioEncoder}} when the {{AudioEncoder/encodeQueueSize}} has decreased. + +: onEncoderChange +:: Fired at the {{AudioEncoder}} when the {{AudioEncoder/powerEfficient}} or + {{AudioEncoder/decoderId}} value changes. Methods {#audioencoder-methods} ------------------------------- @@ -1415,6 +1426,10 @@ : dequeue :: Fired at the {{VideoEncoder}} when the {{VideoEncoder/encodeQueueSize}} has decreased. + +: onEncoderChange +:: Fired at the {{VideoEncoder}} when the {{VideoEncoder/powerEfficient}} or + {{VideoEncoder/decoderId}} value changes. Methods {#videoencoder-methods} -------------------------------