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

Side by Side Diff: remoting/host/chromoting_host.cc

Issue 10914029: Use a separate thread for audio capturing and encoding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/audio_scheduler.cc ('k') | remoting/host/chromoting_host_context.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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/chromoting_host.h" 5 #include "remoting/host/chromoting_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 228
229 recorder_ = new ScreenRecorder(context_->capture_task_runner(), 229 recorder_ = new ScreenRecorder(context_->capture_task_runner(),
230 context_->encode_task_runner(), 230 context_->encode_task_runner(),
231 context_->network_task_runner(), 231 context_->network_task_runner(),
232 desktop_environment_->capturer(), 232 desktop_environment_->capturer(),
233 video_encoder); 233 video_encoder);
234 if (client->connection()->session()->config().is_audio_enabled()) { 234 if (client->connection()->session()->config().is_audio_enabled()) {
235 scoped_ptr<AudioEncoder> audio_encoder = 235 scoped_ptr<AudioEncoder> audio_encoder =
236 CreateAudioEncoder(client->connection()->session()->config()); 236 CreateAudioEncoder(client->connection()->session()->config());
237 audio_scheduler_ = new AudioScheduler( 237 audio_scheduler_ = new AudioScheduler(
238 context_->capture_task_runner(), 238 context_->audio_task_runner(),
239 context_->network_task_runner(), 239 context_->network_task_runner(),
240 desktop_environment_->audio_capturer(), 240 desktop_environment_->audio_capturer(),
241 audio_encoder.Pass(), 241 audio_encoder.Pass(),
242 client->connection()->audio_stub()); 242 client->connection()->audio_stub());
243 } 243 }
244 244
245 // Immediately add the connection and start the session. 245 // Immediately add the connection and start the session.
246 recorder_->AddConnection(client->connection()); 246 recorder_->AddConnection(client->connection());
247 recorder_->Start(); 247 recorder_->Start();
248 desktop_environment_->OnSessionStarted(client->CreateClipboardProxy()); 248 desktop_environment_->OnSessionStarted(client->CreateClipboardProxy());
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 OnShutdown()); 501 OnShutdown());
502 502
503 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); 503 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin();
504 it != shutdown_tasks_.end(); ++it) { 504 it != shutdown_tasks_.end(); ++it) {
505 it->Run(); 505 it->Run();
506 } 506 }
507 shutdown_tasks_.clear(); 507 shutdown_tasks_.clear();
508 } 508 }
509 509
510 } // namespace remoting 510 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/audio_scheduler.cc ('k') | remoting/host/chromoting_host_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698