OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 std::string result; | 386 std::string result; |
387 switch (state) { | 387 switch (state) { |
388 GET_STRING_OF_STATE(STATE_INIT) | 388 GET_STRING_OF_STATE(STATE_INIT) |
389 GET_STRING_OF_STATE(STATE_SENTOFFER) | 389 GET_STRING_OF_STATE(STATE_SENTOFFER) |
390 GET_STRING_OF_STATE(STATE_RECEIVEDOFFER) | 390 GET_STRING_OF_STATE(STATE_RECEIVEDOFFER) |
391 GET_STRING_OF_STATE(STATE_SENTPRANSWER) | 391 GET_STRING_OF_STATE(STATE_SENTPRANSWER) |
392 GET_STRING_OF_STATE(STATE_RECEIVEDPRANSWER) | 392 GET_STRING_OF_STATE(STATE_RECEIVEDPRANSWER) |
393 GET_STRING_OF_STATE(STATE_INPROGRESS) | 393 GET_STRING_OF_STATE(STATE_INPROGRESS) |
394 GET_STRING_OF_STATE(STATE_CLOSED) | 394 GET_STRING_OF_STATE(STATE_CLOSED) |
395 default: | 395 default: |
396 ASSERT(false); | 396 RTC_NOTREACHED(); |
397 break; | 397 break; |
398 } | 398 } |
399 return result; | 399 return result; |
400 } | 400 } |
401 | 401 |
402 #define GET_STRING_OF_ERROR_CODE(err) \ | 402 #define GET_STRING_OF_ERROR_CODE(err) \ |
403 case webrtc::WebRtcSession::err: \ | 403 case webrtc::WebRtcSession::err: \ |
404 result = #err; \ | 404 result = #err; \ |
405 break; | 405 break; |
406 | 406 |
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1496 // If jumping directly from "checking" to "connected", | 1496 // If jumping directly from "checking" to "connected", |
1497 // signal "connected" first. | 1497 // signal "connected" first. |
1498 SetIceConnectionState(PeerConnectionInterface::kIceConnectionConnected); | 1498 SetIceConnectionState(PeerConnectionInterface::kIceConnectionConnected); |
1499 } | 1499 } |
1500 SetIceConnectionState(PeerConnectionInterface::kIceConnectionCompleted); | 1500 SetIceConnectionState(PeerConnectionInterface::kIceConnectionCompleted); |
1501 if (metrics_observer_) { | 1501 if (metrics_observer_) { |
1502 ReportTransportStats(); | 1502 ReportTransportStats(); |
1503 } | 1503 } |
1504 break; | 1504 break; |
1505 default: | 1505 default: |
1506 ASSERT(false); | 1506 RTC_NOTREACHED(); |
1507 } | 1507 } |
1508 } | 1508 } |
1509 | 1509 |
1510 void WebRtcSession::OnTransportControllerReceiving(bool receiving) { | 1510 void WebRtcSession::OnTransportControllerReceiving(bool receiving) { |
1511 SetIceConnectionReceiving(receiving); | 1511 SetIceConnectionReceiving(receiving); |
1512 } | 1512 } |
1513 | 1513 |
1514 void WebRtcSession::SetIceConnectionReceiving(bool receiving) { | 1514 void WebRtcSession::SetIceConnectionReceiving(bool receiving) { |
1515 if (ice_connection_receiving_ == receiving) { | 1515 if (ice_connection_receiving_ == receiving) { |
1516 return; | 1516 return; |
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2312 return *sctp_transport_name_; | 2312 return *sctp_transport_name_; |
2313 } | 2313 } |
2314 } | 2314 } |
2315 // Return an empty string if failed to retrieve the transport name. | 2315 // Return an empty string if failed to retrieve the transport name. |
2316 return ""; | 2316 return ""; |
2317 } | 2317 } |
2318 return channel->transport_name(); | 2318 return channel->transport_name(); |
2319 } | 2319 } |
2320 | 2320 |
2321 } // namespace webrtc | 2321 } // namespace webrtc |
OLD | NEW |