diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /testing/web-platform/tests/interfaces/webrtc-encoded-transform.idl | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/interfaces/webrtc-encoded-transform.idl')
-rw-r--r-- | testing/web-platform/tests/interfaces/webrtc-encoded-transform.idl | 128 |
1 files changed, 128 insertions, 0 deletions
diff --git a/testing/web-platform/tests/interfaces/webrtc-encoded-transform.idl b/testing/web-platform/tests/interfaces/webrtc-encoded-transform.idl new file mode 100644 index 0000000000..59710bf46c --- /dev/null +++ b/testing/web-platform/tests/interfaces/webrtc-encoded-transform.idl @@ -0,0 +1,128 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content was automatically extracted by Reffy into webref +// (https://github.com/w3c/webref) +// Source: WebRTC Encoded Transform (https://w3c.github.io/webrtc-encoded-transform/) + +typedef (SFrameTransform or RTCRtpScriptTransform) RTCRtpTransform; + +// New methods for RTCRtpSender and RTCRtpReceiver +partial interface RTCRtpSender { + attribute RTCRtpTransform? transform; +}; + +partial interface RTCRtpReceiver { + attribute RTCRtpTransform? transform; +}; + +enum SFrameTransformRole { + "encrypt", + "decrypt" +}; + +dictionary SFrameTransformOptions { + SFrameTransformRole role = "encrypt"; +}; + +typedef [EnforceRange] unsigned long long SmallCryptoKeyID; +typedef (SmallCryptoKeyID or bigint) CryptoKeyID; + +[Exposed=(Window,DedicatedWorker)] +interface SFrameTransform { + constructor(optional SFrameTransformOptions options = {}); + Promise<undefined> setEncryptionKey(CryptoKey key, optional CryptoKeyID keyID); + attribute EventHandler onerror; +}; +SFrameTransform includes GenericTransformStream; + +enum SFrameTransformErrorEventType { + "authentication", + "keyID", + "syntax" +}; + +[Exposed=(Window,DedicatedWorker)] +interface SFrameTransformErrorEvent : Event { + constructor(DOMString type, SFrameTransformErrorEventInit eventInitDict); + + readonly attribute SFrameTransformErrorEventType errorType; + readonly attribute CryptoKeyID? keyID; + readonly attribute any frame; +}; + +dictionary SFrameTransformErrorEventInit : EventInit { + required SFrameTransformErrorEventType errorType; + required any frame; + CryptoKeyID? keyID; +}; + +// New enum for video frame types. Will eventually re-use the equivalent defined +// by WebCodecs. +enum RTCEncodedVideoFrameType { + "empty", + "key", + "delta", +}; + +dictionary RTCEncodedVideoFrameMetadata { + unsigned long long frameId; + sequence<unsigned long long> dependencies; + unsigned short width; + unsigned short height; + unsigned long spatialIndex; + unsigned long temporalIndex; + unsigned long synchronizationSource; + octet payloadType; + sequence<unsigned long> contributingSources; + long long timestamp; // microseconds +}; + +// New interfaces to define encoded video and audio frames. Will eventually +// re-use or extend the equivalent defined in WebCodecs. +[Exposed=(Window,DedicatedWorker)] +interface RTCEncodedVideoFrame { + readonly attribute RTCEncodedVideoFrameType type; + readonly attribute unsigned long timestamp; + attribute ArrayBuffer data; + RTCEncodedVideoFrameMetadata getMetadata(); +}; + +dictionary RTCEncodedAudioFrameMetadata { + unsigned long synchronizationSource; + octet payloadType; + sequence<unsigned long> contributingSources; + short sequenceNumber; +}; + +[Exposed=(Window,DedicatedWorker)] +interface RTCEncodedAudioFrame { + readonly attribute unsigned long timestamp; + attribute ArrayBuffer data; + RTCEncodedAudioFrameMetadata getMetadata(); +}; + +[Exposed=DedicatedWorker] +interface RTCTransformEvent : Event { + readonly attribute RTCRtpScriptTransformer transformer; +}; + +partial interface DedicatedWorkerGlobalScope { + attribute EventHandler onrtctransform; +}; + +[Exposed=DedicatedWorker] +interface RTCRtpScriptTransformer { + readonly attribute ReadableStream readable; + readonly attribute WritableStream writable; + readonly attribute any options; + Promise<unsigned long long> generateKeyFrame(optional DOMString rid); + Promise<undefined> sendKeyFrameRequest(); +}; + +[Exposed=Window] +interface RTCRtpScriptTransform { + constructor(Worker worker, optional any options, optional sequence<object> transfer); +}; + +partial interface RTCRtpSender { + Promise<undefined> generateKeyFrame(optional sequence <DOMString> rids); +}; |