OLD | NEW |
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 |
11 #include "webrtc/api/mediacontroller.h" | 11 #include "webrtc/api/mediacontroller.h" |
12 | 12 |
| 13 #include <memory> |
| 14 |
13 #include "webrtc/base/bind.h" | 15 #include "webrtc/base/bind.h" |
14 #include "webrtc/base/checks.h" | 16 #include "webrtc/base/checks.h" |
15 #include "webrtc/base/constructormagic.h" | 17 #include "webrtc/base/constructormagic.h" |
16 #include "webrtc/call.h" | 18 #include "webrtc/call.h" |
17 #include "webrtc/pc/channelmanager.h" | 19 #include "webrtc/pc/channelmanager.h" |
18 #include "webrtc/media/base/mediachannel.h" | 20 #include "webrtc/media/base/mediachannel.h" |
19 | 21 |
20 namespace { | 22 namespace { |
21 | 23 |
22 const int kMinBandwidthBps = 30000; | 24 const int kMinBandwidthBps = 30000; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 } | 70 } |
69 void Close_w() { | 71 void Close_w() { |
70 RTC_DCHECK(worker_thread_->IsCurrent()); | 72 RTC_DCHECK(worker_thread_->IsCurrent()); |
71 call_.reset(); | 73 call_.reset(); |
72 } | 74 } |
73 | 75 |
74 rtc::Thread* const worker_thread_; | 76 rtc::Thread* const worker_thread_; |
75 const cricket::MediaConfig media_config_; | 77 const cricket::MediaConfig media_config_; |
76 cricket::ChannelManager* const channel_manager_; | 78 cricket::ChannelManager* const channel_manager_; |
77 webrtc::Call::Config call_config_; | 79 webrtc::Call::Config call_config_; |
78 rtc::scoped_ptr<webrtc::Call> call_; | 80 std::unique_ptr<webrtc::Call> call_; |
79 | 81 |
80 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(MediaController); | 82 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(MediaController); |
81 }; | 83 }; |
82 } // namespace { | 84 } // namespace { |
83 | 85 |
84 namespace webrtc { | 86 namespace webrtc { |
85 | 87 |
86 MediaControllerInterface* MediaControllerInterface::Create( | 88 MediaControllerInterface* MediaControllerInterface::Create( |
87 const cricket::MediaConfig& config, | 89 const cricket::MediaConfig& config, |
88 rtc::Thread* worker_thread, | 90 rtc::Thread* worker_thread, |
89 cricket::ChannelManager* channel_manager) { | 91 cricket::ChannelManager* channel_manager) { |
90 return new MediaController(config, worker_thread, channel_manager); | 92 return new MediaController(config, worker_thread, channel_manager); |
91 } | 93 } |
92 } // namespace webrtc | 94 } // namespace webrtc |
OLD | NEW |