Chromium Code Reviews| 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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 391 return mandatory_constraints_satisfied == constraints->GetMandatory().size(); | 391 return mandatory_constraints_satisfied == constraints->GetMandatory().size(); |
| 392 } | 392 } |
| 393 | 393 |
| 394 PeerConnection::PeerConnection(PeerConnectionFactory* factory) | 394 PeerConnection::PeerConnection(PeerConnectionFactory* factory) |
| 395 : factory_(factory), | 395 : factory_(factory), |
| 396 observer_(NULL), | 396 observer_(NULL), |
| 397 uma_observer_(NULL), | 397 uma_observer_(NULL), |
| 398 signaling_state_(kStable), | 398 signaling_state_(kStable), |
| 399 ice_connection_state_(kIceConnectionNew), | 399 ice_connection_state_(kIceConnectionNew), |
| 400 ice_gathering_state_(kIceGatheringNew), | 400 ice_gathering_state_(kIceGatheringNew), |
| 401 #ifdef HAVE_MEDIA | |
| 401 event_log_(RtcEventLog::Create()), | 402 event_log_(RtcEventLog::Create()), |
|
the sun
2017/05/04 14:28:58
fyi: there's a RtcEventLog::CreateNull() to use so
Zhi Huang
2017/05/04 21:28:53
The idea here is to remove the dependency on the t
| |
| 403 #endif | |
| 402 rtcp_cname_(GenerateRtcpCname()), | 404 rtcp_cname_(GenerateRtcpCname()), |
| 403 local_streams_(StreamCollection::Create()), | 405 local_streams_(StreamCollection::Create()), |
| 404 remote_streams_(StreamCollection::Create()) {} | 406 remote_streams_(StreamCollection::Create()) { |
| 407 } | |
| 405 | 408 |
| 406 PeerConnection::~PeerConnection() { | 409 PeerConnection::~PeerConnection() { |
| 407 TRACE_EVENT0("webrtc", "PeerConnection::~PeerConnection"); | 410 TRACE_EVENT0("webrtc", "PeerConnection::~PeerConnection"); |
| 408 RTC_DCHECK(signaling_thread()->IsCurrent()); | 411 RTC_DCHECK(signaling_thread()->IsCurrent()); |
| 409 // Need to detach RTP senders/receivers from WebRtcSession, | 412 // Need to detach RTP senders/receivers from WebRtcSession, |
| 410 // since it's about to be destroyed. | 413 // since it's about to be destroyed. |
| 411 for (const auto& sender : senders_) { | 414 for (const auto& sender : senders_) { |
| 412 sender->internal()->Stop(); | 415 sender->internal()->Stop(); |
| 413 } | 416 } |
| 414 for (const auto& receiver : receivers_) { | 417 for (const auto& receiver : receivers_) { |
| (...skipping 1893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2308 } | 2311 } |
| 2309 return event_log_->StartLogging(file, max_size_bytes); | 2312 return event_log_->StartLogging(file, max_size_bytes); |
| 2310 } | 2313 } |
| 2311 | 2314 |
| 2312 void PeerConnection::StopRtcEventLog_w() { | 2315 void PeerConnection::StopRtcEventLog_w() { |
| 2313 if (event_log_) { | 2316 if (event_log_) { |
| 2314 event_log_->StopLogging(); | 2317 event_log_->StopLogging(); |
| 2315 } | 2318 } |
| 2316 } | 2319 } |
| 2317 } // namespace webrtc | 2320 } // namespace webrtc |
| OLD | NEW |