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

Side by Side Diff: webrtc/api/mediacontroller.cc

Issue 2353033005: Refactoring: move ownership of RtcEventLog from Call to PeerConnection (Closed)
Patch Set: Moved the constructor Created 4 years, 2 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
« no previous file with comments | « webrtc/api/mediacontroller.h ('k') | webrtc/api/peerconnection.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2015 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 12 matching lines...) Expand all
23 23
24 const int kMinBandwidthBps = 30000; 24 const int kMinBandwidthBps = 30000;
25 const int kStartBandwidthBps = 300000; 25 const int kStartBandwidthBps = 300000;
26 const int kMaxBandwidthBps = 2000000; 26 const int kMaxBandwidthBps = 2000000;
27 27
28 class MediaController : public webrtc::MediaControllerInterface, 28 class MediaController : public webrtc::MediaControllerInterface,
29 public sigslot::has_slots<> { 29 public sigslot::has_slots<> {
30 public: 30 public:
31 MediaController(const cricket::MediaConfig& media_config, 31 MediaController(const cricket::MediaConfig& media_config,
32 rtc::Thread* worker_thread, 32 rtc::Thread* worker_thread,
33 cricket::ChannelManager* channel_manager) 33 cricket::ChannelManager* channel_manager,
34 webrtc::RtcEventLog* event_log)
34 : worker_thread_(worker_thread), 35 : worker_thread_(worker_thread),
35 media_config_(media_config), 36 media_config_(media_config),
36 channel_manager_(channel_manager) { 37 channel_manager_(channel_manager),
38 call_config_(event_log) {
37 RTC_DCHECK(worker_thread); 39 RTC_DCHECK(worker_thread);
40 RTC_DCHECK(event_log);
38 worker_thread_->Invoke<void>(RTC_FROM_HERE, 41 worker_thread_->Invoke<void>(RTC_FROM_HERE,
39 rtc::Bind(&MediaController::Construct_w, this, 42 rtc::Bind(&MediaController::Construct_w, this,
40 channel_manager_->media_engine())); 43 channel_manager_->media_engine()));
41 } 44 }
42 ~MediaController() override { 45 ~MediaController() override {
43 Close(); 46 Close();
44 } 47 }
45 48
46 // webrtc::MediaControllerInterface implementation. 49 // webrtc::MediaControllerInterface implementation.
47 void Close() override { 50 void Close() override {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 85
83 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(MediaController); 86 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(MediaController);
84 }; 87 };
85 } // namespace { 88 } // namespace {
86 89
87 namespace webrtc { 90 namespace webrtc {
88 91
89 MediaControllerInterface* MediaControllerInterface::Create( 92 MediaControllerInterface* MediaControllerInterface::Create(
90 const cricket::MediaConfig& config, 93 const cricket::MediaConfig& config,
91 rtc::Thread* worker_thread, 94 rtc::Thread* worker_thread,
92 cricket::ChannelManager* channel_manager) { 95 cricket::ChannelManager* channel_manager,
93 return new MediaController(config, worker_thread, channel_manager); 96 webrtc::RtcEventLog* event_log) {
97 return new MediaController(config, worker_thread, channel_manager, event_log);
94 } 98 }
95 } // namespace webrtc 99 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/mediacontroller.h ('k') | webrtc/api/peerconnection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698