| 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 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 session_.reset(new WebRtcSession( | 625 session_.reset(new WebRtcSession( |
| 626 media_controller_.get(), factory_->network_thread(), | 626 media_controller_.get(), factory_->network_thread(), |
| 627 factory_->worker_thread(), factory_->signaling_thread(), | 627 factory_->worker_thread(), factory_->signaling_thread(), |
| 628 port_allocator_.get(), | 628 port_allocator_.get(), |
| 629 std::unique_ptr<cricket::TransportController>( | 629 std::unique_ptr<cricket::TransportController>( |
| 630 factory_->CreateTransportController( | 630 factory_->CreateTransportController( |
| 631 port_allocator_.get(), | 631 port_allocator_.get(), |
| 632 configuration.redetermine_role_on_ice_restart)))); | 632 configuration.redetermine_role_on_ice_restart)))); |
| 633 | 633 |
| 634 stats_.reset(new StatsCollector(this)); | 634 stats_.reset(new StatsCollector(this)); |
| 635 stats_collector_ = RTCStatsCollector::Create(this); |
| 635 | 636 |
| 636 enable_ice_renomination_ = configuration.enable_ice_renomination; | 637 enable_ice_renomination_ = configuration.enable_ice_renomination; |
| 637 | 638 |
| 638 // Initialize the WebRtcSession. It creates transport channels etc. | 639 // Initialize the WebRtcSession. It creates transport channels etc. |
| 639 if (!session_->Initialize(factory_->options(), std::move(cert_generator), | 640 if (!session_->Initialize(factory_->options(), std::move(cert_generator), |
| 640 configuration)) { | 641 configuration)) { |
| 641 return false; | 642 return false; |
| 642 } | 643 } |
| 643 | 644 |
| 644 // Register PeerConnection as receiver of local ice candidates. | 645 // Register PeerConnection as receiver of local ice candidates. |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 LOG(LS_ERROR) << "GetStats - observer is NULL."; | 882 LOG(LS_ERROR) << "GetStats - observer is NULL."; |
| 882 return false; | 883 return false; |
| 883 } | 884 } |
| 884 | 885 |
| 885 stats_->UpdateStats(level); | 886 stats_->UpdateStats(level); |
| 886 signaling_thread()->Post(RTC_FROM_HERE, this, MSG_GETSTATS, | 887 signaling_thread()->Post(RTC_FROM_HERE, this, MSG_GETSTATS, |
| 887 new GetStatsMsg(observer, track)); | 888 new GetStatsMsg(observer, track)); |
| 888 return true; | 889 return true; |
| 889 } | 890 } |
| 890 | 891 |
| 892 void PeerConnection::GetStats(RTCStatsCollectorCallback* callback) { |
| 893 RTC_DCHECK(stats_collector_); |
| 894 stats_collector_->GetStatsReport(callback); |
| 895 } |
| 896 |
| 891 PeerConnectionInterface::SignalingState PeerConnection::signaling_state() { | 897 PeerConnectionInterface::SignalingState PeerConnection::signaling_state() { |
| 892 return signaling_state_; | 898 return signaling_state_; |
| 893 } | 899 } |
| 894 | 900 |
| 895 PeerConnectionInterface::IceState PeerConnection::ice_state() { | 901 PeerConnectionInterface::IceState PeerConnection::ice_state() { |
| 896 return ice_state_; | 902 return ice_state_; |
| 897 } | 903 } |
| 898 | 904 |
| 899 PeerConnectionInterface::IceConnectionState | 905 PeerConnectionInterface::IceConnectionState |
| 900 PeerConnection::ice_connection_state() { | 906 PeerConnection::ice_connection_state() { |
| (...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2336 | 2342 |
| 2337 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file, | 2343 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file, |
| 2338 int64_t max_size_bytes) { | 2344 int64_t max_size_bytes) { |
| 2339 return media_controller_->call_w()->StartEventLog(file, max_size_bytes); | 2345 return media_controller_->call_w()->StartEventLog(file, max_size_bytes); |
| 2340 } | 2346 } |
| 2341 | 2347 |
| 2342 void PeerConnection::StopRtcEventLog_w() { | 2348 void PeerConnection::StopRtcEventLog_w() { |
| 2343 media_controller_->call_w()->StopEventLog(); | 2349 media_controller_->call_w()->StopEventLog(); |
| 2344 } | 2350 } |
| 2345 } // namespace webrtc | 2351 } // namespace webrtc |
| OLD | NEW |