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

Unified Diff: media/audio/pulse/pulse_output.cc

Issue 66183002: Replace MessageLoopProxy with SingleThreadTaskRunner for the rest of media/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win and audio tests Created 6 years, 11 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 | « media/audio/null_audio_sink.cc ('k') | media/audio/pulse/pulse_unified.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/pulse/pulse_output.cc
diff --git a/media/audio/pulse/pulse_output.cc b/media/audio/pulse/pulse_output.cc
index c40d4f650517062786454e8dc5d7e980b66c1ddd..bfa963f0b8dc5901d83713bbe9573af89cdaf17c 100644
--- a/media/audio/pulse/pulse_output.cc
+++ b/media/audio/pulse/pulse_output.cc
@@ -6,7 +6,7 @@
#include <pulse/pulseaudio.h>
-#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
#include "media/audio/audio_manager_base.h"
#include "media/audio/audio_parameters.h"
#include "media/audio/pulse/pulse_util.h"
@@ -47,7 +47,7 @@ PulseAudioOutputStream::PulseAudioOutputStream(const AudioParameters& params,
pa_stream_(NULL),
volume_(1.0f),
source_callback_(NULL) {
- DCHECK(manager_->GetMessageLoop()->BelongsToCurrentThread());
+ DCHECK(manager_->GetTaskRunner()->BelongsToCurrentThread());
CHECK(params_.IsValid());
audio_bus_ = AudioBus::Create(params_);
@@ -62,7 +62,7 @@ PulseAudioOutputStream::~PulseAudioOutputStream() {
}
bool PulseAudioOutputStream::Open() {
- DCHECK(manager_->GetMessageLoop()->BelongsToCurrentThread());
+ DCHECK(manager_->GetTaskRunner()->BelongsToCurrentThread());
return pulse::CreateOutputStream(&pa_mainloop_, &pa_context_, &pa_stream_,
params_, &StreamNotifyCallback,
&StreamRequestCallback, this);
@@ -107,7 +107,7 @@ void PulseAudioOutputStream::Reset() {
}
void PulseAudioOutputStream::Close() {
- DCHECK(manager_->GetMessageLoop()->BelongsToCurrentThread());
+ DCHECK(manager_->GetTaskRunner()->BelongsToCurrentThread());
Reset();
@@ -157,7 +157,7 @@ void PulseAudioOutputStream::FulfillWriteRequest(size_t requested_bytes) {
}
void PulseAudioOutputStream::Start(AudioSourceCallback* callback) {
- DCHECK(manager_->GetMessageLoop()->BelongsToCurrentThread());
+ DCHECK(manager_->GetTaskRunner()->BelongsToCurrentThread());
CHECK(callback);
CHECK(pa_stream_);
@@ -179,7 +179,7 @@ void PulseAudioOutputStream::Start(AudioSourceCallback* callback) {
}
void PulseAudioOutputStream::Stop() {
- DCHECK(manager_->GetMessageLoop()->BelongsToCurrentThread());
+ DCHECK(manager_->GetTaskRunner()->BelongsToCurrentThread());
// Cork (pause) the stream. Waiting for the main loop lock will ensure
// outstanding callbacks have completed.
@@ -202,13 +202,13 @@ void PulseAudioOutputStream::Stop() {
}
void PulseAudioOutputStream::SetVolume(double volume) {
- DCHECK(manager_->GetMessageLoop()->BelongsToCurrentThread());
+ DCHECK(manager_->GetTaskRunner()->BelongsToCurrentThread());
volume_ = static_cast<float>(volume);
}
void PulseAudioOutputStream::GetVolume(double* volume) {
- DCHECK(manager_->GetMessageLoop()->BelongsToCurrentThread());
+ DCHECK(manager_->GetTaskRunner()->BelongsToCurrentThread());
*volume = volume_;
}
« no previous file with comments | « media/audio/null_audio_sink.cc ('k') | media/audio/pulse/pulse_unified.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698