Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Side by Side Diff: webrtc/pc/peerconnection.cc

Issue 2854123003: Build WebRTC with data channel only. (Closed)
Patch Set: Modified the rtc_event_log. Responded the comments. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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()),
403 #else
404 event_log_(std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl())),
405 #endif
402 rtcp_cname_(GenerateRtcpCname()), 406 rtcp_cname_(GenerateRtcpCname()),
403 local_streams_(StreamCollection::Create()), 407 local_streams_(StreamCollection::Create()),
404 remote_streams_(StreamCollection::Create()) {} 408 remote_streams_(StreamCollection::Create()) {
409 }
405 410
406 PeerConnection::~PeerConnection() { 411 PeerConnection::~PeerConnection() {
407 TRACE_EVENT0("webrtc", "PeerConnection::~PeerConnection"); 412 TRACE_EVENT0("webrtc", "PeerConnection::~PeerConnection");
408 RTC_DCHECK(signaling_thread()->IsCurrent()); 413 RTC_DCHECK(signaling_thread()->IsCurrent());
409 // Need to detach RTP senders/receivers from WebRtcSession, 414 // Need to detach RTP senders/receivers from WebRtcSession,
410 // since it's about to be destroyed. 415 // since it's about to be destroyed.
411 for (const auto& sender : senders_) { 416 for (const auto& sender : senders_) {
412 sender->internal()->Stop(); 417 sender->internal()->Stop();
413 } 418 }
414 for (const auto& receiver : receivers_) { 419 for (const auto& receiver : receivers_) {
(...skipping 1893 matching lines...) Expand 10 before | Expand all | Expand 10 after
2308 } 2313 }
2309 return event_log_->StartLogging(file, max_size_bytes); 2314 return event_log_->StartLogging(file, max_size_bytes);
2310 } 2315 }
2311 2316
2312 void PeerConnection::StopRtcEventLog_w() { 2317 void PeerConnection::StopRtcEventLog_w() {
2313 if (event_log_) { 2318 if (event_log_) {
2314 event_log_->StopLogging(); 2319 event_log_->StopLogging();
2315 } 2320 }
2316 } 2321 }
2317 } // namespace webrtc 2322 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698