Diff
Modified: trunk/LayoutTests/ChangeLog (266697 => 266698)
--- trunk/LayoutTests/ChangeLog 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/LayoutTests/ChangeLog 2020-09-07 12:37:37 UTC (rev 266698)
@@ -1,3 +1,12 @@
+2020-09-07 Youenn Fablet <[email protected]>
+
+ Add missing members to RTCIceCandidate
+ https://bugs.webkit.org/show_bug.cgi?id=216075
+
+ Reviewed by Eric Carlson.
+
+ * fast/mediastream/RTCPeerConnection-icecandidate-event-expected.txt:
+
2020-09-07 Sergio Villar Senin <[email protected]>
[css-flex] Allow indefinite size flex items to be definite wrt resolving percentages inside them
Modified: trunk/LayoutTests/fast/mediastream/RTCPeerConnection-icecandidate-event-expected.txt (266697 => 266698)
--- trunk/LayoutTests/fast/mediastream/RTCPeerConnection-icecandidate-event-expected.txt 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/LayoutTests/fast/mediastream/RTCPeerConnection-icecandidate-event-expected.txt 2020-09-07 12:37:37 UTC (rev 266698)
@@ -9,17 +9,17 @@
PASS candidate instanceof RTCIceCandidate is true
PASS candidate.sdpMLineIndex is 0
FAIL candidate.sdpMid should be null (of type object). Was 1 (of type string).
-PASS candidate.candidate: 2013266431 1 udp 2013266432 192.168.0.100 38838 typ host generation 0
+PASS candidate.candidate: candidate:2013266431 1 udp 2013266432 192.168.0.100 38838 typ host generation 0
PASS Got candidate
PASS candidate instanceof RTCIceCandidate is true
PASS candidate.sdpMLineIndex is 0
FAIL candidate.sdpMid should be null (of type object). Was 1 (of type string).
-PASS candidate.candidate: 1019216383 1 tcp 1019216384 192.168.0.100 9 typ host tcptype passive generation 0
+PASS candidate.candidate: candidate:1019216383 1 tcp 1019216384 192.168.0.100 9 typ host tcptype passive generation 0
PASS Got candidate
PASS candidate instanceof RTCIceCandidate is true
PASS candidate.sdpMLineIndex is 0
FAIL candidate.sdpMid should be null (of type object). Was 1 (of type string).
-PASS candidate.candidate: 1677722111 1 tcp 1677722112 172.18.0.1 47989 typ srflx raddr 192.168.0.100 rport 47989 generation 0
+PASS candidate.candidate: candidate:1677722111 1 tcp 1677722112 172.18.0.1 47989 typ srflx raddr 192.168.0.100 rport 47989 generation 0
PASS Got end of candidates
PASS candidate is null
PASS successfullyParsed is true
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (266697 => 266698)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2020-09-07 12:37:37 UTC (rev 266698)
@@ -1,3 +1,14 @@
+2020-09-07 Youenn Fablet <[email protected]>
+
+ Add missing members to RTCIceCandidate
+ https://bugs.webkit.org/show_bug.cgi?id=216075
+
+ Reviewed by Eric Carlson.
+
+ * web-platform-tests/webrtc/RTCIceCandidate-constructor-expected.txt:
+ * web-platform-tests/webrtc/RTCIceCandidate-constructor.html:
+ * web-platform-tests/webrtc/idlharness.https.window-expected.txt:
+
2020-09-07 Sergio Villar Senin <[email protected]>
[css-flex] Allow indefinite size flex items to be definite wrt resolving percentages inside them
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCIceCandidate-constructor-expected.txt (266697 => 266698)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCIceCandidate-constructor-expected.txt 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCIceCandidate-constructor-expected.txt 2020-09-07 12:37:37 UTC (rev 266698)
@@ -6,15 +6,15 @@
PASS new RTCIceCandidate({ candidate: '' })
PASS new RTCIceCandidate({ candidate: null })
PASS new RTCIceCandidate({ ... }) with valid candidate string only
-FAIL new RTCIceCandidate({ sdpMid: 'audio' }) assert_equals: usernameFragment expected (object) null but got (undefined) undefined
-FAIL new RTCIceCandidate({ sdpMLineIndex: 0 }) assert_equals: usernameFragment expected (object) null but got (undefined) undefined
-FAIL new RTCIceCandidate({ sdpMid: 'audio', sdpMLineIndex: 0 }) assert_equals: usernameFragment expected (object) null but got (undefined) undefined
-FAIL new RTCIceCandidate({ candidate: '', sdpMid: 'audio' } assert_equals: usernameFragment expected (object) null but got (undefined) undefined
-FAIL new RTCIceCandidate({ candidate: '', sdpMLineIndex: 0 } assert_equals: usernameFragment expected (object) null but got (undefined) undefined
-FAIL new RTCIceCandidate({ ... }) with valid candidate string and sdpMid assert_equals: usernameFragment expected (object) null but got (undefined) undefined
-FAIL new RTCIceCandidate({ ... }) with invalid candidate string and sdpMid assert_equals: usernameFragment expected (object) null but got (undefined) undefined
-FAIL new RTCIceCandidate({ ... }) with nondefault values for all fields assert_equals: usernameFragment expected (string) "test" but got (undefined) undefined
-FAIL new RTCIceCandidate({ ... }) with nondefault values for all fields, tcp candidate assert_equals: usernameFragment expected (string) "user1" but got (undefined) undefined
-FAIL new RTCIceCandidate({ ... }) with invalid sdpMid assert_equals: usernameFragment expected (object) null but got (undefined) undefined
-FAIL new RTCIceCandidate({ ... }) with invalid sdpMLineIndex assert_equals: usernameFragment expected (object) null but got (undefined) undefined
+PASS new RTCIceCandidate({ sdpMid: 'audio' })
+PASS new RTCIceCandidate({ sdpMLineIndex: 0 })
+PASS new RTCIceCandidate({ sdpMid: 'audio', sdpMLineIndex: 0 })
+PASS new RTCIceCandidate({ candidate: '', sdpMid: 'audio' }
+PASS new RTCIceCandidate({ candidate: '', sdpMLineIndex: 0 }
+PASS new RTCIceCandidate({ ... }) with valid candidate string and sdpMid
+PASS new RTCIceCandidate({ ... }) with invalid candidate string and sdpMid
+PASS new RTCIceCandidate({ ... }) with nondefault values for all fields
+PASS new RTCIceCandidate({ ... }) with nondefault values for all fields, tcp candidate
+PASS new RTCIceCandidate({ ... }) with invalid sdpMid
+PASS new RTCIceCandidate({ ... }) with invalid sdpMLineIndex
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCIceCandidate-constructor.html (266697 => 266698)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCIceCandidate-constructor.html 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCIceCandidate-constructor.html 2020-09-07 12:37:37 UTC (rev 266698)
@@ -172,7 +172,7 @@
assert_equals(candidate.protocol, 'udp', 'protocol');
assert_equals(candidate.port, 58041, 'port');
assert_equals(candidate.type, 'host', 'type');
- assert_equals(candidate.tcpType, '', 'tcpType');
+ assert_equals(candidate.tcpType, null, 'tcpType');
assert_equals(candidate.relatedAddress, null, 'relatedAddress');
assert_equals(candidate.relatedPort, null, 'relatedPort');
}, 'new RTCIceCandidate({ ... }) with nondefault values for all fields');
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/idlharness.https.window-expected.txt (266697 => 266698)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/idlharness.https.window-expected.txt 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/idlharness.https.window-expected.txt 2020-09-07 12:37:37 UTC (rev 266698)
@@ -153,17 +153,17 @@
PASS RTCIceCandidate interface: attribute candidate
PASS RTCIceCandidate interface: attribute sdpMid
PASS RTCIceCandidate interface: attribute sdpMLineIndex
-FAIL RTCIceCandidate interface: attribute foundation assert_true: The prototype object must have a property "foundation" expected true got false
-FAIL RTCIceCandidate interface: attribute component assert_true: The prototype object must have a property "component" expected true got false
-FAIL RTCIceCandidate interface: attribute priority assert_true: The prototype object must have a property "priority" expected true got false
-FAIL RTCIceCandidate interface: attribute address assert_true: The prototype object must have a property "address" expected true got false
-FAIL RTCIceCandidate interface: attribute protocol assert_true: The prototype object must have a property "protocol" expected true got false
-FAIL RTCIceCandidate interface: attribute port assert_true: The prototype object must have a property "port" expected true got false
-FAIL RTCIceCandidate interface: attribute type assert_true: The prototype object must have a property "type" expected true got false
-FAIL RTCIceCandidate interface: attribute tcpType assert_true: The prototype object must have a property "tcpType" expected true got false
-FAIL RTCIceCandidate interface: attribute relatedAddress assert_true: The prototype object must have a property "relatedAddress" expected true got false
-FAIL RTCIceCandidate interface: attribute relatedPort assert_true: The prototype object must have a property "relatedPort" expected true got false
-FAIL RTCIceCandidate interface: attribute usernameFragment assert_true: The prototype object must have a property "usernameFragment" expected true got false
+PASS RTCIceCandidate interface: attribute foundation
+PASS RTCIceCandidate interface: attribute component
+PASS RTCIceCandidate interface: attribute priority
+PASS RTCIceCandidate interface: attribute address
+PASS RTCIceCandidate interface: attribute protocol
+PASS RTCIceCandidate interface: attribute port
+PASS RTCIceCandidate interface: attribute type
+PASS RTCIceCandidate interface: attribute tcpType
+PASS RTCIceCandidate interface: attribute relatedAddress
+PASS RTCIceCandidate interface: attribute relatedPort
+PASS RTCIceCandidate interface: attribute usernameFragment
PASS RTCIceCandidate interface: operation toJSON()
PASS RTCIceCandidate must be primary interface of new RTCIceCandidate({ sdpMid: 1 })
PASS Stringification of new RTCIceCandidate({ sdpMid: 1 })
@@ -170,17 +170,17 @@
PASS RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "candidate" with the proper type
PASS RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "sdpMid" with the proper type
PASS RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "sdpMLineIndex" with the proper type
-FAIL RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "foundation" with the proper type assert_inherits: property "foundation" not found in prototype chain
-FAIL RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "component" with the proper type assert_inherits: property "component" not found in prototype chain
-FAIL RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "priority" with the proper type assert_inherits: property "priority" not found in prototype chain
-FAIL RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "address" with the proper type assert_inherits: property "address" not found in prototype chain
-FAIL RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "protocol" with the proper type assert_inherits: property "protocol" not found in prototype chain
-FAIL RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "port" with the proper type assert_inherits: property "port" not found in prototype chain
-FAIL RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "type" with the proper type assert_inherits: property "type" not found in prototype chain
-FAIL RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "tcpType" with the proper type assert_inherits: property "tcpType" not found in prototype chain
-FAIL RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "relatedAddress" with the proper type assert_inherits: property "relatedAddress" not found in prototype chain
-FAIL RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "relatedPort" with the proper type assert_inherits: property "relatedPort" not found in prototype chain
-FAIL RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "usernameFragment" with the proper type assert_inherits: property "usernameFragment" not found in prototype chain
+PASS RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "foundation" with the proper type
+PASS RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "component" with the proper type
+PASS RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "priority" with the proper type
+PASS RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "address" with the proper type
+PASS RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "protocol" with the proper type
+PASS RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "port" with the proper type
+PASS RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "type" with the proper type
+PASS RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "tcpType" with the proper type
+PASS RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "relatedAddress" with the proper type
+PASS RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "relatedPort" with the proper type
+PASS RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "usernameFragment" with the proper type
PASS RTCIceCandidate interface: new RTCIceCandidate({ sdpMid: 1 }) must inherit property "toJSON()" with the proper type
PASS RTCIceCandidate interface: toJSON operation on new RTCIceCandidate({ sdpMid: 1 })
PASS RTCPeerConnectionIceEvent interface: existence and properties of interface object
Modified: trunk/Source/ThirdParty/libwebrtc/ChangeLog (266697 => 266698)
--- trunk/Source/ThirdParty/libwebrtc/ChangeLog 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/Source/ThirdParty/libwebrtc/ChangeLog 2020-09-07 12:37:37 UTC (rev 266698)
@@ -1,3 +1,14 @@
+2020-09-07 Youenn Fablet <[email protected]>
+
+ Add missing members to RTCIceCandidate
+ https://bugs.webkit.org/show_bug.cgi?id=216075
+
+ Reviewed by Eric Carlson.
+
+ * Configurations/libwebrtc.iOS.exp:
+ * Configurations/libwebrtc.iOSsim.exp:
+ * Configurations/libwebrtc.mac.exp:
+
2020-08-24 Youenn Fablet <[email protected]>
Enable VP9D_SET_LOOP_FILTER_OPT for libvpx vp9 decoder
Modified: trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp (266697 => 266698)
--- trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp 2020-09-07 12:37:37 UTC (rev 266698)
@@ -325,3 +325,6 @@
__ZN4webm10WebmParserD2Ev
__ZN4webm4swapERNS_10WebmParserES1_
__ZN10vp9_parser15Vp9HeaderParser23ParseUncompressedHeaderEPKhm
+__ZN6webrtc14ParseCandidateERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPN7cricket9CandidateEPNS_13SdpParseErrorEb
+__ZN7cricket27ICE_CANDIDATE_COMPONENT_RTPE
+__ZNK3rtc13SocketAddress5IsNilEv
Modified: trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp (266697 => 266698)
--- trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp 2020-09-07 12:37:37 UTC (rev 266698)
@@ -325,3 +325,6 @@
__ZN4webm10WebmParserD2Ev
__ZN4webm4swapERNS_10WebmParserES1_
__ZN10vp9_parser15Vp9HeaderParser23ParseUncompressedHeaderEPKhm
+__ZN6webrtc14ParseCandidateERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPN7cricket9CandidateEPNS_13SdpParseErrorEb
+__ZN7cricket27ICE_CANDIDATE_COMPONENT_RTPE
+__ZNK3rtc13SocketAddress5IsNilEv
Modified: trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp (266697 => 266698)
--- trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp 2020-09-07 12:37:37 UTC (rev 266698)
@@ -322,4 +322,7 @@
__ZN4webm10WebmParserD1Ev
__ZN4webm10WebmParserD2Ev
__ZN4webm4swapERNS_10WebmParserES1_
-__ZN10vp9_parser15Vp9HeaderParser23ParseUncompressedHeaderEPKhm
\ No newline at end of file
+__ZN10vp9_parser15Vp9HeaderParser23ParseUncompressedHeaderEPKhm
+__ZN6webrtc14ParseCandidateERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPN7cricket9CandidateEPNS_13SdpParseErrorEb
+__ZN7cricket27ICE_CANDIDATE_COMPONENT_RTPE
+__ZNK3rtc13SocketAddress5IsNilEv
Modified: trunk/Source/WebCore/CMakeLists.txt (266697 => 266698)
--- trunk/Source/WebCore/CMakeLists.txt 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/Source/WebCore/CMakeLists.txt 2020-09-07 12:37:37 UTC (rev 266698)
@@ -363,9 +363,13 @@
Modules/mediastream/RTCDtxStatus.idl
Modules/mediastream/RTCIceCandidate.idl
Modules/mediastream/RTCIceCandidateInit.idl
+ Modules/mediastream/RTCIceCandidateType.idl
+ Modules/mediastream/RTCIceComponent.idl
Modules/mediastream/RTCIceConnectionState.idl
Modules/mediastream/RTCIceGatheringState.idl
+ Modules/mediastream/RTCIceProtocol.idl
Modules/mediastream/RTCIceServer.idl
+ Modules/mediastream/RTCIceTcpCandidateType.idl
Modules/mediastream/RTCIceTransport.idl
Modules/mediastream/RTCIceTransportState.idl
Modules/mediastream/RTCOfferAnswerOptions.idl
Modified: trunk/Source/WebCore/ChangeLog (266697 => 266698)
--- trunk/Source/WebCore/ChangeLog 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/Source/WebCore/ChangeLog 2020-09-07 12:37:37 UTC (rev 266698)
@@ -1,3 +1,49 @@
+2020-09-07 Youenn Fablet <[email protected]>
+
+ Add missing members to RTCIceCandidate
+ https://bugs.webkit.org/show_bug.cgi?id=216075
+
+ Reviewed by Eric Carlson.
+
+ Sync IDL with latest spec.
+ Add missing enums and make use of libwebrtc parse routine to get fields from candidate SDP.
+ Covered by updated tests.
+
+ * CMakeLists.txt:
+ * DerivedSources-input.xcfilelist:
+ * DerivedSources-output.xcfilelist:
+ * DerivedSources.make:
+ * Modules/mediastream/RTCIceCandidate.cpp:
+ (WebCore::RTCIceCandidate::RTCIceCandidate):
+ (WebCore::RTCIceCandidate::create):
+ * Modules/mediastream/RTCIceCandidate.h:
+ * Modules/mediastream/RTCIceCandidate.idl:
+ * Modules/mediastream/RTCIceCandidateInit.h:
+ * Modules/mediastream/RTCIceCandidateInit.idl:
+ * Modules/mediastream/RTCIceCandidateType.h: Added.
+ * Modules/mediastream/RTCIceCandidateType.idl: Added.
+ * Modules/mediastream/RTCIceComponent.h: Added.
+ * Modules/mediastream/RTCIceComponent.idl: Added.
+ * Modules/mediastream/RTCIceProtocol.h: Added.
+ * Modules/mediastream/RTCIceProtocol.idl: Added.
+ * Modules/mediastream/RTCIceTcpCandidateType.h: Added.
+ * Modules/mediastream/RTCIceTcpCandidateType.idl: Added.
+ * Modules/mediastream/RTCStatsReport.h:
+ * Modules/mediastream/RTCStatsReport.idl:
+ * Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:
+ (WebCore::iceCandidateState):
+ (WebCore::fillRTCIceCandidateStats):
+ * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
+ (WebCore::toRTCIceComponent):
+ (WebCore::toRTCIceProtocol):
+ (WebCore::toRTCIceTcpCandidateType):
+ (WebCore::toRTCIceCandidateType):
+ (WebCore::parseIceCandidateSDP):
+ * Sources.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ * testing/MockLibWebRTCPeerConnection.cpp:
+ (WebCore::MockLibWebRTCPeerConnectionForIceCandidates::sendCandidates):
+
2020-09-07 Víctor Manuel Jáquez Leal <[email protected]>
[GStreamer] Convert custom GObject subclasses to WEBKIT_DEFINE_TYPE
Modified: trunk/Source/WebCore/DerivedSources-input.xcfilelist (266697 => 266698)
--- trunk/Source/WebCore/DerivedSources-input.xcfilelist 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/Source/WebCore/DerivedSources-input.xcfilelist 2020-09-07 12:37:37 UTC (rev 266698)
@@ -192,9 +192,13 @@
$(PROJECT_DIR)/Modules/mediastream/RTCDtxStatus.idl
$(PROJECT_DIR)/Modules/mediastream/RTCIceCandidate.idl
$(PROJECT_DIR)/Modules/mediastream/RTCIceCandidateInit.idl
+$(PROJECT_DIR)/Modules/mediastream/RTCIceCandidateType.idl
+$(PROJECT_DIR)/Modules/mediastream/RTCIceComponent.idl
$(PROJECT_DIR)/Modules/mediastream/RTCIceConnectionState.idl
$(PROJECT_DIR)/Modules/mediastream/RTCIceGatheringState.idl
+$(PROJECT_DIR)/Modules/mediastream/RTCIceProtocol.idl
$(PROJECT_DIR)/Modules/mediastream/RTCIceServer.idl
+$(PROJECT_DIR)/Modules/mediastream/RTCIceTcpCandidateType.idl
$(PROJECT_DIR)/Modules/mediastream/RTCIceTransport.idl
$(PROJECT_DIR)/Modules/mediastream/RTCIceTransportState.idl
$(PROJECT_DIR)/Modules/mediastream/RTCOfferAnswerOptions.idl
Modified: trunk/Source/WebCore/DerivedSources-output.xcfilelist (266697 => 266698)
--- trunk/Source/WebCore/DerivedSources-output.xcfilelist 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/Source/WebCore/DerivedSources-output.xcfilelist 2020-09-07 12:37:37 UTC (rev 266698)
@@ -1428,12 +1428,20 @@
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCIceCandidate.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCIceCandidateInit.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCIceCandidateInit.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCIceCandidateType.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCIceCandidateType.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCIceComponent.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCIceComponent.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCIceConnectionState.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCIceConnectionState.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCIceGatheringState.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCIceGatheringState.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCIceProtocol.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCIceProtocol.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCIceServer.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCIceServer.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCIceTcpCandidateType.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCIceTcpCandidateType.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCIceTransport.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCIceTransport.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCIceTransportState.cpp
Modified: trunk/Source/WebCore/DerivedSources.make (266697 => 266698)
--- trunk/Source/WebCore/DerivedSources.make 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/Source/WebCore/DerivedSources.make 2020-09-07 12:37:37 UTC (rev 266698)
@@ -292,9 +292,13 @@
$(WebCore)/Modules/mediastream/RTCDtxStatus.idl \
$(WebCore)/Modules/mediastream/RTCIceCandidate.idl \
$(WebCore)/Modules/mediastream/RTCIceCandidateInit.idl \
+ $(WebCore)/Modules/mediastream/RTCIceCandidateType.idl \
+ $(WebCore)/Modules/mediastream/RTCIceComponent.idl \
$(WebCore)/Modules/mediastream/RTCIceConnectionState.idl \
$(WebCore)/Modules/mediastream/RTCIceGatheringState.idl \
+ $(WebCore)/Modules/mediastream/RTCIceProtocol.idl \
$(WebCore)/Modules/mediastream/RTCIceServer.idl \
+ $(WebCore)/Modules/mediastream/RTCIceTcpCandidateType.idl \
$(WebCore)/Modules/mediastream/RTCIceTransport.idl \
$(WebCore)/Modules/mediastream/RTCIceTransportState.idl \
$(WebCore)/Modules/mediastream/RTCOfferAnswerOptions.idl \
Modified: trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.cpp (266697 => 266698)
--- trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.cpp 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.cpp 2020-09-07 12:37:37 UTC (rev 266698)
@@ -42,10 +42,11 @@
WTF_MAKE_ISO_ALLOCATED_IMPL(RTCIceCandidate);
-inline RTCIceCandidate::RTCIceCandidate(const String& candidate, const String& sdpMid, Optional<unsigned short> sdpMLineIndex)
+RTCIceCandidate::RTCIceCandidate(const String& candidate, const String& sdpMid, Optional<unsigned short> sdpMLineIndex, Fields&& fields)
: m_candidate(candidate)
, m_sdpMid(sdpMid)
, m_sdpMLineIndex(sdpMLineIndex)
+ , m_fields(WTFMove(fields))
{
ASSERT(!sdpMid.isNull() || sdpMLineIndex);
}
@@ -54,12 +55,16 @@
{
if (dictionary.sdpMid.isNull() && !dictionary.sdpMLineIndex)
return Exception { TypeError, "Candidate must not have both null sdpMid and sdpMLineIndex" };
- return create(dictionary.candidate, dictionary.sdpMid, dictionary.sdpMLineIndex);
+
+ auto fields = parseIceCandidateSDP(dictionary.candidate).valueOr(RTCIceCandidate::Fields { });
+ fields.usernameFragment = dictionary.usernameFragment;
+ return adoptRef(*new RTCIceCandidate(dictionary.candidate, dictionary.sdpMid, dictionary.sdpMLineIndex, WTFMove(fields)));
}
Ref<RTCIceCandidate> RTCIceCandidate::create(const String& candidate, const String& sdpMid, Optional<unsigned short> sdpMLineIndex)
{
- return adoptRef(*new RTCIceCandidate(candidate, sdpMid, sdpMLineIndex));
+ auto fields = parseIceCandidateSDP(candidate);
+ return adoptRef(*new RTCIceCandidate(candidate, sdpMid, sdpMLineIndex, WTFMove(*fields)));
}
} // namespace WebCore
Modified: trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.h (266697 => 266698)
--- trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.h 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.h 2020-09-07 12:37:37 UTC (rev 266698)
@@ -33,6 +33,10 @@
#if ENABLE(WEB_RTC)
#include "ExceptionOr.h"
+#include "RTCIceCandidateType.h"
+#include "RTCIceComponent.h"
+#include "RTCIceProtocol.h"
+#include "RTCIceTcpCandidateType.h"
#include "ScriptWrappable.h"
namespace WebCore {
@@ -49,16 +53,43 @@
const String& sdpMid() const { return m_sdpMid; }
Optional<unsigned short> sdpMLineIndex() const { return m_sdpMLineIndex; }
- void setCandidate(String&& candidate) { m_candidate = WTFMove(candidate); }
+ struct Fields {
+ String foundation;
+ Optional<RTCIceComponent> component;
+ Optional<unsigned> priority;
+ String address;
+ Optional<RTCIceProtocol> protocol;
+ Optional<unsigned short> port;
+ Optional<RTCIceCandidateType> type;
+ Optional<RTCIceTcpCandidateType> tcpType;
+ String relatedAddress;
+ Optional<unsigned short> relatedPort;
+ String usernameFragment;
+ };
+ String foundation() const { return m_fields.foundation; }
+ Optional<RTCIceComponent> component() const { return m_fields.component; }
+ Optional<unsigned> priority() const { return m_fields.priority; }
+ String address() const { return m_fields.address; }
+ Optional<RTCIceProtocol> protocol() const { return m_fields.protocol; }
+ Optional<unsigned short> port() const { return m_fields.port; }
+ Optional<RTCIceCandidateType> type() const { return m_fields.type; }
+ Optional<RTCIceTcpCandidateType> tcpType() const { return m_fields.tcpType; }
+ String relatedAddress() const { return m_fields.relatedAddress; }
+ Optional<unsigned short> relatedPort() const { return m_fields.relatedPort; }
+ String usernameFragment() const { return m_fields.usernameFragment; }
+
private:
- RTCIceCandidate(const String& candidate, const String& sdpMid, Optional<unsigned short> sdpMLineIndex);
+ RTCIceCandidate(const String& candidate, const String& sdpMid, Optional<unsigned short> sdpMLineIndex, Fields&&);
String m_candidate;
String m_sdpMid;
Optional<unsigned short> m_sdpMLineIndex;
+ Fields m_fields;
};
+Optional<RTCIceCandidate::Fields> parseIceCandidateSDP(const String&);
+
} // namespace WebCore
#endif // ENABLE(WEB_RTC)
Modified: trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.idl (266697 => 266698)
--- trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.idl 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.idl 2020-09-07 12:37:37 UTC (rev 266698)
@@ -34,8 +34,6 @@
Conditional=WEB_RTC,
EnabledAtRuntime=PeerConnection,
ImplementationLacksVTable,
- PrivateIdentifier,
- PublicIdentifier
] interface RTCIceCandidate {
[MayThrowException] constructor(RTCIceCandidateInit candidateInitDict);
@@ -42,16 +40,17 @@
readonly attribute DOMString candidate;
readonly attribute DOMString? sdpMid;
readonly attribute unsigned short? sdpMLineIndex;
- // FIXME 169662: missing foundation
- // FIXME 169662: missing priority
- // FIXME 169662: missing ip
- // FIXME 169662: missing protocol
- // FIXME 169662: missing port
- // FIXME 169662: missing type
- // FIXME 169662: missing tcpType
- // FIXME 169662: missing relatedAddress
- // FIXME 169662: missing relatedPort
- // FIXME 169662: missing ufrag
+ readonly attribute DOMString? foundation;
+ readonly attribute RTCIceComponent? component;
+ readonly attribute unsigned long? priority;
+ readonly attribute DOMString? address;
+ readonly attribute RTCIceProtocol? protocol;
+ readonly attribute unsigned short? port;
+ readonly attribute RTCIceCandidateType? type;
+ readonly attribute RTCIceTcpCandidateType? tcpType;
+ readonly attribute DOMString? relatedAddress;
+ readonly attribute unsigned short? relatedPort;
+ readonly attribute DOMString? usernameFragment;
// FIXME 169662: add ufrag to the list
serializer = {candidate, sdpMid, sdpMLineIndex};
Modified: trunk/Source/WebCore/Modules/mediastream/RTCIceCandidateInit.h (266697 => 266698)
--- trunk/Source/WebCore/Modules/mediastream/RTCIceCandidateInit.h 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/Source/WebCore/Modules/mediastream/RTCIceCandidateInit.h 2020-09-07 12:37:37 UTC (rev 266698)
@@ -38,6 +38,7 @@
String candidate;
String sdpMid;
Optional<unsigned short> sdpMLineIndex;
+ String usernameFragment;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/Modules/mediastream/RTCIceCandidateInit.idl (266697 => 266698)
--- trunk/Source/WebCore/Modules/mediastream/RTCIceCandidateInit.idl 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/Source/WebCore/Modules/mediastream/RTCIceCandidateInit.idl 2020-09-07 12:37:37 UTC (rev 266698)
@@ -37,5 +37,5 @@
DOMString candidate = "";
DOMString? sdpMid = null;
unsigned short? sdpMLineIndex = null;
- // FIXME 169662: missing ufrag
+ DOMString? usernameFragment = null;
};
Added: trunk/Source/WebCore/Modules/mediastream/RTCIceCandidateType.h (0 => 266698)
--- trunk/Source/WebCore/Modules/mediastream/RTCIceCandidateType.h (rev 0)
+++ trunk/Source/WebCore/Modules/mediastream/RTCIceCandidateType.h 2020-09-07 12:37:37 UTC (rev 266698)
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+enum class RTCIceCandidateType { Host, Srflx, Prflx, Relay };
+
+} // namespace WebCore
Added: trunk/Source/WebCore/Modules/mediastream/RTCIceCandidateType.idl (0 => 266698)
--- trunk/Source/WebCore/Modules/mediastream/RTCIceCandidateType.idl (rev 0)
+++ trunk/Source/WebCore/Modules/mediastream/RTCIceCandidateType.idl 2020-09-07 12:37:37 UTC (rev 266698)
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+enum RTCIceCandidateType {
+ "host",
+ "srflx",
+ "prflx",
+ "relay"
+};
Added: trunk/Source/WebCore/Modules/mediastream/RTCIceComponent.h (0 => 266698)
--- trunk/Source/WebCore/Modules/mediastream/RTCIceComponent.h (rev 0)
+++ trunk/Source/WebCore/Modules/mediastream/RTCIceComponent.h 2020-09-07 12:37:37 UTC (rev 266698)
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+enum class RTCIceComponent { Rtp, Rtcp };
+
+} // namespace WebCore
Added: trunk/Source/WebCore/Modules/mediastream/RTCIceComponent.idl (0 => 266698)
--- trunk/Source/WebCore/Modules/mediastream/RTCIceComponent.idl (rev 0)
+++ trunk/Source/WebCore/Modules/mediastream/RTCIceComponent.idl 2020-09-07 12:37:37 UTC (rev 266698)
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+enum RTCIceComponent {
+ "rtp",
+ "rtcp"
+};
Added: trunk/Source/WebCore/Modules/mediastream/RTCIceProtocol.h (0 => 266698)
--- trunk/Source/WebCore/Modules/mediastream/RTCIceProtocol.h (rev 0)
+++ trunk/Source/WebCore/Modules/mediastream/RTCIceProtocol.h 2020-09-07 12:37:37 UTC (rev 266698)
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+enum class RTCIceProtocol { Udp, Tcp };
+
+} // namespace WebCore
Added: trunk/Source/WebCore/Modules/mediastream/RTCIceProtocol.idl (0 => 266698)
--- trunk/Source/WebCore/Modules/mediastream/RTCIceProtocol.idl (rev 0)
+++ trunk/Source/WebCore/Modules/mediastream/RTCIceProtocol.idl 2020-09-07 12:37:37 UTC (rev 266698)
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+enum RTCIceProtocol {
+ "udp",
+ "tcp"
+};
Added: trunk/Source/WebCore/Modules/mediastream/RTCIceTcpCandidateType.h (0 => 266698)
--- trunk/Source/WebCore/Modules/mediastream/RTCIceTcpCandidateType.h (rev 0)
+++ trunk/Source/WebCore/Modules/mediastream/RTCIceTcpCandidateType.h 2020-09-07 12:37:37 UTC (rev 266698)
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+enum class RTCIceTcpCandidateType { Active, Passive, So };
+
+} // namespace WebCore
Added: trunk/Source/WebCore/Modules/mediastream/RTCIceTcpCandidateType.idl (0 => 266698)
--- trunk/Source/WebCore/Modules/mediastream/RTCIceTcpCandidateType.idl (rev 0)
+++ trunk/Source/WebCore/Modules/mediastream/RTCIceTcpCandidateType.idl 2020-09-07 12:37:37 UTC (rev 266698)
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+enum RTCIceTcpCandidateType {
+ "active",
+ "passive",
+ "so"
+};
Modified: trunk/Source/WebCore/Modules/mediastream/RTCStatsReport.h (266697 => 266698)
--- trunk/Source/WebCore/Modules/mediastream/RTCStatsReport.h 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/Source/WebCore/Modules/mediastream/RTCStatsReport.h 2020-09-07 12:37:37 UTC (rev 266698)
@@ -26,6 +26,7 @@
#pragma once
#include "LibWebRTCStatsCollector.h"
+#include "RTCIceCandidateType.h"
namespace WebCore {
@@ -278,14 +279,12 @@
Optional<uint64_t> consentResponsesSent;
};
- enum class IceCandidateType { Host, Srflx, Prflx, Relay };
-
struct IceCandidateStats : Stats {
String transportId;
String address;
Optional<int32_t> port;
String protocol;
- Optional<IceCandidateType> candidateType;
+ Optional<RTCIceCandidateType> candidateType;
Optional<int32_t> priority;
String url;
bool deleted { false };
Modified: trunk/Source/WebCore/Modules/mediastream/RTCStatsReport.idl (266697 => 266698)
--- trunk/Source/WebCore/Modules/mediastream/RTCStatsReport.idl 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/Source/WebCore/Modules/mediastream/RTCStatsReport.idl 2020-09-07 12:37:37 UTC (rev 266698)
@@ -275,13 +275,6 @@
// FIXME: Expose other fields once libwebrtc support them.
};
-enum RTCIceCandidateType {
- "host",
- "srflx",
- "prflx",
- "relay"
-};
-
[ JSGenerateToJSObject ]
dictionary RTCIceCandidateStats : RTCStats {
DOMString transportId;
Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp (266697 => 266698)
--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp 2020-09-07 12:37:37 UTC (rev 266698)
@@ -384,16 +384,16 @@
stats.consentResponsesSent = *rtcStats.responses_sent;
}
-static inline Optional<RTCStatsReport::IceCandidateType> iceCandidateState(const std::string& state)
+static inline Optional<RTCIceCandidateType> iceCandidateState(const std::string& state)
{
if (state == "host")
- return RTCStatsReport::IceCandidateType::Host;
+ return RTCIceCandidateType::Host;
if (state == "srflx")
- return RTCStatsReport::IceCandidateType::Srflx;
+ return RTCIceCandidateType::Srflx;
if (state == "prflx")
- return RTCStatsReport::IceCandidateType::Prflx;
+ return RTCIceCandidateType::Prflx;
if (state == "relay")
- return RTCStatsReport::IceCandidateType::Relay;
+ return RTCIceCandidateType::Relay;
return { };
}
@@ -416,7 +416,7 @@
if (rtcStats.candidate_type.is_defined())
stats.candidateType = iceCandidateState(*rtcStats.candidate_type);
- if (!stats.candidateType || stats.candidateType == RTCStatsReport::IceCandidateType::Prflx || stats.candidateType == RTCStatsReport::IceCandidateType::Host)
+ if (!stats.candidateType || stats.candidateType == RTCIceCandidateType::Prflx || stats.candidateType == RTCIceCandidateType::Host)
stats.address = { };
if (rtcStats.priority.is_defined())
Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp (266697 => 266698)
--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp 2020-09-07 12:37:37 UTC (rev 266698)
@@ -28,6 +28,7 @@
#if USE(LIBWEBRTC)
#include "LibWebRTCMacros.h"
+#include "RTCIceCandidate.h"
#include "RTCPeerConnection.h"
#include "RTCRtpSendParameters.h"
#include <wtf/text/WTFString.h>
@@ -36,6 +37,7 @@
#include <webrtc/api/rtp_parameters.h>
#include <webrtc/api/rtp_transceiver_interface.h>
+#include <webrtc/pc/webrtc_sdp.h>
ALLOW_UNUSED_PARAMETERS_END
@@ -253,6 +255,73 @@
return Exception { toExceptionCode(error.type()), error.message() };
}
+static inline RTCIceComponent toRTCIceComponent(int component)
+{
+ return component == cricket::ICE_CANDIDATE_COMPONENT_RTP ? RTCIceComponent::Rtp : RTCIceComponent::Rtcp;
+}
+
+static inline Optional<RTCIceProtocol> toRTCIceProtocol(const std::string& protocol)
+{
+ if (protocol == "")
+ return { };
+ if (protocol == "udp")
+ return RTCIceProtocol::Udp;
+ ASSERT(protocol == "tcp");
+ return RTCIceProtocol::Tcp;
+}
+
+static inline Optional<RTCIceTcpCandidateType> toRTCIceTcpCandidateType(const std::string& type)
+{
+ if (type == "")
+ return { };
+ if (type == "active")
+ return RTCIceTcpCandidateType::Active;
+ if (type == "passive")
+ return RTCIceTcpCandidateType::Passive;
+ ASSERT(type == "so");
+ return RTCIceTcpCandidateType::So;
+}
+
+static inline Optional<RTCIceCandidateType> toRTCIceCandidateType(const std::string& type)
+{
+ if (type == "")
+ return { };
+ if (type == "local")
+ return RTCIceCandidateType::Host;
+ if (type == "stun")
+ return RTCIceCandidateType::Srflx;
+ if (type == "prflx")
+ return RTCIceCandidateType::Prflx;
+ ASSERT(type == "relay");
+ return RTCIceCandidateType::Relay;
+}
+
+Optional<RTCIceCandidate::Fields> parseIceCandidateSDP(const String& sdp)
+{
+ cricket::Candidate candidate;
+ if (!webrtc::ParseCandidate(sdp.utf8().data(), &candidate, nullptr, true))
+ return { };
+
+ RTCIceCandidate::Fields fields;
+ fields.foundation = fromStdString(candidate.foundation());
+ fields.component = toRTCIceComponent(candidate.component());
+ fields.priority = candidate.priority();
+ fields.protocol = toRTCIceProtocol(candidate.protocol());
+ if (!candidate.address().IsNil()) {
+ fields.address = fromStdString(candidate.address().HostAsURIString());
+ fields.port = candidate.address().port();
+ }
+ fields.type = toRTCIceCandidateType(candidate.type());
+ fields.tcpType = toRTCIceTcpCandidateType(candidate.tcptype());
+ if (!candidate.related_address().IsNil()) {
+ fields.relatedAddress = fromStdString(candidate.related_address().HostAsURIString());
+ fields.relatedPort = candidate.related_address().port();
+ }
+
+ fields.usernameFragment = fromStdString(candidate.username());
+ return fields;
+}
+
} // namespace WebCore
#endif // USE(LIBWEBRTC)
Modified: trunk/Source/WebCore/Sources.txt (266697 => 266698)
--- trunk/Source/WebCore/Sources.txt 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/Source/WebCore/Sources.txt 2020-09-07 12:37:37 UTC (rev 266698)
@@ -3246,9 +3246,13 @@
JSRTCDtxStatus.cpp
JSRTCIceCandidate.cpp
JSRTCIceCandidateInit.cpp
+JSRTCIceCandidateType.cpp
+JSRTCIceComponent.cpp
JSRTCIceConnectionState.cpp
JSRTCIceGatheringState.cpp
+JSRTCIceProtocol.cpp
JSRTCIceServer.cpp
+JSRTCIceTcpCandidateType.cpp
JSRTCIceTransport.cpp
JSRTCIceTransportState.cpp
JSRTCOfferAnswerOptions.cpp
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (266697 => 266698)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2020-09-07 12:37:37 UTC (rev 266698)
@@ -7523,6 +7523,14 @@
4157EBF81E3AB06800AC9FE9 /* MockLibWebRTCPeerConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MockLibWebRTCPeerConnection.h; sourceTree = "<group>"; };
4157EBF91E3AB06800AC9FE9 /* MockLibWebRTCPeerConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MockLibWebRTCPeerConnection.cpp; sourceTree = "<group>"; };
4158649F23BF7B9300A0A61E /* RealtimeVideoUtilities.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RealtimeVideoUtilities.mm; sourceTree = "<group>"; };
+ 4158DCB624FFCD1B00B9DA41 /* RTCIceComponent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCIceComponent.idl; sourceTree = "<group>"; };
+ 4158DCB824FFCDC300B9DA41 /* RTCIceProtocol.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCIceProtocol.idl; sourceTree = "<group>"; };
+ 4158DCB924FFCDC300B9DA41 /* RTCIceTcpCandidateType.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCIceTcpCandidateType.idl; sourceTree = "<group>"; };
+ 4158DCBA24FFCDC300B9DA41 /* RTCIceCandidateType.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCIceCandidateType.idl; sourceTree = "<group>"; };
+ 4158DCBB24FFCF6000B9DA41 /* RTCIceProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCIceProtocol.h; sourceTree = "<group>"; };
+ 4158DCBC24FFCF6000B9DA41 /* RTCIceTcpCandidateType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCIceTcpCandidateType.h; sourceTree = "<group>"; };
+ 4158DCBD24FFCF6100B9DA41 /* RTCIceComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCIceComponent.h; sourceTree = "<group>"; };
+ 4158DCBE24FFCF6100B9DA41 /* RTCIceCandidateType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCIceCandidateType.h; sourceTree = "<group>"; };
415A3B732138E264001B4BAA /* LibWebRTCObservers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LibWebRTCObservers.h; path = libwebrtc/LibWebRTCObservers.h; sourceTree = "<group>"; };
415CDAF61E6CE0D3004F11EE /* JSMediaStreamTrackCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaStreamTrackCustom.cpp; sourceTree = "<group>"; };
415E1BB3215010800022DA96 /* RTCRtpContributingSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCRtpContributingSource.h; sourceTree = "<group>"; };
@@ -16740,10 +16748,18 @@
07221B7317CEC32700848E51 /* RTCIceCandidate.idl */,
410F565924FCF95700A2E50C /* RTCIceCandidateInit.h */,
410F565724FCF7C700A2E50C /* RTCIceCandidateInit.idl */,
+ 4158DCBE24FFCF6100B9DA41 /* RTCIceCandidateType.h */,
+ 4158DCBA24FFCDC300B9DA41 /* RTCIceCandidateType.idl */,
+ 4158DCBD24FFCF6100B9DA41 /* RTCIceComponent.h */,
+ 4158DCB624FFCD1B00B9DA41 /* RTCIceComponent.idl */,
316DCB3B1E790E2C001B5F87 /* RTCIceConnectionState.idl */,
316DCB351E790E1B001B5F87 /* RTCIceGatheringState.idl */,
+ 4158DCBB24FFCF6000B9DA41 /* RTCIceProtocol.h */,
+ 4158DCB824FFCDC300B9DA41 /* RTCIceProtocol.idl */,
07AB996718DA3C010018771E /* RTCIceServer.h */,
07AB996818DA3C010018771E /* RTCIceServer.idl */,
+ 4158DCBC24FFCF6000B9DA41 /* RTCIceTcpCandidateType.h */,
+ 4158DCB924FFCDC300B9DA41 /* RTCIceTcpCandidateType.idl */,
316DCB881E7A6996001B5F87 /* RTCIceTransport.cpp */,
5E6653091DA437BF00FDD84C /* RTCIceTransport.h */,
316DCB891E7A6996001B5F87 /* RTCIceTransport.idl */,
Modified: trunk/Source/WebCore/testing/MockLibWebRTCPeerConnection.cpp (266697 => 266698)
--- trunk/Source/WebCore/testing/MockLibWebRTCPeerConnection.cpp 2020-09-07 10:09:16 UTC (rev 266697)
+++ trunk/Source/WebCore/testing/MockLibWebRTCPeerConnection.cpp 2020-09-07 12:37:37 UTC (rev 266698)
@@ -121,17 +121,17 @@
// Let's gather candidates
LibWebRTCProvider::callOnWebRTCSignalingThread([this]() {
- MockLibWebRTCIceCandidate candidate("2013266431 1 udp 2013266432 192.168.0.100 38838 typ host generation 0", "1");
+ MockLibWebRTCIceCandidate candidate("candidate:2013266431 1 udp 2013266432 192.168.0.100 38838 typ host generation 0", "1");
m_observer.OnIceCandidate(&candidate);
});
LibWebRTCProvider::callOnWebRTCSignalingThread([this]() {
- MockLibWebRTCIceCandidate candidate("1019216383 1 tcp 1019216384 192.168.0.100 9 typ host tcptype passive generation 0", "1");
+ MockLibWebRTCIceCandidate candidate("candidate:1019216383 1 tcp 1019216384 192.168.0.100 9 typ host tcptype passive generation 0", "1");
m_observer.OnIceCandidate(&candidate);
});
LibWebRTCProvider::callOnWebRTCSignalingThread([this]() {
- MockLibWebRTCIceCandidate candidate("1677722111 1 tcp 1677722112 172.18.0.1 47989 typ srflx raddr 192.168.0.100 rport 47989 generation 0", "1");
+ MockLibWebRTCIceCandidate candidate("candidate:1677722111 1 tcp 1677722112 172.18.0.1 47989 typ srflx raddr 192.168.0.100 rport 47989 generation 0", "1");
m_observer.OnIceCandidate(&candidate);
});