OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 void PeerConnectionDelegateAdapter::OnSignalingChange( | 119 void PeerConnectionDelegateAdapter::OnSignalingChange( |
120 PeerConnectionInterface::SignalingState new_state) { | 120 PeerConnectionInterface::SignalingState new_state) { |
121 RTCSignalingState state = | 121 RTCSignalingState state = |
122 [[RTCPeerConnection class] signalingStateForNativeState:new_state]; | 122 [[RTCPeerConnection class] signalingStateForNativeState:new_state]; |
123 RTCPeerConnection *peer_connection = peer_connection_; | 123 RTCPeerConnection *peer_connection = peer_connection_; |
124 [peer_connection.delegate peerConnection:peer_connection | 124 [peer_connection.delegate peerConnection:peer_connection |
125 didChangeSignalingState:state]; | 125 didChangeSignalingState:state]; |
126 } | 126 } |
127 | 127 |
128 void PeerConnectionDelegateAdapter::OnAddStream( | 128 void PeerConnectionDelegateAdapter::OnAddStream( |
129 MediaStreamInterface *stream) { | 129 rtc::scoped_refptr<MediaStreamInterface> stream) { |
130 RTCMediaStream *mediaStream = | 130 RTCMediaStream *mediaStream = |
131 [[RTCMediaStream alloc] initWithNativeMediaStream:stream]; | 131 [[RTCMediaStream alloc] initWithNativeMediaStream:stream]; |
132 RTCPeerConnection *peer_connection = peer_connection_; | 132 RTCPeerConnection *peer_connection = peer_connection_; |
133 [peer_connection.delegate peerConnection:peer_connection | 133 [peer_connection.delegate peerConnection:peer_connection |
134 didAddStream:mediaStream]; | 134 didAddStream:mediaStream]; |
135 } | 135 } |
136 | 136 |
137 void PeerConnectionDelegateAdapter::OnRemoveStream( | 137 void PeerConnectionDelegateAdapter::OnRemoveStream( |
138 MediaStreamInterface *stream) { | 138 rtc::scoped_refptr<MediaStreamInterface> stream) { |
139 RTCMediaStream *mediaStream = | 139 RTCMediaStream *mediaStream = |
140 [[RTCMediaStream alloc] initWithNativeMediaStream:stream]; | 140 [[RTCMediaStream alloc] initWithNativeMediaStream:stream]; |
141 RTCPeerConnection *peer_connection = peer_connection_; | 141 RTCPeerConnection *peer_connection = peer_connection_; |
142 [peer_connection.delegate peerConnection:peer_connection | 142 [peer_connection.delegate peerConnection:peer_connection |
143 didRemoveStream:mediaStream]; | 143 didRemoveStream:mediaStream]; |
144 } | 144 } |
145 | 145 |
146 void PeerConnectionDelegateAdapter::OnDataChannel( | 146 void PeerConnectionDelegateAdapter::OnDataChannel( |
147 DataChannelInterface *data_channel) { | 147 rtc::scoped_refptr<DataChannelInterface> data_channel) { |
148 RTCDataChannel *dataChannel = | 148 RTCDataChannel *dataChannel = |
149 [[RTCDataChannel alloc] initWithNativeDataChannel:data_channel]; | 149 [[RTCDataChannel alloc] initWithNativeDataChannel:data_channel]; |
150 RTCPeerConnection *peer_connection = peer_connection_; | 150 RTCPeerConnection *peer_connection = peer_connection_; |
151 [peer_connection.delegate peerConnection:peer_connection | 151 [peer_connection.delegate peerConnection:peer_connection |
152 didOpenDataChannel:dataChannel]; | 152 didOpenDataChannel:dataChannel]; |
153 } | 153 } |
154 | 154 |
155 void PeerConnectionDelegateAdapter::OnRenegotiationNeeded() { | 155 void PeerConnectionDelegateAdapter::OnRenegotiationNeeded() { |
156 RTCPeerConnection *peer_connection = peer_connection_; | 156 RTCPeerConnection *peer_connection = peer_connection_; |
157 [peer_connection.delegate peerConnectionShouldNegotiate:peer_connection]; | 157 [peer_connection.delegate peerConnectionShouldNegotiate:peer_connection]; |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 case RTCStatsOutputLevelDebug: | 554 case RTCStatsOutputLevelDebug: |
555 return webrtc::PeerConnectionInterface::kStatsOutputLevelDebug; | 555 return webrtc::PeerConnectionInterface::kStatsOutputLevelDebug; |
556 } | 556 } |
557 } | 557 } |
558 | 558 |
559 - (rtc::scoped_refptr<webrtc::PeerConnectionInterface>)nativePeerConnection { | 559 - (rtc::scoped_refptr<webrtc::PeerConnectionInterface>)nativePeerConnection { |
560 return _peerConnection; | 560 return _peerConnection; |
561 } | 561 } |
562 | 562 |
563 @end | 563 @end |
OLD | NEW |