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

Unified Diff: remoting/host/audio_scheduler.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, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/audio_scheduler.h ('k') | remoting/host/chromoting_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/audio_scheduler.cc
diff --git a/remoting/host/audio_scheduler.cc b/remoting/host/audio_scheduler.cc
index fcc15de6a81773d940c7bb59397aeabfd4c3203a..2efded188de6fcd567290df46900e710928bab97 100644
--- a/remoting/host/audio_scheduler.cc
+++ b/remoting/host/audio_scheduler.cc
@@ -17,30 +17,30 @@
namespace remoting {
AudioScheduler::AudioScheduler(
- scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> network_task_runner,
AudioCapturer* audio_capturer,
scoped_ptr<AudioEncoder> audio_encoder,
protocol::AudioStub* audio_stub)
- : capture_task_runner_(capture_task_runner),
+ : audio_task_runner_(audio_task_runner),
network_task_runner_(network_task_runner),
audio_capturer_(audio_capturer),
audio_encoder_(audio_encoder.Pass()),
audio_stub_(audio_stub),
network_stopped_(false) {
- DCHECK(capture_task_runner_);
+ DCHECK(audio_task_runner_);
DCHECK(network_task_runner_);
DCHECK(audio_capturer_);
DCHECK(audio_stub_);
- capture_task_runner_->PostTask(
+ audio_task_runner_->PostTask(
FROM_HERE, base::Bind(&AudioScheduler::DoStart, this));
}
void AudioScheduler::Stop(const base::Closure& done_task) {
DCHECK(!done_task.is_null());
- if (!capture_task_runner_->BelongsToCurrentThread()) {
- capture_task_runner_->PostTask(FROM_HERE, base::Bind(
+ if (!audio_task_runner_->BelongsToCurrentThread()) {
+ audio_task_runner_->PostTask(FROM_HERE, base::Bind(
&AudioScheduler::Stop, this, done_task));
return;
}
@@ -75,7 +75,7 @@ void AudioScheduler::NotifyAudioPacketCaptured(
}
void AudioScheduler::DoStart() {
- DCHECK(capture_task_runner_->BelongsToCurrentThread());
+ DCHECK(audio_task_runner_->BelongsToCurrentThread());
// TODO(kxing): Do something with the return value.
audio_capturer_->Start(
« no previous file with comments | « remoting/host/audio_scheduler.h ('k') | remoting/host/chromoting_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698