Changeset 214030 in webkit
- Timestamp:
- Mar 15, 2017 11:10:34 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 added
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/CMakeLists.txt
r213992 r214030 242 242 Modules/mediastream/RTCIceCandidate.idl 243 243 Modules/mediastream/RTCIceCandidateEvent.idl 244 Modules/mediastream/RTCIceConnectionState.idl 245 Modules/mediastream/RTCIceGatheringState.idl 244 246 Modules/mediastream/RTCIceServer.idl 245 247 Modules/mediastream/RTCOfferAnswerOptions.idl … … 251 253 Modules/mediastream/RTCRtpTransceiverDirection.idl 252 254 Modules/mediastream/RTCSessionDescription.idl 255 Modules/mediastream/RTCSignalingState.idl 253 256 Modules/mediastream/RTCStatsReport.idl 254 257 Modules/mediastream/RTCTrackEvent.idl -
trunk/Source/WebCore/ChangeLog
r214027 r214030 1 2017-03-15 Jon Lee <jonlee@apple.com> 2 3 Flatten RTC enum naming 4 https://bugs.webkit.org/show_bug.cgi?id=169664 5 6 Reviewed by Youenn Fablet. 7 8 Use consistent names of RTC enums throughout WebCore. This means surfacing 9 ICE enums out of PeerConnectionState. Keep the old names around for other 10 ports. 11 12 Add RTCIceConnectionState, RTCIceGatheringState, and RTCSignalingState enums. 13 * CMakeLists.txt: 14 * DerivedSources.make: 15 * Modules/mediastream/RTCIceConnectionState.h: Added. The enum is defined in 16 PeerConnectionStates.h, so just include that file. 17 * Modules/mediastream/RTCIceConnectionState.idl: Added. 18 * Modules/mediastream/RTCIceGatheringState.h: Added. 19 * Modules/mediastream/RTCIceGatheringState.idl: Added. 20 * Modules/mediastream/RTCSignalingState.h: Added. 21 * Modules/mediastream/RTCSignalingState.idl: Added. 22 * WebCore.xcodeproj/project.pbxproj: 23 24 * platform/mediastream/PeerConnectionStates.h: Move the existing enums into 25 WebCore, but keep aliases to the old names within the PeerConnectionStates 26 namespace. 27 28 Refactor to use the new enum names. 29 * Modules/mediastream/MediaEndpointPeerConnection.cpp: Refactor. 30 * Modules/mediastream/MediaEndpointPeerConnection.h: 31 * Modules/mediastream/PeerConnectionBackend.cpp: 32 * Modules/mediastream/PeerConnectionBackend.h: 33 * Modules/mediastream/RTCConfiguration.h: 34 * Modules/mediastream/RTCConfiguration.idl: Add FIXMEs for bringing this up 35 to spec. 36 * Modules/mediastream/RTCIceTransport.h: 37 * Modules/mediastream/RTCPeerConnection.cpp: Refactor the three functions 38 below to using the enum instead of returning strings. This allows remove of 39 the internal* versions of these functions. 40 (WebCore::RTCPeerConnection::signalingState): Deleted. 41 (WebCore::RTCPeerConnection::iceGatheringState): Deleted. 42 (WebCore::RTCPeerConnection::iceConnectionState): Deleted. 43 * Modules/mediastream/RTCPeerConnection.h: Replace internalSignalingState, 44 internalIceGatheringState, and internalIceConnectionState. 45 * Modules/mediastream/RTCPeerConnection.idl: 46 * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: 47 * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp: 48 * platform/mediastream/MediaEndpoint.h: 49 * platform/mediastream/MediaEndpointConfiguration.cpp: 50 * platform/mediastream/MediaEndpointConfiguration.h: 51 * platform/mock/MockMediaEndpoint.cpp: 52 * platform/mock/MockMediaEndpoint.h: 53 * platform/mediastream/openwebrtc/MediaEndpointOwr.cpp: 54 (WebCore::MediaEndpointOwr::processIceTransportStateChange): 55 1 56 2017-03-15 Jer Noble <jer.noble@apple.com> 2 57 -
trunk/Source/WebCore/DerivedSources.make
r213992 r214030 186 186 $(WebCore)/Modules/mediastream/RTCIceCandidate.idl \ 187 187 $(WebCore)/Modules/mediastream/RTCIceCandidateEvent.idl \ 188 $(WebCore)/Modules/mediastream/RTCIceConnectionState.idl \ 189 $(WebCore)/Modules/mediastream/RTCIceGatheringState.idl \ 188 190 $(WebCore)/Modules/mediastream/RTCIceServer.idl \ 189 191 $(WebCore)/Modules/mediastream/RTCOfferAnswerOptions.idl \ … … 195 197 $(WebCore)/Modules/mediastream/RTCRtpTransceiverDirection.idl \ 196 198 $(WebCore)/Modules/mediastream/RTCSessionDescription.idl \ 199 $(WebCore)/Modules/mediastream/RTCSignalingState.idl \ 197 200 $(WebCore)/Modules/mediastream/RTCStatsReport.idl \ 198 201 $(WebCore)/Modules/mediastream/RTCTrackEvent.idl \ -
trunk/Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp
r213992 r214030 1 1 /* 2 2 * Copyright (C) 2015 Ericsson AB. All rights reserved. 3 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 30 31 31 32 #include "config.h" 33 #include "MediaEndpointPeerConnection.h" 32 34 33 35 #if ENABLE(WEB_RTC) 34 #include "MediaEndpointPeerConnection.h"35 36 36 37 #include "EventNames.h" … … 58 59 59 60 using namespace PeerConnection; 60 using namespace PeerConnectionStates;61 61 62 62 using MediaDescriptionVector = Vector<PeerMediaDescription>; … … 331 331 void MediaEndpointPeerConnection::setLocalDescriptionTask(RefPtr<RTCSessionDescription>&& description) 332 332 { 333 if (m_peerConnection. internalSignalingState() ==SignalingState::Closed)333 if (m_peerConnection.signalingState() == RTCSignalingState::Closed) 334 334 return; 335 335 … … 352 352 353 353 if (result == MediaEndpoint::UpdateResult::SuccessWithIceRestart) { 354 if (m_peerConnection.i nternalIceGatheringState() !=IceGatheringState::Gathering)355 m_peerConnection.updateIceGatheringState( IceGatheringState::Gathering);356 357 if (m_peerConnection.i nternalIceConnectionState() !=IceConnectionState::Completed)358 m_peerConnection.updateIceConnectionState( IceConnectionState::Connected);354 if (m_peerConnection.iceGatheringState() != RTCIceGatheringState::Gathering) 355 m_peerConnection.updateIceGatheringState(RTCIceGatheringState::Gathering); 356 357 if (m_peerConnection.iceConnectionState() != RTCIceConnectionState::Completed) 358 m_peerConnection.updateIceConnectionState(RTCIceConnectionState::Connected); 359 359 360 360 LOG_ERROR("ICE restart is not implemented"); … … 389 389 clearNegotiationNeededState(); 390 390 391 SignalingState newSignalingState;391 RTCSignalingState newSignalingState; 392 392 393 393 // Update state and local descriptions according to setLocal/RemoteDescription processing model … … 395 395 case RTCSessionDescription::SdpType::Offer: 396 396 m_pendingLocalDescription = WTFMove(newDescription); 397 newSignalingState = SignalingState::HaveLocalOffer;397 newSignalingState = RTCSignalingState::HaveLocalOffer; 398 398 break; 399 399 … … 403 403 m_pendingLocalDescription = nullptr; 404 404 m_pendingRemoteDescription = nullptr; 405 newSignalingState = SignalingState::Stable;405 newSignalingState = RTCSignalingState::Stable; 406 406 break; 407 407 408 408 case RTCSessionDescription::SdpType::Rollback: 409 409 m_pendingLocalDescription = nullptr; 410 newSignalingState = SignalingState::Stable;410 newSignalingState = RTCSignalingState::Stable; 411 411 break; 412 412 413 413 case RTCSessionDescription::SdpType::Pranswer: 414 414 m_pendingLocalDescription = WTFMove(newDescription); 415 newSignalingState = SignalingState::HaveLocalPrAnswer;415 newSignalingState = RTCSignalingState::HaveLocalPranswer; 416 416 break; 417 417 } … … 419 419 updateSignalingState(newSignalingState); 420 420 421 if (m_peerConnection.i nternalIceGatheringState() ==IceGatheringState::New && mediaDescriptions.size())422 m_peerConnection.updateIceGatheringState( IceGatheringState::Gathering);421 if (m_peerConnection.iceGatheringState() == RTCIceGatheringState::New && mediaDescriptions.size()) 422 m_peerConnection.updateIceGatheringState(RTCIceGatheringState::Gathering); 423 423 424 424 markAsNeedingNegotiation(); … … 553 553 m_peerConnection.fireEvent(*event); 554 554 555 SignalingState newSignalingState;555 RTCSignalingState newSignalingState; 556 556 557 557 // Update state and local descriptions according to setLocal/RemoteDescription processing model … … 559 559 case RTCSessionDescription::SdpType::Offer: 560 560 m_pendingRemoteDescription = WTFMove(newDescription); 561 newSignalingState = SignalingState::HaveRemoteOffer;561 newSignalingState = RTCSignalingState::HaveRemoteOffer; 562 562 break; 563 563 … … 567 567 m_pendingRemoteDescription = nullptr; 568 568 m_pendingLocalDescription = nullptr; 569 newSignalingState = SignalingState::Stable;569 newSignalingState = RTCSignalingState::Stable; 570 570 break; 571 571 572 572 case RTCSessionDescription::SdpType::Rollback: 573 573 m_pendingRemoteDescription = nullptr; 574 newSignalingState = SignalingState::Stable;574 newSignalingState = RTCSignalingState::Stable; 575 575 break; 576 576 577 577 case RTCSessionDescription::SdpType::Pranswer: 578 578 m_pendingRemoteDescription = WTFMove(newDescription); 579 newSignalingState = SignalingState::HaveRemotePrAnswer;579 newSignalingState = RTCSignalingState::HaveRemotePranswer; 580 580 break; 581 581 } … … 717 717 void MediaEndpointPeerConnection::replaceTrackTask(RTCRtpSender& sender, const String& mid, Ref<MediaStreamTrack>&& withTrack, DOMPromise<void>& promise) 718 718 { 719 if (m_peerConnection. internalSignalingState() ==SignalingState::Closed)719 if (m_peerConnection.signalingState() == RTCSignalingState::Closed) 720 720 return; 721 721 … … 796 796 ASSERT(notifyingTransceiver); 797 797 798 notifyingTransceiver->iceTransport().setGatheringState(RTCIce Transport::GatheringState::Complete);798 notifyingTransceiver->iceTransport().setGatheringState(RTCIceGatheringState::Complete); 799 799 800 800 // Don't notify the script if there are transceivers still gathering. 801 801 RTCRtpTransceiver* stillGatheringTransceiver = matchTransceiver(transceivers, [] (RTCRtpTransceiver& current) { 802 802 return !current.stopped() && !current.mid().isNull() 803 && current.iceTransport().gatheringState() != RTCIce Transport::GatheringState::Complete;803 && current.iceTransport().gatheringState() != RTCIceGatheringState::Complete; 804 804 }); 805 805 if (!stillGatheringTransceiver) … … 807 807 } 808 808 809 static RTCIceTransport ::TransportState deriveAggregatedIceConnectionState(const Vector<RTCIceTransport::TransportState>& states)809 static RTCIceTransportState deriveAggregatedIceConnectionState(const Vector<RTCIceTransportState>& states) 810 810 { 811 811 unsigned newCount = 0; … … 819 819 for (auto& state : states) { 820 820 switch (state) { 821 case RTCIceTransport::TransportState::New: ++newCount; break; 822 case RTCIceTransport::TransportState::Checking: ++checkingCount; break; 823 case RTCIceTransport::TransportState::Connected: ++connectedCount; break; 824 case RTCIceTransport::TransportState::Completed: ++completedCount; break; 825 case RTCIceTransport::TransportState::Failed: ++failedCount; break; 826 case RTCIceTransport::TransportState::Disconnected: ++disconnectedCount; break; 827 case RTCIceTransport::TransportState::Closed: ++closedCount; break; 821 case RTCIceTransportState::New: 822 ++newCount; 823 break; 824 case RTCIceTransportState::Checking: 825 ++checkingCount; 826 break; 827 case RTCIceTransportState::Connected: 828 ++connectedCount; 829 break; 830 case RTCIceTransportState::Completed: 831 ++completedCount; 832 break; 833 case RTCIceTransportState::Failed: 834 ++failedCount; 835 break; 836 case RTCIceTransportState::Disconnected: 837 ++disconnectedCount; 838 break; 839 case RTCIceTransportState::Closed: 840 ++closedCount; 841 break; 828 842 } 829 843 } … … 831 845 // The aggregated RTCIceConnectionState is derived from the RTCIceTransportState of all RTCIceTransports. 832 846 if ((newCount > 0 && !checkingCount && !failedCount && !disconnectedCount) || (closedCount == states.size())) 833 return RTCIceTransport ::TransportState::New;847 return RTCIceTransportState::New; 834 848 835 849 if (checkingCount > 0 && !failedCount && !disconnectedCount) 836 return RTCIceTransport ::TransportState::Checking;850 return RTCIceTransportState::Checking; 837 851 838 852 if ((connectedCount + completedCount + closedCount) == states.size() && connectedCount > 0) 839 return RTCIceTransport ::TransportState::Connected;853 return RTCIceTransportState::Connected; 840 854 841 855 if ((completedCount + closedCount) == states.size() && completedCount > 0) 842 return RTCIceTransport ::TransportState::Completed;856 return RTCIceTransportState::Completed; 843 857 844 858 if (failedCount > 0) 845 return RTCIceTransport ::TransportState::Failed;859 return RTCIceTransportState::Failed; 846 860 847 861 if (disconnectedCount > 0) // Any failed caught above. 848 return RTCIceTransport ::TransportState::Disconnected;862 return RTCIceTransportState::Disconnected; 849 863 850 864 ASSERT_NOT_REACHED(); 851 return RTCIceTransport ::TransportState::New;852 } 853 854 void MediaEndpointPeerConnection::iceTransportStateChanged(const String& mid, MediaEndpoint::IceTransportState mediaEndpointIceTransportState)865 return RTCIceTransportState::New; 866 } 867 868 void MediaEndpointPeerConnection::iceTransportStateChanged(const String& mid, RTCIceTransportState mediaEndpointIceTransportState) 855 869 { 856 870 ASSERT(isMainThread()); … … 859 873 ASSERT(transceiver); 860 874 861 RTCIceTransport ::TransportState transportState = static_cast<RTCIceTransport::TransportState>(mediaEndpointIceTransportState);875 RTCIceTransportState transportState = static_cast<RTCIceTransportState>(mediaEndpointIceTransportState); 862 876 transceiver->iceTransport().setTransportState(transportState); 863 877 864 878 // Determine if the script needs to be notified. 865 Vector<RTCIceTransport ::TransportState> transportStates;879 Vector<RTCIceTransportState> transportStates; 866 880 for (auto& transceiver : m_peerConnection.getTransceivers()) 867 881 transportStates.append(transceiver->iceTransport().transportState()); 868 882 869 RTCIceTransport ::TransportState derivedState = deriveAggregatedIceConnectionState(transportStates);870 m_peerConnection.updateIceConnectionState(static_cast< IceConnectionState>(derivedState));883 RTCIceTransportState derivedState = deriveAggregatedIceConnectionState(transportStates); 884 m_peerConnection.updateIceConnectionState(static_cast<RTCIceConnectionState>(derivedState)); 871 885 } 872 886 -
trunk/Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.h
r213736 r214030 1 1 /* 2 2 * Copyright (C) 2015, 2016 Ericsson AB. All rights reserved. 3 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 35 36 #include "MediaEndpoint.h" 36 37 #include "PeerConnectionBackend.h" 38 #include "RTCEnums.h" 37 39 #include "RTCSessionDescription.h" 38 40 #include <wtf/Function.h> … … 98 100 void gotIceCandidate(const String& mid, IceCandidate&&) final; 99 101 void doneGatheringCandidates(const String& mid) final; 100 void iceTransportStateChanged(const String& mid, MediaEndpoint::IceTransportState) final;102 void iceTransportStateChanged(const String& mid, RTCIceTransportState) final; 101 103 102 104 std::unique_ptr<RTCDataChannelHandler> createDataChannelHandler(const String&, const RTCDataChannelInit&) final; -
trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp
r212745 r214030 1 1 /* 2 2 * Copyright (C) 2015 Ericsson AB. All rights reserved. 3 * Copyright (C) 2016 Apple INC. All rights reserved.3 * Copyright (C) 2016-2017 Apple Inc. All rights reserved. 4 4 * 5 5 * Redistribution and use in source and binary forms, with or without … … 47 47 { 48 48 ASSERT(!m_offerAnswerPromise); 49 ASSERT(m_peerConnection. internalSignalingState() != PeerConnectionStates::SignalingState::Closed);49 ASSERT(m_peerConnection.signalingState() != RTCSignalingState::Closed); 50 50 51 51 m_offerAnswerPromise = WTFMove(promise); … … 57 57 ASSERT(isMainThread()); 58 58 59 if (m_peerConnection. internalSignalingState() == PeerConnectionStates::SignalingState::Closed)59 if (m_peerConnection.signalingState() == RTCSignalingState::Closed) 60 60 return; 61 61 … … 69 69 ASSERT(isMainThread()); 70 70 71 if (m_peerConnection. internalSignalingState() == PeerConnectionStates::SignalingState::Closed)71 if (m_peerConnection.signalingState() == RTCSignalingState::Closed) 72 72 return; 73 73 … … 80 80 { 81 81 ASSERT(!m_offerAnswerPromise); 82 ASSERT(m_peerConnection. internalSignalingState() != PeerConnectionStates::SignalingState::Closed);82 ASSERT(m_peerConnection.signalingState() != RTCSignalingState::Closed); 83 83 84 84 m_offerAnswerPromise = WTFMove(promise); … … 90 90 ASSERT(isMainThread()); 91 91 92 if (m_peerConnection. internalSignalingState() == PeerConnectionStates::SignalingState::Closed)92 if (m_peerConnection.signalingState() == RTCSignalingState::Closed) 93 93 return; 94 94 … … 102 102 ASSERT(isMainThread()); 103 103 104 if (m_peerConnection. internalSignalingState() == PeerConnectionStates::SignalingState::Closed)104 if (m_peerConnection.signalingState() == RTCSignalingState::Closed) 105 105 return; 106 106 … … 110 110 } 111 111 112 static inline bool isLocalDescriptionTypeValidForState(RTCSessionDescription::SdpType type, PeerConnectionStates::SignalingState state)112 static inline bool isLocalDescriptionTypeValidForState(RTCSessionDescription::SdpType type, RTCSignalingState state) 113 113 { 114 114 switch (state) { 115 case PeerConnectionStates::SignalingState::Stable:115 case RTCSignalingState::Stable: 116 116 return type == RTCSessionDescription::SdpType::Offer; 117 case PeerConnectionStates::SignalingState::HaveLocalOffer:117 case RTCSignalingState::HaveLocalOffer: 118 118 return type == RTCSessionDescription::SdpType::Offer; 119 case PeerConnectionStates::SignalingState::HaveRemoteOffer:119 case RTCSignalingState::HaveRemoteOffer: 120 120 return type == RTCSessionDescription::SdpType::Answer || type == RTCSessionDescription::SdpType::Pranswer; 121 case PeerConnectionStates::SignalingState::HaveLocalPrAnswer:121 case RTCSignalingState::HaveLocalPranswer: 122 122 return type == RTCSessionDescription::SdpType::Answer || type == RTCSessionDescription::SdpType::Pranswer; 123 123 default: … … 131 131 void PeerConnectionBackend::setLocalDescription(RTCSessionDescription& sessionDescription, DOMPromise<void>&& promise) 132 132 { 133 ASSERT(m_peerConnection. internalSignalingState() != PeerConnectionStates::SignalingState::Closed);134 135 if (!isLocalDescriptionTypeValidForState(sessionDescription.type(), m_peerConnection. internalSignalingState())) {133 ASSERT(m_peerConnection.signalingState() != RTCSignalingState::Closed); 134 135 if (!isLocalDescriptionTypeValidForState(sessionDescription.type(), m_peerConnection.signalingState())) { 136 136 promise.reject(INVALID_STATE_ERR, "Description type incompatible with current signaling state"); 137 137 return; … … 146 146 ASSERT(isMainThread()); 147 147 148 if (m_peerConnection. internalSignalingState() == PeerConnectionStates::SignalingState::Closed)148 if (m_peerConnection.signalingState() == RTCSignalingState::Closed) 149 149 return; 150 150 … … 159 159 ASSERT(isMainThread()); 160 160 161 if (m_peerConnection. internalSignalingState() == PeerConnectionStates::SignalingState::Closed)161 if (m_peerConnection.signalingState() == RTCSignalingState::Closed) 162 162 return; 163 163 … … 168 168 } 169 169 170 static inline bool isRemoteDescriptionTypeValidForState(RTCSessionDescription::SdpType type, PeerConnectionStates::SignalingState state)170 static inline bool isRemoteDescriptionTypeValidForState(RTCSessionDescription::SdpType type, RTCSignalingState state) 171 171 { 172 172 switch (state) { 173 case PeerConnectionStates::SignalingState::Stable:173 case RTCSignalingState::Stable: 174 174 return type == RTCSessionDescription::SdpType::Offer; 175 case PeerConnectionStates::SignalingState::HaveLocalOffer:175 case RTCSignalingState::HaveLocalOffer: 176 176 return type == RTCSessionDescription::SdpType::Answer || type == RTCSessionDescription::SdpType::Pranswer; 177 case PeerConnectionStates::SignalingState::HaveRemoteOffer:177 case RTCSignalingState::HaveRemoteOffer: 178 178 return type == RTCSessionDescription::SdpType::Offer; 179 case PeerConnectionStates::SignalingState::HaveRemotePrAnswer:179 case RTCSignalingState::HaveRemotePranswer: 180 180 return type == RTCSessionDescription::SdpType::Answer || type == RTCSessionDescription::SdpType::Pranswer; 181 181 default: … … 189 189 void PeerConnectionBackend::setRemoteDescription(RTCSessionDescription& sessionDescription, DOMPromise<void>&& promise) 190 190 { 191 ASSERT(m_peerConnection. internalSignalingState() != PeerConnectionStates::SignalingState::Closed);192 193 if (!isRemoteDescriptionTypeValidForState(sessionDescription.type(), m_peerConnection. internalSignalingState())) {191 ASSERT(m_peerConnection.signalingState() != RTCSignalingState::Closed); 192 193 if (!isRemoteDescriptionTypeValidForState(sessionDescription.type(), m_peerConnection.signalingState())) { 194 194 promise.reject(INVALID_STATE_ERR, "Description type incompatible with current signaling state"); 195 195 return; … … 204 204 ASSERT(isMainThread()); 205 205 206 if (m_peerConnection. internalSignalingState() == PeerConnectionStates::SignalingState::Closed)206 if (m_peerConnection.signalingState() == RTCSignalingState::Closed) 207 207 return; 208 208 … … 217 217 ASSERT(isMainThread()); 218 218 219 if (m_peerConnection. internalSignalingState() == PeerConnectionStates::SignalingState::Closed)219 if (m_peerConnection.signalingState() == RTCSignalingState::Closed) 220 220 return; 221 221 … … 228 228 void PeerConnectionBackend::addIceCandidate(RTCIceCandidate& iceCandidate, DOMPromise<void>&& promise) 229 229 { 230 ASSERT(m_peerConnection. internalSignalingState() != PeerConnectionStates::SignalingState::Closed);230 ASSERT(m_peerConnection.signalingState() != RTCSignalingState::Closed); 231 231 232 232 if (iceCandidate.sdpMid().isNull() && !iceCandidate.sdpMLineIndex()) { … … 242 242 ASSERT(isMainThread()); 243 243 244 if (m_peerConnection. internalSignalingState() == PeerConnectionStates::SignalingState::Closed)244 if (m_peerConnection.signalingState() == RTCSignalingState::Closed) 245 245 return; 246 246 … … 255 255 { 256 256 ASSERT(isMainThread()); 257 if (m_peerConnection. internalSignalingState() == PeerConnectionStates::SignalingState::Closed)257 if (m_peerConnection.signalingState() == RTCSignalingState::Closed) 258 258 return; 259 259 … … 333 333 334 334 m_peerConnection.fireEvent(RTCIceCandidateEvent::create(false, false, nullptr)); 335 m_peerConnection.updateIceGatheringState( PeerConnectionStates::IceGatheringState::Complete);336 } 337 338 void PeerConnectionBackend::updateSignalingState( PeerConnectionStates::SignalingState newSignalingState)339 { 340 ASSERT(isMainThread()); 341 342 if (newSignalingState != m_peerConnection. internalSignalingState()) {335 m_peerConnection.updateIceGatheringState(RTCIceGatheringState::Complete); 336 } 337 338 void PeerConnectionBackend::updateSignalingState(RTCSignalingState newSignalingState) 339 { 340 ASSERT(isMainThread()); 341 342 if (newSignalingState != m_peerConnection.signalingState()) { 343 343 m_peerConnection.setSignalingState(newSignalingState); 344 344 m_peerConnection.fireEvent(Event::create(eventNames().signalingstatechangeEvent, false, false)); … … 362 362 m_negotiationNeeded = true; 363 363 364 if (m_peerConnection. internalSignalingState() == PeerConnectionStates::SignalingState::Stable)364 if (m_peerConnection.signalingState() == RTCSignalingState::Stable) 365 365 m_peerConnection.scheduleNegotiationNeededEvent(); 366 366 } -
trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h
r213736 r214030 1 1 /* 2 2 * Copyright (C) 2015 Ericsson AB. All rights reserved. 3 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 34 35 35 36 #include "JSDOMPromise.h" 36 #include " PeerConnectionStates.h"37 #include "RTCEnums.h" 37 38 38 39 namespace WebCore { … … 111 112 void doneGatheringCandidates(); 112 113 113 void updateSignalingState( PeerConnectionStates::SignalingState);114 void updateSignalingState(RTCSignalingState); 114 115 115 116 void createOfferSucceeded(String&&); -
trunk/Source/WebCore/Modules/mediastream/RTCConfiguration.h
r209695 r214030 1 1 /* 2 2 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 33 34 #if ENABLE(WEB_RTC) 34 35 35 #include " PeerConnectionStates.h"36 #include "RTCEnums.h" 36 37 #include "RTCIceServer.h" 37 38 38 39 namespace WebCore { 39 40 40 using RTCIceTransportPolicy = PeerConnectionStates::IceTransportPolicy;41 using RTCBundlePolicy = PeerConnectionStates::BundlePolicy;42 43 41 struct RTCConfiguration { 44 using IceTransportPolicy = RTCIceTransportPolicy;45 using BundlePolicy = RTCBundlePolicy;46 47 42 std::optional<Vector<RTCIceServer>> iceServers; 48 IceTransportPolicy iceTransportPolicy;49 BundlePolicy bundlePolicy;43 RTCIceTransportPolicy iceTransportPolicy; 44 RTCBundlePolicy bundlePolicy; 50 45 }; 51 46 -
trunk/Source/WebCore/Modules/mediastream/RTCConfiguration.idl
r209695 r214030 1 1 /* 2 * Copyright (C) 2014 Apple Inc. All rights reserved.2 * Copyright (C) 2014-2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 enum RTCIceTransportPolicy { "relay", "all" }; 27 enum RTCBundlePolicy { "balanced", "max-compat", "max-bundle" }; 26 [ 27 Conditional=WEB_RTC, 28 EnabledAtRuntime=PeerConnection, 29 ImplementedAs=RTCIceTransportPolicy 30 ] enum RTCIceTransportPolicy { 31 "relay", 32 "all" 33 }; 28 34 29 35 [ 30 36 Conditional=WEB_RTC, 37 EnabledAtRuntime=PeerConnection, 38 ImplementedAs=RTCBundlePolicy 39 ] enum RTCBundlePolicy { 40 "balanced", 41 "max-compat", 42 "max-bundle" 43 }; 44 45 [ 46 Conditional=WEB_RTC, 47 EnabledAtRuntime=PeerConnection, 31 48 JSGenerateToJSObject, 32 49 ] dictionary RTCConfiguration { … … 34 51 RTCIceTransportPolicy iceTransportPolicy = "all"; 35 52 RTCBundlePolicy bundlePolicy = "balanced"; 53 // FIXME 169662: missing rtcpMuxPolicy 54 // FIXME 169662: missing peerIdentity 55 // FIXME 169662: missing certificates 56 // FIXME 169662: missing iceCandidatePoolSize 36 57 }; -
trunk/Source/WebCore/Modules/mediastream/RTCIceTransport.h
r206856 r214030 1 1 /* 2 2 * Copyright (C) 2016 Ericsson AB. All rights reserved. 3 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 33 34 #if ENABLE(WEB_RTC) 34 35 35 #include " PeerConnectionStates.h"36 #include "RTCEnums.h" 36 37 #include "ScriptWrappable.h" 37 38 #include <wtf/RefCounted.h> … … 42 43 class RTCIceTransport : public RefCounted<RTCIceTransport>, public ScriptWrappable { 43 44 public: 44 45 using TransportState = PeerConnectionStates::IceTransportState;46 using GatheringState = PeerConnectionStates::IceGatheringState;47 48 45 static Ref<RTCIceTransport> create() 49 46 { … … 52 49 virtual ~RTCIceTransport() { } 53 50 54 TransportState transportState() const { return m_transportState; }55 void setTransportState( TransportState state) { m_transportState = state; }51 RTCIceTransportState transportState() const { return m_transportState; } 52 void setTransportState(RTCIceTransportState state) { m_transportState = state; } 56 53 57 GatheringState gatheringState() const { return m_gatheringState; }58 void setGatheringState( GatheringState state) { m_gatheringState = state; }54 RTCIceGatheringState gatheringState() const { return m_gatheringState; } 55 void setGatheringState(RTCIceGatheringState state) { m_gatheringState = state; } 59 56 60 57 private: 61 58 RTCIceTransport() { }; 62 59 63 TransportState m_transportState {TransportState::New };64 GatheringState m_gatheringState {GatheringState::New };60 RTCIceTransportState m_transportState { RTCIceTransportState::New }; 61 RTCIceGatheringState m_gatheringState { RTCIceGatheringState::New }; 65 62 }; 66 63 -
trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
r213992 r214030 59 59 60 60 using namespace PeerConnection; 61 using namespace PeerConnectionStates;62 61 63 62 Ref<RTCPeerConnection> RTCPeerConnection::create(ScriptExecutionContext& context) … … 67 66 // RTCPeerConnection may send events at about any time during its lifetime. 68 67 // Let's make it uncollectable until the pc is closed by JS or the page stops it. 69 if (peerConnection->m_signalingState != SignalingState::Closed) {68 if (peerConnection->m_signalingState != RTCSignalingState::Closed) { 70 69 peerConnection->setPendingActivity(peerConnection.ptr()); 71 70 peerConnection->registerToController(); … … 98 97 ExceptionOr<Ref<RTCRtpSender>> RTCPeerConnection::addTrack(Ref<MediaStreamTrack>&& track, const Vector<std::reference_wrapper<MediaStream>>& streams) 99 98 { 100 if (m_signalingState == SignalingState::Closed)99 if (m_signalingState == RTCSignalingState::Closed) 101 100 return Exception { INVALID_STATE_ERR }; 102 101 … … 154 153 ExceptionOr<void> RTCPeerConnection::removeTrack(RTCRtpSender& sender) 155 154 { 156 if (m_signalingState == SignalingState::Closed)155 if (m_signalingState == RTCSignalingState::Closed) 157 156 return Exception { INVALID_STATE_ERR }; 158 157 … … 175 174 ExceptionOr<Ref<RTCRtpTransceiver>> RTCPeerConnection::addTransceiver(Ref<MediaStreamTrack>&& track, const RTCRtpTransceiverInit& init) 176 175 { 177 if (m_signalingState == SignalingState::Closed)176 if (m_signalingState == RTCSignalingState::Closed) 178 177 return Exception { INVALID_STATE_ERR }; 179 178 … … 193 192 ExceptionOr<Ref<RTCRtpTransceiver>> RTCPeerConnection::addTransceiver(const String& kind, const RTCRtpTransceiverInit& init) 194 193 { 195 if (m_signalingState == SignalingState::Closed)194 if (m_signalingState == RTCSignalingState::Closed) 196 195 return Exception { INVALID_STATE_ERR }; 197 196 … … 221 220 void RTCPeerConnection::queuedCreateOffer(RTCOfferOptions&& options, SessionDescriptionPromise&& promise) 222 221 { 223 if (m_signalingState == SignalingState::Closed) {222 if (m_signalingState == RTCSignalingState::Closed) { 224 223 promise.reject(INVALID_STATE_ERR); 225 224 return; … … 231 230 void RTCPeerConnection::queuedCreateAnswer(RTCAnswerOptions&& options, SessionDescriptionPromise&& promise) 232 231 { 233 if (m_signalingState == SignalingState::Closed) {232 if (m_signalingState == RTCSignalingState::Closed) { 234 233 promise.reject(INVALID_STATE_ERR); 235 234 return; … … 241 240 void RTCPeerConnection::queuedSetLocalDescription(RTCSessionDescription& description, DOMPromise<void>&& promise) 242 241 { 243 if (m_signalingState == SignalingState::Closed) {242 if (m_signalingState == RTCSignalingState::Closed) { 244 243 promise.reject(INVALID_STATE_ERR); 245 244 return; … … 266 265 void RTCPeerConnection::queuedSetRemoteDescription(RTCSessionDescription& description, DOMPromise<void>&& promise) 267 266 { 268 if (m_signalingState == SignalingState::Closed) {267 if (m_signalingState == RTCSignalingState::Closed) { 269 268 promise.reject(INVALID_STATE_ERR); 270 269 return; … … 291 290 void RTCPeerConnection::queuedAddIceCandidate(RTCIceCandidate& rtcCandidate, DOMPromise<void>&& promise) 292 291 { 293 if (m_signalingState == SignalingState::Closed) {292 if (m_signalingState == RTCSignalingState::Closed) { 294 293 promise.reject(INVALID_STATE_ERR); 295 294 return; … … 299 298 } 300 299 301 String RTCPeerConnection::signalingState() const302 {303 switch (m_signalingState) {304 case SignalingState::Stable:305 return ASCIILiteral("stable");306 case SignalingState::HaveLocalOffer:307 return ASCIILiteral("have-local-offer");308 case SignalingState::HaveRemoteOffer:309 return ASCIILiteral("have-remote-offer");310 case SignalingState::HaveLocalPrAnswer:311 return ASCIILiteral("have-local-pranswer");312 case SignalingState::HaveRemotePrAnswer:313 return ASCIILiteral("have-remote-pranswer");314 case SignalingState::Closed:315 return ASCIILiteral("closed");316 }317 318 ASSERT_NOT_REACHED();319 return String();320 }321 322 String RTCPeerConnection::iceGatheringState() const323 {324 switch (m_iceGatheringState) {325 case IceGatheringState::New:326 return ASCIILiteral("new");327 case IceGatheringState::Gathering:328 return ASCIILiteral("gathering");329 case IceGatheringState::Complete:330 return ASCIILiteral("complete");331 }332 333 ASSERT_NOT_REACHED();334 return String();335 }336 337 String RTCPeerConnection::iceConnectionState() const338 {339 switch (m_iceConnectionState) {340 case IceConnectionState::New:341 return ASCIILiteral("new");342 case IceConnectionState::Checking:343 return ASCIILiteral("checking");344 case IceConnectionState::Connected:345 return ASCIILiteral("connected");346 case IceConnectionState::Completed:347 return ASCIILiteral("completed");348 case IceConnectionState::Failed:349 return ASCIILiteral("failed");350 case IceConnectionState::Disconnected:351 return ASCIILiteral("disconnected");352 case IceConnectionState::Closed:353 return ASCIILiteral("closed");354 }355 356 ASSERT_NOT_REACHED();357 return String();358 }359 360 300 ExceptionOr<void> RTCPeerConnection::setConfiguration(RTCConfiguration&& configuration) 361 301 { 362 if (m_signalingState == SignalingState::Closed)302 if (m_signalingState == RTCSignalingState::Closed) 363 303 return Exception { INVALID_STATE_ERR }; 364 304 … … 399 339 ExceptionOr<Ref<RTCDataChannel>> RTCPeerConnection::createDataChannel(ScriptExecutionContext& context, String&& label, RTCDataChannelInit&& options) 400 340 { 401 if (m_signalingState == SignalingState::Closed)341 if (m_signalingState == RTCSignalingState::Closed) 402 342 return Exception { INVALID_STATE_ERR }; 403 343 … … 412 352 void RTCPeerConnection::close() 413 353 { 414 if (m_signalingState == SignalingState::Closed)354 if (m_signalingState == RTCSignalingState::Closed) 415 355 return; 416 356 417 357 m_backend->stop(); 418 358 419 m_iceConnectionState = IceConnectionState::Closed;420 m_signalingState = SignalingState::Closed;359 m_iceConnectionState = RTCIceConnectionState::Closed; 360 m_signalingState = RTCSignalingState::Closed; 421 361 422 362 for (RTCRtpSender& sender : m_transceiverSet->senders()) … … 471 411 } 472 412 473 void RTCPeerConnection::setSignalingState( SignalingState newState)413 void RTCPeerConnection::setSignalingState(RTCSignalingState newState) 474 414 { 475 415 m_signalingState = newState; 476 416 } 477 417 478 void RTCPeerConnection::updateIceGatheringState( IceGatheringState newState)418 void RTCPeerConnection::updateIceGatheringState(RTCIceGatheringState newState) 479 419 { 480 420 scriptExecutionContext()->postTask([protectedThis = makeRef(*this), newState](ScriptExecutionContext&) { 481 if (protectedThis->m_signalingState == SignalingState::Closed || protectedThis->m_iceGatheringState == newState)421 if (protectedThis->m_signalingState == RTCSignalingState::Closed || protectedThis->m_iceGatheringState == newState) 482 422 return; 483 423 … … 487 427 } 488 428 489 void RTCPeerConnection::updateIceConnectionState( IceConnectionState newState)429 void RTCPeerConnection::updateIceConnectionState(RTCIceConnectionState newState) 490 430 { 491 431 scriptExecutionContext()->postTask([protectedThis = makeRef(*this), newState](ScriptExecutionContext&) { 492 if (protectedThis->m_signalingState == SignalingState::Closed || protectedThis->m_iceConnectionState == newState)432 if (protectedThis->m_signalingState == RTCSignalingState::Closed || protectedThis->m_iceConnectionState == newState) 493 433 return; 494 434 … … 501 441 { 502 442 scriptExecutionContext()->postTask([protectedThis = makeRef(*this)](ScriptExecutionContext&) { 503 if (protectedThis->m_signalingState == SignalingState::Closed)443 if (protectedThis->m_signalingState == RTCSignalingState::Closed) 504 444 return; 505 445 if (!protectedThis->m_backend->isNegotiationNeeded()) -
trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h
r213992 r214030 39 39 #include "EventTarget.h" 40 40 #include "MediaStream.h" 41 #include "RTCAnswerOptions.h"42 41 #include "RTCConfiguration.h" 43 42 #include "RTCDataChannel.h" 44 43 #include "RTCEnums.h" 45 #include "RTCOfferOptions.h"46 44 #include "RTCRtpTransceiver.h" 47 45 … … 56 54 class RTCStatsCallback; 57 55 56 struct RTCAnswerOptions; 57 struct RTCOfferOptions; 58 58 struct RTCRtpTransceiverInit { 59 59 RTCRtpTransceiverDirection direction; … … 65 65 virtual ~RTCPeerConnection(); 66 66 67 using AnswerOptions = RTCAnswerOptions;68 67 using DataChannelInit = RTCDataChannelInit; 69 using OfferAnswerOptions = RTCOfferAnswerOptions;70 using OfferOptions = RTCOfferOptions;71 68 72 69 ExceptionOr<void> initializeWith(Document&, RTCConfiguration&&); … … 98 95 RefPtr<RTCSessionDescription> pendingRemoteDescription() const; 99 96 100 String signalingState() const;97 RTCSignalingState signalingState() const { return m_signalingState; } 101 98 102 99 void queuedAddIceCandidate(RTCIceCandidate&, DOMPromise<void>&&); 103 100 104 String iceGatheringState() const;105 String iceConnectionState() const;101 RTCIceGatheringState iceGatheringState() const { return m_iceGatheringState; } 102 RTCIceConnectionState iceConnectionState() const { return m_iceConnectionState; } 106 103 107 104 const RTCConfiguration& getConfiguration() const { return m_configuration; } … … 126 123 // API used by PeerConnectionBackend and relatives 127 124 void addTransceiver(Ref<RTCRtpTransceiver>&&); 128 void setSignalingState( PeerConnectionStates::SignalingState);129 void updateIceGatheringState( PeerConnectionStates::IceGatheringState);130 void updateIceConnectionState( PeerConnectionStates::IceConnectionState);125 void setSignalingState(RTCSignalingState); 126 void updateIceGatheringState(RTCIceGatheringState); 127 void updateIceConnectionState(RTCIceConnectionState); 131 128 132 129 void scheduleNegotiationNeededEvent(); … … 134 131 RTCRtpSenderClient& senderClient() { return *this; } 135 132 void fireEvent(Event&); 136 PeerConnectionStates::SignalingState internalSignalingState() const { return m_signalingState; }137 PeerConnectionStates::IceGatheringState internalIceGatheringState() const { return m_iceGatheringState; }138 PeerConnectionStates::IceConnectionState internalIceConnectionState() const { return m_iceConnectionState; }139 133 140 134 void disableICECandidateFiltering() { m_backend->disableICECandidateFiltering(); } … … 162 156 void replaceTrack(RTCRtpSender&, Ref<MediaStreamTrack>&&, DOMPromise<void>&&) final; 163 157 164 PeerConnectionStates::SignalingState m_signalingState { PeerConnectionStates::SignalingState::Stable };165 PeerConnectionStates::IceGatheringState m_iceGatheringState { PeerConnectionStates::IceGatheringState::New };166 PeerConnectionStates::IceConnectionState m_iceConnectionState { PeerConnectionStates::IceConnectionState::New };158 RTCSignalingState m_signalingState { RTCSignalingState::Stable }; 159 RTCIceGatheringState m_iceGatheringState { RTCIceGatheringState::New }; 160 RTCIceConnectionState m_iceConnectionState { RTCIceConnectionState::New }; 167 161 168 162 std::unique_ptr<RtpTransceiverSet> m_transceiverSet { std::unique_ptr<RtpTransceiverSet>(new RtpTransceiverSet()) }; -
trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl
r213992 r214030 93 93 [JSBuiltin] Promise<void> addIceCandidate(RTCIceCandidate candidate); 94 94 95 // FIXME 169644: convert to enum 96 readonly attribute DOMString signalingState; 97 // FIXME 169644: convert to enum 98 readonly attribute DOMString iceGatheringState; 99 // FIXME 169644: convert to enum 100 readonly attribute DOMString iceConnectionState; 95 readonly attribute RTCSignalingState signalingState; 96 readonly attribute RTCIceGatheringState iceGatheringState; 97 readonly attribute RTCIceConnectionState iceConnectionState; 101 98 102 99 // FIXME 169644: missing connectionState -
trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp
r213884 r214030 1 1 /* 2 * Copyright (C) 2017 Apple Inc. 2 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 39 39 #include "RTCDataChannel.h" 40 40 #include "RTCDataChannelEvent.h" 41 #include "RTCEnums.h" 41 42 #include "RTCPeerConnection.h" 42 43 #include "RTCSessionDescription.h" … … 349 350 } 350 351 351 static PeerConnectionStates::SignalingState signalingState(webrtc::PeerConnectionInterface::SignalingState state)352 static RTCSignalingState signalingState(webrtc::PeerConnectionInterface::SignalingState state) 352 353 { 353 354 switch (state) { 354 355 case webrtc::PeerConnectionInterface::kStable: 355 return PeerConnectionStates::SignalingState::Stable;356 return RTCSignalingState::Stable; 356 357 case webrtc::PeerConnectionInterface::kHaveLocalOffer: 357 return PeerConnectionStates::SignalingState::HaveLocalOffer;358 return RTCSignalingState::HaveLocalOffer; 358 359 case webrtc::PeerConnectionInterface::kHaveLocalPrAnswer: 359 return PeerConnectionStates::SignalingState::HaveLocalPrAnswer;360 return RTCSignalingState::HaveLocalPranswer; 360 361 case webrtc::PeerConnectionInterface::kHaveRemoteOffer: 361 return PeerConnectionStates::SignalingState::HaveRemoteOffer;362 return RTCSignalingState::HaveRemoteOffer; 362 363 case webrtc::PeerConnectionInterface::kHaveRemotePrAnswer: 363 return PeerConnectionStates::SignalingState::HaveRemotePrAnswer;364 return RTCSignalingState::HaveRemotePranswer; 364 365 case webrtc::PeerConnectionInterface::kClosed: 365 return PeerConnectionStates::SignalingState::Closed;366 return RTCSignalingState::Closed; 366 367 } 367 368 } … … 496 497 } 497 498 498 static inline PeerConnectionStates::IceConnectionState iceConnectionState(webrtc::PeerConnectionInterface::IceConnectionState state)499 static inline RTCIceConnectionState toRTCIceConnectionState(webrtc::PeerConnectionInterface::IceConnectionState state) 499 500 { 500 501 switch (state) { 501 502 case webrtc::PeerConnectionInterface::kIceConnectionNew: 502 return PeerConnectionStates::IceConnectionState::New;503 return RTCIceConnectionState::New; 503 504 case webrtc::PeerConnectionInterface::kIceConnectionChecking: 504 return PeerConnectionStates::IceConnectionState::Checking;505 return RTCIceConnectionState::Checking; 505 506 case webrtc::PeerConnectionInterface::kIceConnectionConnected: 506 return PeerConnectionStates::IceConnectionState::Connected;507 return RTCIceConnectionState::Connected; 507 508 case webrtc::PeerConnectionInterface::kIceConnectionCompleted: 508 return PeerConnectionStates::IceConnectionState::Completed;509 return RTCIceConnectionState::Completed; 509 510 case webrtc::PeerConnectionInterface::kIceConnectionFailed: 510 return PeerConnectionStates::IceConnectionState::Failed;511 return RTCIceConnectionState::Failed; 511 512 case webrtc::PeerConnectionInterface::kIceConnectionDisconnected: 512 return PeerConnectionStates::IceConnectionState::Disconnected;513 return RTCIceConnectionState::Disconnected; 513 514 case webrtc::PeerConnectionInterface::kIceConnectionClosed: 514 return PeerConnectionStates::IceConnectionState::Closed;515 return RTCIceConnectionState::Closed; 515 516 case webrtc::PeerConnectionInterface::kIceConnectionMax: 516 517 ASSERT_NOT_REACHED(); 517 return PeerConnectionStates::IceConnectionState::New;518 return RTCIceConnectionState::New; 518 519 } 519 520 } … … 521 522 void LibWebRTCMediaEndpoint::OnIceConnectionChange(webrtc::PeerConnectionInterface::IceConnectionState state) 522 523 { 523 auto connectionState = iceConnectionState(state);524 auto connectionState = toRTCIceConnectionState(state); 524 525 callOnMainThread([protectedThis = makeRef(*this), connectionState] { 525 526 if (protectedThis->isStopped()) 526 527 return; 527 if (protectedThis->m_peerConnectionBackend.connection().i nternalIceConnectionState() != connectionState)528 if (protectedThis->m_peerConnectionBackend.connection().iceConnectionState() != connectionState) 528 529 protectedThis->m_peerConnectionBackend.connection().updateIceConnectionState(connectionState); 529 530 }); -
trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp
r213736 r214030 74 74 webrtc::PeerConnectionInterface::RTCConfiguration rtcConfiguration; 75 75 76 if (configuration.iceTransportPolicy == PeerConnectionStates::IceTransportPolicy::Relay)76 if (configuration.iceTransportPolicy == RTCIceTransportPolicy::Relay) 77 77 rtcConfiguration.type = webrtc::PeerConnectionInterface::kRelay; 78 78 … … 81 81 // See https://bugs.webkit.org/show_bug.cgi?id=169389. 82 82 83 if (configuration.bundlePolicy == PeerConnectionStates::BundlePolicy::MaxCompat)83 if (configuration.bundlePolicy == RTCBundlePolicy::MaxCompat) 84 84 rtcConfiguration.bundle_policy = webrtc::PeerConnectionInterface::kBundlePolicyMaxCompat; 85 85 -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r214027 r214030 1427 1427 316DCB311E78FB6C001B5F87 /* JSRTCAnswerOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316DCB2D1E78F496001B5F87 /* JSRTCAnswerOptions.cpp */; }; 1428 1428 316DCB321E78FB70001B5F87 /* JSRTCOfferOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316DCB2F1E78F496001B5F87 /* JSRTCOfferOptions.cpp */; }; 1429 316DCB371E790E1B001B5F87 /* RTCIceGatheringState.h in Headers */ = {isa = PBXBuildFile; fileRef = 316DCB341E790E1B001B5F87 /* RTCIceGatheringState.h */; }; 1430 316DCB3D1E790E2C001B5F87 /* RTCIceConnectionState.h in Headers */ = {isa = PBXBuildFile; fileRef = 316DCB3A1E790E2C001B5F87 /* RTCIceConnectionState.h */; }; 1431 316DCB431E790E3C001B5F87 /* RTCSignalingState.h in Headers */ = {isa = PBXBuildFile; fileRef = 316DCB401E790E3C001B5F87 /* RTCSignalingState.h */; }; 1432 316DCB4B1E7910A6001B5F87 /* JSRTCIceConnectionState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316DCB451E7910A6001B5F87 /* JSRTCIceConnectionState.cpp */; }; 1433 316DCB4C1E7910A6001B5F87 /* JSRTCIceConnectionState.h in Headers */ = {isa = PBXBuildFile; fileRef = 316DCB461E7910A6001B5F87 /* JSRTCIceConnectionState.h */; }; 1434 316DCB4D1E7910A6001B5F87 /* JSRTCIceGatheringState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316DCB471E7910A6001B5F87 /* JSRTCIceGatheringState.cpp */; }; 1435 316DCB4E1E7910A6001B5F87 /* JSRTCIceGatheringState.h in Headers */ = {isa = PBXBuildFile; fileRef = 316DCB481E7910A6001B5F87 /* JSRTCIceGatheringState.h */; }; 1436 316DCB4F1E7910A6001B5F87 /* JSRTCSignalingState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316DCB491E7910A6001B5F87 /* JSRTCSignalingState.cpp */; }; 1437 316DCB501E7910A6001B5F87 /* JSRTCSignalingState.h in Headers */ = {isa = PBXBuildFile; fileRef = 316DCB4A1E7910A6001B5F87 /* JSRTCSignalingState.h */; }; 1429 1438 316FE0710E6CCBEE00BF6088 /* JSCSSKeyframeRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316FE06D0E6CCBEE00BF6088 /* JSCSSKeyframeRule.cpp */; }; 1430 1439 316FE0720E6CCBEE00BF6088 /* JSCSSKeyframeRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 316FE06E0E6CCBEE00BF6088 /* JSCSSKeyframeRule.h */; }; … … 8919 8928 316DCB2F1E78F496001B5F87 /* JSRTCOfferOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCOfferOptions.cpp; sourceTree = "<group>"; }; 8920 8929 316DCB301E78F496001B5F87 /* JSRTCOfferOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCOfferOptions.h; sourceTree = "<group>"; }; 8930 316DCB341E790E1B001B5F87 /* RTCIceGatheringState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCIceGatheringState.h; sourceTree = "<group>"; }; 8931 316DCB351E790E1B001B5F87 /* RTCIceGatheringState.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCIceGatheringState.idl; sourceTree = "<group>"; }; 8932 316DCB3A1E790E2C001B5F87 /* RTCIceConnectionState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCIceConnectionState.h; sourceTree = "<group>"; }; 8933 316DCB3B1E790E2C001B5F87 /* RTCIceConnectionState.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCIceConnectionState.idl; sourceTree = "<group>"; }; 8934 316DCB401E790E3C001B5F87 /* RTCSignalingState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCSignalingState.h; sourceTree = "<group>"; }; 8935 316DCB411E790E3C001B5F87 /* RTCSignalingState.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCSignalingState.idl; sourceTree = "<group>"; }; 8936 316DCB451E7910A6001B5F87 /* JSRTCIceConnectionState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCIceConnectionState.cpp; sourceTree = "<group>"; }; 8937 316DCB461E7910A6001B5F87 /* JSRTCIceConnectionState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCIceConnectionState.h; sourceTree = "<group>"; }; 8938 316DCB471E7910A6001B5F87 /* JSRTCIceGatheringState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCIceGatheringState.cpp; sourceTree = "<group>"; }; 8939 316DCB481E7910A6001B5F87 /* JSRTCIceGatheringState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCIceGatheringState.h; sourceTree = "<group>"; }; 8940 316DCB491E7910A6001B5F87 /* JSRTCSignalingState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCSignalingState.cpp; sourceTree = "<group>"; }; 8941 316DCB4A1E7910A6001B5F87 /* JSRTCSignalingState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCSignalingState.h; sourceTree = "<group>"; }; 8921 8942 316FE06D0E6CCBEE00BF6088 /* JSCSSKeyframeRule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSKeyframeRule.cpp; sourceTree = "<group>"; }; 8922 8943 316FE06E0E6CCBEE00BF6088 /* JSCSSKeyframeRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCSSKeyframeRule.h; sourceTree = "<group>"; }; … … 15885 15906 07221B7517CEC32700848E51 /* RTCIceCandidateEvent.h */, 15886 15907 07221B7617CEC32700848E51 /* RTCIceCandidateEvent.idl */, 15908 316DCB3A1E790E2C001B5F87 /* RTCIceConnectionState.h */, 15909 316DCB3B1E790E2C001B5F87 /* RTCIceConnectionState.idl */, 15910 316DCB341E790E1B001B5F87 /* RTCIceGatheringState.h */, 15911 316DCB351E790E1B001B5F87 /* RTCIceGatheringState.idl */, 15887 15912 07AB996718DA3C010018771E /* RTCIceServer.h */, 15888 15913 07AB996818DA3C010018771E /* RTCIceServer.idl */, … … 15912 15937 07221B7B17CEC32700848E51 /* RTCSessionDescription.h */, 15913 15938 07221B7C17CEC32700848E51 /* RTCSessionDescription.idl */, 15939 316DCB401E790E3C001B5F87 /* RTCSignalingState.h */, 15940 316DCB411E790E3C001B5F87 /* RTCSignalingState.idl */, 15914 15941 07221B8417CEC32700848E51 /* RTCStatsReport.h */, 15915 15942 07221B8517CEC32700848E51 /* RTCStatsReport.idl */, … … 16107 16134 07969D9D17D14151007FF842 /* JSRTCIceCandidateEvent.cpp */, 16108 16135 07969D9E17D14151007FF842 /* JSRTCIceCandidateEvent.h */, 16136 316DCB451E7910A6001B5F87 /* JSRTCIceConnectionState.cpp */, 16137 316DCB461E7910A6001B5F87 /* JSRTCIceConnectionState.h */, 16138 316DCB471E7910A6001B5F87 /* JSRTCIceGatheringState.cpp */, 16139 316DCB481E7910A6001B5F87 /* JSRTCIceGatheringState.h */, 16109 16140 073794E919EE341E00E5A045 /* JSRTCIceServer.cpp */, 16110 16141 073794EA19EE341E00E5A045 /* JSRTCIceServer.h */, … … 16125 16156 07969DA117D14151007FF842 /* JSRTCSessionDescription.cpp */, 16126 16157 07969DA217D14151007FF842 /* JSRTCSessionDescription.h */, 16158 316DCB491E7910A6001B5F87 /* JSRTCSignalingState.cpp */, 16159 316DCB4A1E7910A6001B5F87 /* JSRTCSignalingState.h */, 16127 16160 07969DA717D14151007FF842 /* JSRTCStatsReport.cpp */, 16128 16161 07969DA817D14151007FF842 /* JSRTCStatsReport.h */, … … 26122 26155 512DD8F60D91E6AF000F89EE /* Archive.h in Headers */, 26123 26156 512DD8FD0D91E6AF000F89EE /* ArchiveFactory.h in Headers */, 26157 316DCB4E1E7910A6001B5F87 /* JSRTCIceGatheringState.h in Headers */, 26124 26158 512DD8FC0D91E6AF000F89EE /* ArchiveResource.h in Headers */, 26125 26159 512DD8F80D91E6AF000F89EE /* ArchiveResourceCollection.h in Headers */, … … 27194 27228 5185FCA91BB4C4E80012898F /* IDBRequest.h in Headers */, 27195 27229 514129991C6976900059E714 /* IDBRequestCompletionEvent.h in Headers */, 27230 316DCB3D1E790E2C001B5F87 /* RTCIceConnectionState.h in Headers */, 27196 27231 510A58FA1BACC7F200C19282 /* IDBRequestData.h in Headers */, 27197 27232 5145B10A1BC48E2E00E86219 /* IDBResourceIdentifier.h in Headers */, … … 27734 27769 E44613EE0CD681BB00FADA75 /* JSProgressEvent.h in Headers */, 27735 27770 077664FD183E6B5C00133B92 /* JSQuickTimePluginReplacement.h in Headers */, 27771 316DCB371E790E1B001B5F87 /* RTCIceGatheringState.h in Headers */, 27736 27772 B658FFA21522EF3A00DD5595 /* JSRadioNodeList.h in Headers */, 27737 27773 65DF320209D1CC60000BE325 /* JSRange.h in Headers */, … … 28043 28079 517A63C51B74318F00E7DCDC /* KeyedDecoderCF.h in Headers */, 28044 28080 517A63C61B74319200E7DCDC /* KeyedEncoderCF.h in Headers */, 28081 316DCB4C1E7910A6001B5F87 /* JSRTCIceConnectionState.h in Headers */, 28045 28082 A513B3D7114B1666001C429B /* KeyEventCocoa.h in Headers */, 28046 28083 265541391489811C000DFC5D /* KeyEventCodesIOS.h in Headers */, … … 28708 28745 436708D712D9CA4B00044234 /* RenderSVGResourceGradient.h in Headers */, 28709 28746 436708D912D9CA4B00044234 /* RenderSVGResourceLinearGradient.h in Headers */, 28747 316DCB431E790E3C001B5F87 /* RTCSignalingState.h in Headers */, 28710 28748 436708DB12D9CA4B00044234 /* RenderSVGResourceMarker.h in Headers */, 28711 28749 436708DD12D9CA4B00044234 /* RenderSVGResourceMasker.h in Headers */, … … 29288 29326 081DD49C13BA1A6000DC7627 /* SVGPropertyInfo.h in Headers */, 29289 29327 088A0E0B126EF1DB00978F7A /* SVGPropertyTearOff.h in Headers */, 29328 316DCB501E7910A6001B5F87 /* JSRTCSignalingState.h in Headers */, 29290 29329 088A0E0C126EF1DB00978F7A /* SVGPropertyTraits.h in Headers */, 29291 29330 B2227A9A0D00BF220071B782 /* SVGRadialGradientElement.h in Headers */, … … 30951 30990 E112F4711E3A861200D6CDFD /* Grid.cpp in Sources */, 30952 30991 CDF7483E18FEBCEC0006ECC0 /* GridPositionsResolver.cpp in Sources */, 30992 316DCB4B1E7910A6001B5F87 /* JSRTCIceConnectionState.cpp in Sources */, 30953 30993 E12DE7171E4B749C00F9ACCF /* GridTrackSizingAlgorithm.cpp in Sources */, 30954 30994 F55B3DBF1251F12D003EF269 /* HiddenInputType.cpp in Sources */, … … 30986 31026 A8EA79F90A1916DF00A8EF5F /* HTMLDirectoryElement.cpp in Sources */, 30987 31027 A8EA7CB10A192B9C00A8EF5F /* HTMLDivElement.cpp in Sources */, 31028 316DCB4F1E7910A6001B5F87 /* JSRTCSignalingState.cpp in Sources */, 30988 31029 A8EA79F50A1916DF00A8EF5F /* HTMLDListElement.cpp in Sources */, 30989 31030 93F19A9108245E59001E9ABC /* HTMLDocument.cpp in Sources */, … … 31328 31369 BC46C2020C0DDC8F0020CFC3 /* JSCSSPageRule.cpp in Sources */, 31329 31370 14CF7B3309F6ECD700EB3665 /* JSCSSRule.cpp in Sources */, 31371 316DCB4D1E7910A6001B5F87 /* JSRTCIceGatheringState.cpp in Sources */, 31330 31372 BC46C1EE0C0DDBDF0020CFC3 /* JSCSSRuleCustom.cpp in Sources */, 31331 31373 A8D05FA70A23B301005E7203 /* JSCSSRuleList.cpp in Sources */, -
trunk/Source/WebCore/platform/mediastream/MediaEndpoint.h
r212329 r214030 1 1 /* 2 2 * Copyright (C) 2015 Ericsson AB. All rights reserved. 3 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 67 68 }; 68 69 69 using IceTransportState = PeerConnectionStates::IceTransportState;70 71 70 virtual void setConfiguration(MediaEndpointConfiguration&&) = 0; 72 71 … … 99 98 virtual void gotIceCandidate(const String& mid, IceCandidate&&) = 0; 100 99 virtual void doneGatheringCandidates(const String& mid) = 0; 101 virtual void iceTransportStateChanged(const String& mid, MediaEndpoint::IceTransportState) = 0;100 virtual void iceTransportStateChanged(const String& mid, RTCIceTransportState) = 0; 102 101 103 102 virtual ~MediaEndpointClient() { } -
trunk/Source/WebCore/platform/mediastream/MediaEndpointConfiguration.cpp
r207818 r214030 1 1 /* 2 2 * Copyright (C) 2015 Ericsson AB. All rights reserved. 3 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 36 37 namespace WebCore { 37 38 38 MediaEndpointConfiguration::MediaEndpointConfiguration(Vector<IceServerInfo>&& iceServers, IceTransportPolicy iceTransportPolicy,BundlePolicy bundlePolicy)39 MediaEndpointConfiguration::MediaEndpointConfiguration(Vector<IceServerInfo>&& iceServers, RTCIceTransportPolicy iceTransportPolicy, RTCBundlePolicy bundlePolicy) 39 40 : iceServers(WTFMove(iceServers)) 40 41 , iceTransportPolicy(iceTransportPolicy) -
trunk/Source/WebCore/platform/mediastream/MediaEndpointConfiguration.h
r207818 r214030 1 1 /* 2 2 * Copyright (C) 2015 Ericsson AB. All rights reserved. 3 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 33 34 #if ENABLE(WEB_RTC) 34 35 35 #include " PeerConnectionStates.h"36 #include "RTCEnums.h" 36 37 #include "URL.h" 37 38 #include <wtf/Vector.h> … … 50 51 }; 51 52 52 using IceTransportPolicy = PeerConnectionStates::IceTransportPolicy; 53 using BundlePolicy = PeerConnectionStates::BundlePolicy; 54 55 MediaEndpointConfiguration(Vector<IceServerInfo>&&, IceTransportPolicy, BundlePolicy); 53 MediaEndpointConfiguration(Vector<IceServerInfo>&&, RTCIceTransportPolicy, RTCBundlePolicy); 56 54 57 55 Vector<IceServerInfo> iceServers; 58 IceTransportPolicy iceTransportPolicy;59 BundlePolicy bundlePolicy;56 RTCIceTransportPolicy iceTransportPolicy; 57 RTCBundlePolicy bundlePolicy; 60 58 }; 61 59 -
trunk/Source/WebCore/platform/mediastream/PeerConnectionStates.h
r206856 r214030 1 1 /* 2 2 * Copyright (C) 2015, 2016 Ericsson AB. All rights reserved. 3 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 35 36 namespace WebCore { 36 37 37 namespace PeerConnectionStates { 38 39 enum class SignalingState { 40 Stable = 1, 41 HaveLocalOffer = 2, 42 HaveRemoteOffer = 3, 43 HaveLocalPrAnswer = 4, 44 HaveRemotePrAnswer = 5, 45 Closed = 6 38 enum class RTCSignalingState { 39 Stable, 40 HaveLocalOffer, 41 HaveRemoteOffer, 42 HaveLocalPranswer, 43 HaveRemotePranswer, 44 Closed 46 45 }; 47 46 48 enum class IceConnectionState {49 New = 1,50 Checking = 2,51 Connected = 3,52 Completed = 4,53 Failed = 5,54 Disconnected = 6,55 Closed = 747 enum class RTCIceConnectionState { 48 New, 49 Checking, 50 Connected, 51 Completed, 52 Failed, 53 Disconnected, 54 Closed 56 55 }; 57 56 58 enum class IceGatheringState {59 New = 1,60 Gathering = 2,61 Complete = 357 enum class RTCIceGatheringState { 58 New, 59 Gathering, 60 Complete 62 61 }; 63 62 64 enum class IceTransportState {65 New = 1,66 Checking = 2,67 Connected = 3,68 Completed = 4,69 Failed = 5,70 Disconnected = 6,71 Closed = 763 enum class RTCIceTransportState { 64 New, 65 Checking, 66 Connected, 67 Completed, 68 Failed, 69 Disconnected, 70 Closed 72 71 }; 73 72 74 enum class IceTransportPolicy {73 enum class RTCIceTransportPolicy { 75 74 Relay, 76 75 All 77 76 }; 78 77 79 enum class BundlePolicy {78 enum class RTCBundlePolicy { 80 79 Balanced, 81 80 MaxCompat, 82 81 MaxBundle 83 82 }; 83 84 85 // FIXME: Remove once older code is upgraded 86 namespace PeerConnectionStates { 87 88 using SignalingState = RTCSignalingState; 89 using IceConnectionState = RTCIceConnectionState; 90 using IceGatheringState = RTCIceGatheringState; 91 using IceTransportState = RTCIceTransportState; 92 using IceTransportPolicy = RTCIceTransportPolicy; 93 using BundlePolicy = RTCBundlePolicy; 84 94 85 95 } -
trunk/Source/WebCore/platform/mediastream/openwebrtc/MediaEndpointOwr.cpp
r213884 r214030 446 446 return; 447 447 448 MediaEndpoint::IceTransportState transportState;448 RTCIceTransportState transportState; 449 449 switch (owrIceState) { 450 450 case OWR_ICE_STATE_CONNECTING: 451 transportState = MediaEndpoint::IceTransportState::Checking;451 transportState = RTCIceTransportState::Checking; 452 452 break; 453 453 case OWR_ICE_STATE_CONNECTED: 454 transportState = MediaEndpoint::IceTransportState::Connected;454 transportState = RTCIceTransportState::Connected; 455 455 break; 456 456 case OWR_ICE_STATE_READY: 457 transportState = MediaEndpoint::IceTransportState::Completed;457 transportState = RTCIceTransportState::Completed; 458 458 break; 459 459 case OWR_ICE_STATE_FAILED: 460 transportState = MediaEndpoint::IceTransportState::Failed;460 transportState = RTCIceTransportState::Failed; 461 461 break; 462 462 default: -
trunk/Source/WebCore/platform/mock/MockMediaEndpoint.cpp
r213884 r214030 1 1 /* 2 2 * Copyright (C) 2015 Ericsson AB. All rights reserved. 3 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 278 279 // Should go to: 279 280 // 'checking' 280 m_iceTransportStateChanges.append(std::make_pair(m_mids[0], MediaEndpoint::IceTransportState::Checking));281 m_iceTransportStateChanges.append(std::make_pair(m_mids[1], MediaEndpoint::IceTransportState::Checking));282 m_iceTransportStateChanges.append(std::make_pair(m_mids[2], MediaEndpoint::IceTransportState::Checking));281 m_iceTransportStateChanges.append(std::make_pair(m_mids[0], RTCIceTransportState::Checking)); 282 m_iceTransportStateChanges.append(std::make_pair(m_mids[1], RTCIceTransportState::Checking)); 283 m_iceTransportStateChanges.append(std::make_pair(m_mids[2], RTCIceTransportState::Checking)); 283 284 284 285 // 'connected' 285 m_iceTransportStateChanges.append(std::make_pair(m_mids[0], MediaEndpoint::IceTransportState::Connected));286 m_iceTransportStateChanges.append(std::make_pair(m_mids[1], MediaEndpoint::IceTransportState::Completed));287 m_iceTransportStateChanges.append(std::make_pair(m_mids[2], MediaEndpoint::IceTransportState::Closed));286 m_iceTransportStateChanges.append(std::make_pair(m_mids[0], RTCIceTransportState::Connected)); 287 m_iceTransportStateChanges.append(std::make_pair(m_mids[1], RTCIceTransportState::Completed)); 288 m_iceTransportStateChanges.append(std::make_pair(m_mids[2], RTCIceTransportState::Closed)); 288 289 289 290 // 'completed' 290 m_iceTransportStateChanges.append(std::make_pair(m_mids[0], MediaEndpoint::IceTransportState::Completed));291 m_iceTransportStateChanges.append(std::make_pair(m_mids[0], RTCIceTransportState::Completed)); 291 292 292 293 // 'failed' 293 m_iceTransportStateChanges.append(std::make_pair(m_mids[0], MediaEndpoint::IceTransportState::Failed));294 m_iceTransportStateChanges.append(std::make_pair(m_mids[0], RTCIceTransportState::Failed)); 294 295 295 296 // 'disconnected' 296 m_iceTransportStateChanges.append(std::make_pair(m_mids[1], MediaEndpoint::IceTransportState::Disconnected));297 m_iceTransportStateChanges.append(std::make_pair(m_mids[0], MediaEndpoint::IceTransportState::Closed));297 m_iceTransportStateChanges.append(std::make_pair(m_mids[1], RTCIceTransportState::Disconnected)); 298 m_iceTransportStateChanges.append(std::make_pair(m_mids[0], RTCIceTransportState::Closed)); 298 299 299 300 // 'new' 300 m_iceTransportStateChanges.append(std::make_pair(m_mids[1], MediaEndpoint::IceTransportState::Closed));301 m_iceTransportStateChanges.append(std::make_pair(m_mids[1], RTCIceTransportState::Closed)); 301 302 302 303 // Reverse order to use takeLast() while keeping the above order -
trunk/Source/WebCore/platform/mock/MockMediaEndpoint.h
r209416 r214030 1 1 /* 2 2 * Copyright (C) 2015 Ericsson AB. All rights reserved. 3 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 34 35 35 36 #include "MediaEndpoint.h" 37 #include "RTCEnums.h" 36 38 #include "Timer.h" 37 39 … … 86 88 Timer m_iceCandidateTimer; 87 89 88 Vector<std::pair<String, MediaEndpoint::IceTransportState>> m_iceTransportStateChanges;90 Vector<std::pair<String, RTCIceTransportState>> m_iceTransportStateChanges; 89 91 Timer m_iceTransportTimer; 90 92
Note: See TracChangeset
for help on using the changeset viewer.