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

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

Issue 2794943002: Delete MediaController class, move Call ownership to PeerConnection. (Closed)
Patch Set: Hack for injecting a FakeCall, and re-enable TestPacketOptionsAndOnPacketSent test. 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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 port_allocator_ = std::move(allocator); 450 port_allocator_ = std::move(allocator);
451 451
452 // The port allocator lives on the network thread and should be initialized 452 // The port allocator lives on the network thread and should be initialized
453 // there. 453 // there.
454 if (!network_thread()->Invoke<bool>( 454 if (!network_thread()->Invoke<bool>(
455 RTC_FROM_HERE, rtc::Bind(&PeerConnection::InitializePortAllocator_n, 455 RTC_FROM_HERE, rtc::Bind(&PeerConnection::InitializePortAllocator_n,
456 this, configuration))) { 456 this, configuration))) {
457 return false; 457 return false;
458 } 458 }
459 459
460 media_controller_.reset(factory_->CreateMediaController(
461 configuration.media_config, event_log_.get()));
462
463 session_.reset(new WebRtcSession( 460 session_.reset(new WebRtcSession(
464 media_controller_.get(), factory_->network_thread(), 461 factory_->channel_manager(), configuration.media_config,
462 event_log_.get(),
463 factory_->network_thread(),
465 factory_->worker_thread(), factory_->signaling_thread(), 464 factory_->worker_thread(), factory_->signaling_thread(),
466 port_allocator_.get(), 465 port_allocator_.get(),
467 std::unique_ptr<cricket::TransportController>( 466 std::unique_ptr<cricket::TransportController>(
468 factory_->CreateTransportController( 467 factory_->CreateTransportController(
469 port_allocator_.get(), 468 port_allocator_.get(),
470 configuration.redetermine_role_on_ice_restart)), 469 configuration.redetermine_role_on_ice_restart)),
471 #ifdef HAVE_SCTP 470 #ifdef HAVE_SCTP
472 std::unique_ptr<cricket::SctpTransportInternalFactory>( 471 std::unique_ptr<cricket::SctpTransportInternalFactory>(
473 new cricket::SctpTransportFactory(factory_->network_thread())) 472 new cricket::SctpTransportFactory(factory_->network_thread()))
474 #else 473 #else
(...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after
2308 } 2307 }
2309 return event_log_->StartLogging(file, max_size_bytes); 2308 return event_log_->StartLogging(file, max_size_bytes);
2310 } 2309 }
2311 2310
2312 void PeerConnection::StopRtcEventLog_w() { 2311 void PeerConnection::StopRtcEventLog_w() {
2313 if (event_log_) { 2312 if (event_log_) {
2314 event_log_->StopLogging(); 2313 event_log_->StopLogging();
2315 } 2314 }
2316 } 2315 }
2317 } // namespace webrtc 2316 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698