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 22 matching lines...) Expand all Loading... |
33 #include "webrtc/base/arraysize.h" | 33 #include "webrtc/base/arraysize.h" |
34 #include "webrtc/base/bind.h" | 34 #include "webrtc/base/bind.h" |
35 #include "webrtc/base/logging.h" | 35 #include "webrtc/base/logging.h" |
36 #include "webrtc/base/stringencode.h" | 36 #include "webrtc/base/stringencode.h" |
37 #include "webrtc/base/stringutils.h" | 37 #include "webrtc/base/stringutils.h" |
38 #include "webrtc/base/trace_event.h" | 38 #include "webrtc/base/trace_event.h" |
39 #include "webrtc/call/call.h" | 39 #include "webrtc/call/call.h" |
40 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" | 40 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" |
41 #include "webrtc/media/sctp/sctpdataengine.h" | 41 #include "webrtc/media/sctp/sctpdataengine.h" |
42 #include "webrtc/pc/channelmanager.h" | 42 #include "webrtc/pc/channelmanager.h" |
43 #include "webrtc/system_wrappers/include/clock.h" | |
44 #include "webrtc/system_wrappers/include/field_trial.h" | 43 #include "webrtc/system_wrappers/include/field_trial.h" |
45 | 44 |
46 namespace { | 45 namespace { |
47 | 46 |
48 using webrtc::DataChannel; | 47 using webrtc::DataChannel; |
49 using webrtc::MediaConstraintsInterface; | 48 using webrtc::MediaConstraintsInterface; |
50 using webrtc::MediaStreamInterface; | 49 using webrtc::MediaStreamInterface; |
51 using webrtc::PeerConnectionInterface; | 50 using webrtc::PeerConnectionInterface; |
52 using webrtc::RtpSenderInternal; | 51 using webrtc::RtpSenderInternal; |
53 using webrtc::RtpSenderInterface; | 52 using webrtc::RtpSenderInterface; |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 return true; | 582 return true; |
584 } | 583 } |
585 | 584 |
586 PeerConnection::PeerConnection(PeerConnectionFactory* factory) | 585 PeerConnection::PeerConnection(PeerConnectionFactory* factory) |
587 : factory_(factory), | 586 : factory_(factory), |
588 observer_(NULL), | 587 observer_(NULL), |
589 uma_observer_(NULL), | 588 uma_observer_(NULL), |
590 signaling_state_(kStable), | 589 signaling_state_(kStable), |
591 ice_connection_state_(kIceConnectionNew), | 590 ice_connection_state_(kIceConnectionNew), |
592 ice_gathering_state_(kIceGatheringNew), | 591 ice_gathering_state_(kIceGatheringNew), |
593 event_log_(RtcEventLog::Create(webrtc::Clock::GetRealTimeClock())), | 592 event_log_(RtcEventLog::Create()), |
594 rtcp_cname_(GenerateRtcpCname()), | 593 rtcp_cname_(GenerateRtcpCname()), |
595 local_streams_(StreamCollection::Create()), | 594 local_streams_(StreamCollection::Create()), |
596 remote_streams_(StreamCollection::Create()) {} | 595 remote_streams_(StreamCollection::Create()) {} |
597 | 596 |
598 PeerConnection::~PeerConnection() { | 597 PeerConnection::~PeerConnection() { |
599 TRACE_EVENT0("webrtc", "PeerConnection::~PeerConnection"); | 598 TRACE_EVENT0("webrtc", "PeerConnection::~PeerConnection"); |
600 RTC_DCHECK(signaling_thread()->IsCurrent()); | 599 RTC_DCHECK(signaling_thread()->IsCurrent()); |
601 // Need to detach RTP senders/receivers from WebRtcSession, | 600 // Need to detach RTP senders/receivers from WebRtcSession, |
602 // since it's about to be destroyed. | 601 // since it's about to be destroyed. |
603 for (const auto& sender : senders_) { | 602 for (const auto& sender : senders_) { |
(...skipping 1800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2404 | 2403 |
2405 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file, | 2404 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file, |
2406 int64_t max_size_bytes) { | 2405 int64_t max_size_bytes) { |
2407 return event_log_->StartLogging(file, max_size_bytes); | 2406 return event_log_->StartLogging(file, max_size_bytes); |
2408 } | 2407 } |
2409 | 2408 |
2410 void PeerConnection::StopRtcEventLog_w() { | 2409 void PeerConnection::StopRtcEventLog_w() { |
2411 event_log_->StopLogging(); | 2410 event_log_->StopLogging(); |
2412 } | 2411 } |
2413 } // namespace webrtc | 2412 } // namespace webrtc |
OLD | NEW |