Skip to content

Commit

Permalink
Expose 'RTCEncodedVideoFrame' and 'RTCEncodedAudioFrame' to 'Window'
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=264687
rdar://problem/118607685

Reviewed by Youenn Fablet.

This patch aligns WebKit with web-specification [1], [2] and expose both
interfaces to 'Window' alongside 'DedicatedWorker'.

[1] https://w3c.github.io/webrtc-encoded-transform/#RTCEncodedAudioFrame-interface
[2] https://w3c.github.io/webrtc-encoded-transform/#RTCEncodedVideoFrame-interface

* Source/WebCore/Modules/mediastream/RTCEncodedAudioFrame.idl:
* Source/WebCore/Modules/mediastream/RTCEncodedVideoFrame.idl:
* LayoutTests/imported/w3c/web-platform-tests/webrtc-encoded-transform/idlharness.https.window-expected.txt: Rebaselined

Canonical link: https://commits.webkit.org/280198@main
  • Loading branch information
Ahmad Saleem committed Jun 20, 2024
1 parent 847b2a7 commit b6d3b63
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,25 @@ PASS SFrameTransformErrorEvent interface: existence and properties of interface
PASS SFrameTransformErrorEvent interface: attribute errorType
FAIL SFrameTransformErrorEvent interface: attribute keyID assert_true: The prototype object must have a property "keyID" expected true got false
FAIL SFrameTransformErrorEvent interface: attribute frame assert_true: The prototype object must have a property "frame" expected true got false
FAIL RTCEncodedVideoFrame interface: existence and properties of interface object assert_own_property: self does not have own property "RTCEncodedVideoFrame" expected property "RTCEncodedVideoFrame" missing
FAIL RTCEncodedVideoFrame interface object length assert_own_property: self does not have own property "RTCEncodedVideoFrame" expected property "RTCEncodedVideoFrame" missing
FAIL RTCEncodedVideoFrame interface object name assert_own_property: self does not have own property "RTCEncodedVideoFrame" expected property "RTCEncodedVideoFrame" missing
FAIL RTCEncodedVideoFrame interface: existence and properties of interface prototype object assert_own_property: self does not have own property "RTCEncodedVideoFrame" expected property "RTCEncodedVideoFrame" missing
FAIL RTCEncodedVideoFrame interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "RTCEncodedVideoFrame" expected property "RTCEncodedVideoFrame" missing
FAIL RTCEncodedVideoFrame interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "RTCEncodedVideoFrame" expected property "RTCEncodedVideoFrame" missing
FAIL RTCEncodedVideoFrame interface: attribute type assert_own_property: self does not have own property "RTCEncodedVideoFrame" expected property "RTCEncodedVideoFrame" missing
FAIL RTCEncodedVideoFrame interface: attribute timestamp assert_own_property: self does not have own property "RTCEncodedVideoFrame" expected property "RTCEncodedVideoFrame" missing
FAIL RTCEncodedVideoFrame interface: attribute data assert_own_property: self does not have own property "RTCEncodedVideoFrame" expected property "RTCEncodedVideoFrame" missing
FAIL RTCEncodedVideoFrame interface: operation getMetadata() assert_own_property: self does not have own property "RTCEncodedVideoFrame" expected property "RTCEncodedVideoFrame" missing
FAIL RTCEncodedAudioFrame interface: existence and properties of interface object assert_own_property: self does not have own property "RTCEncodedAudioFrame" expected property "RTCEncodedAudioFrame" missing
FAIL RTCEncodedAudioFrame interface object length assert_own_property: self does not have own property "RTCEncodedAudioFrame" expected property "RTCEncodedAudioFrame" missing
FAIL RTCEncodedAudioFrame interface object name assert_own_property: self does not have own property "RTCEncodedAudioFrame" expected property "RTCEncodedAudioFrame" missing
FAIL RTCEncodedAudioFrame interface: existence and properties of interface prototype object assert_own_property: self does not have own property "RTCEncodedAudioFrame" expected property "RTCEncodedAudioFrame" missing
FAIL RTCEncodedAudioFrame interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "RTCEncodedAudioFrame" expected property "RTCEncodedAudioFrame" missing
FAIL RTCEncodedAudioFrame interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "RTCEncodedAudioFrame" expected property "RTCEncodedAudioFrame" missing
FAIL RTCEncodedAudioFrame interface: attribute timestamp assert_own_property: self does not have own property "RTCEncodedAudioFrame" expected property "RTCEncodedAudioFrame" missing
FAIL RTCEncodedAudioFrame interface: attribute data assert_own_property: self does not have own property "RTCEncodedAudioFrame" expected property "RTCEncodedAudioFrame" missing
FAIL RTCEncodedAudioFrame interface: operation getMetadata() assert_own_property: self does not have own property "RTCEncodedAudioFrame" expected property "RTCEncodedAudioFrame" missing
PASS RTCEncodedVideoFrame interface: existence and properties of interface object
PASS RTCEncodedVideoFrame interface object length
PASS RTCEncodedVideoFrame interface object name
PASS RTCEncodedVideoFrame interface: existence and properties of interface prototype object
PASS RTCEncodedVideoFrame interface: existence and properties of interface prototype object's "constructor" property
PASS RTCEncodedVideoFrame interface: existence and properties of interface prototype object's @@unscopables property
PASS RTCEncodedVideoFrame interface: attribute type
PASS RTCEncodedVideoFrame interface: attribute timestamp
PASS RTCEncodedVideoFrame interface: attribute data
PASS RTCEncodedVideoFrame interface: operation getMetadata()
PASS RTCEncodedAudioFrame interface: existence and properties of interface object
PASS RTCEncodedAudioFrame interface object length
PASS RTCEncodedAudioFrame interface object name
PASS RTCEncodedAudioFrame interface: existence and properties of interface prototype object
PASS RTCEncodedAudioFrame interface: existence and properties of interface prototype object's "constructor" property
PASS RTCEncodedAudioFrame interface: existence and properties of interface prototype object's @@unscopables property
PASS RTCEncodedAudioFrame interface: attribute timestamp
PASS RTCEncodedAudioFrame interface: attribute data
PASS RTCEncodedAudioFrame interface: operation getMetadata()
PASS RTCTransformEvent interface: existence and properties of interface object
PASS RTCRtpScriptTransformer interface: existence and properties of interface object
PASS RTCRtpScriptTransform interface: existence and properties of interface object
Expand Down
8 changes: 6 additions & 2 deletions Source/WebCore/Modules/mediastream/RTCEncodedAudioFrame.idl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020 Apple Inc. All rights reserved.
* Copyright (C) 2020-2024 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand All @@ -23,6 +23,8 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/

// https://w3c.github.io/webrtc-encoded-transform/#RTCEncodedAudioFrameMetadata

[
Conditional=WEB_RTC,
JSGenerateToJSObject,
Expand All @@ -32,10 +34,12 @@ dictionary RTCEncodedAudioFrameMetadata {
sequence<unsigned long> contributingSources;
};

// https://w3c.github.io/webrtc-encoded-transform/#RTCEncodedAudioFrame-interface

[
Conditional=WEB_RTC,
EnabledBySetting=WebRTCEncodedTransformEnabled,
Exposed=DedicatedWorker,
Exposed=(Window,DedicatedWorker),
] interface RTCEncodedAudioFrame {
readonly attribute unsigned long long timestamp;
attribute ArrayBuffer data;
Expand Down
10 changes: 8 additions & 2 deletions Source/WebCore/Modules/mediastream/RTCEncodedVideoFrame.idl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020 Apple Inc. All rights reserved.
* Copyright (C) 2020-2024 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand All @@ -23,8 +23,12 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/

// https://w3c.github.io/webrtc-encoded-transform/#RTCEncodedVideoFrameType

enum RTCEncodedVideoFrameType { "empty", "key", "delta" };

// // https://w3c.github.io/webrtc-encoded-transform/#RTCEncodedVideoFrameMetadata

[
Conditional=WEB_RTC,
JSGenerateToJSObject,
Expand All @@ -41,10 +45,12 @@ dictionary RTCEncodedVideoFrameMetadata {
// sequence<unsigned long> contributingSources;
};

// https://w3c.github.io/webrtc-encoded-transform/#RTCEncodedVideoFrame-interface

[
Conditional=WEB_RTC,
EnabledBySetting=WebRTCEncodedTransformEnabled,
Exposed=DedicatedWorker,
Exposed=(Window,DedicatedWorker),
] interface RTCEncodedVideoFrame {
readonly attribute RTCEncodedVideoFrameType type;
readonly attribute unsigned long long timestamp;
Expand Down

0 comments on commit b6d3b63

Please sign in to comment.