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

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

Issue 1830213002: Remove WVoE::SetAudioDeviceModule() - it is now set in ctor. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 8 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/media/engine/webrtcvoiceengine_unittest.cc ('k') | webrtc/voice_engine/channel_proxy.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 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2004 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 !SetOutputVolume(audio_output_volume_)) { 167 !SetOutputVolume(audio_output_volume_)) {
168 LOG(LS_WARNING) << "Failed to SetOutputVolume to " 168 LOG(LS_WARNING) << "Failed to SetOutputVolume to "
169 << audio_output_volume_; 169 << audio_output_volume_;
170 } 170 }
171 171
172 return initialized_; 172 return initialized_;
173 } 173 }
174 174
175 bool ChannelManager::InitMediaEngine_w() { 175 bool ChannelManager::InitMediaEngine_w() {
176 ASSERT(worker_thread_ == rtc::Thread::Current()); 176 ASSERT(worker_thread_ == rtc::Thread::Current());
177 return (media_engine_->Init(worker_thread_)); 177 return media_engine_->Init();
178 } 178 }
179 179
180 void ChannelManager::Terminate() { 180 void ChannelManager::Terminate() {
181 ASSERT(initialized_); 181 ASSERT(initialized_);
182 if (!initialized_) { 182 if (!initialized_) {
183 return; 183 return;
184 } 184 }
185 worker_thread_->Invoke<void>(Bind(&ChannelManager::Terminate_w, this)); 185 worker_thread_->Invoke<void>(Bind(&ChannelManager::Terminate_w, this));
186 initialized_ = false; 186 initialized_ = false;
187 } 187 }
188 188
189 void ChannelManager::DestructorDeletes_w() { 189 void ChannelManager::DestructorDeletes_w() {
190 ASSERT(worker_thread_ == rtc::Thread::Current()); 190 ASSERT(worker_thread_ == rtc::Thread::Current());
191 media_engine_.reset(NULL); 191 media_engine_.reset(NULL);
192 } 192 }
193 193
194 void ChannelManager::Terminate_w() { 194 void ChannelManager::Terminate_w() {
195 ASSERT(worker_thread_ == rtc::Thread::Current()); 195 ASSERT(worker_thread_ == rtc::Thread::Current());
196 // Need to destroy the voice/video channels 196 // Need to destroy the voice/video channels
197 while (!video_channels_.empty()) { 197 while (!video_channels_.empty()) {
198 DestroyVideoChannel_w(video_channels_.back()); 198 DestroyVideoChannel_w(video_channels_.back());
199 } 199 }
200 while (!voice_channels_.empty()) { 200 while (!voice_channels_.empty()) {
201 DestroyVoiceChannel_w(voice_channels_.back()); 201 DestroyVoiceChannel_w(voice_channels_.back());
202 } 202 }
203 media_engine_->Terminate();
204 } 203 }
205 204
206 VoiceChannel* ChannelManager::CreateVoiceChannel( 205 VoiceChannel* ChannelManager::CreateVoiceChannel(
207 webrtc::MediaControllerInterface* media_controller, 206 webrtc::MediaControllerInterface* media_controller,
208 TransportController* transport_controller, 207 TransportController* transport_controller,
209 const std::string& content_name, 208 const std::string& content_name,
210 bool rtcp, 209 bool rtcp,
211 const AudioOptions& options) { 210 const AudioOptions& options) {
212 return worker_thread_->Invoke<VoiceChannel*>( 211 return worker_thread_->Invoke<VoiceChannel*>(
213 Bind(&ChannelManager::CreateVoiceChannel_w, this, media_controller, 212 Bind(&ChannelManager::CreateVoiceChannel_w, this, media_controller,
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 return worker_thread_->Invoke<bool>( 417 return worker_thread_->Invoke<bool>(
419 Bind(&MediaEngineInterface::StartRtcEventLog, media_engine_.get(), file)); 418 Bind(&MediaEngineInterface::StartRtcEventLog, media_engine_.get(), file));
420 } 419 }
421 420
422 void ChannelManager::StopRtcEventLog() { 421 void ChannelManager::StopRtcEventLog() {
423 worker_thread_->Invoke<void>( 422 worker_thread_->Invoke<void>(
424 Bind(&MediaEngineInterface::StopRtcEventLog, media_engine_.get())); 423 Bind(&MediaEngineInterface::StopRtcEventLog, media_engine_.get()));
425 } 424 }
426 425
427 } // namespace cricket 426 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvoiceengine_unittest.cc ('k') | webrtc/voice_engine/channel_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698