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

Unified Diff: media/audio/pulse/pulse_unified.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/pulse/pulse_output.cc ('k') | media/audio/scoped_loop_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/pulse/pulse_unified.cc
diff --git a/media/audio/pulse/pulse_unified.cc b/media/audio/pulse/pulse_unified.cc
index c68a797469f71615e4a182bdc45e9c9b704b6909..cd17b018705eb767bc3ef84acc3b23c9a1206656 100644
--- a/media/audio/pulse/pulse_unified.cc
+++ b/media/audio/pulse/pulse_unified.cc
@@ -4,7 +4,7 @@
#include "media/audio/pulse/pulse_unified.h"
-#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/time/time.h"
#include "media/audio/audio_manager_base.h"
#include "media/audio/audio_parameters.h"
@@ -54,7 +54,7 @@ PulseAudioUnifiedStream::PulseAudioUnifiedStream(
output_stream_(NULL),
volume_(1.0f),
source_callback_(NULL) {
- DCHECK(manager_->GetMessageLoop()->BelongsToCurrentThread());
+ DCHECK(manager_->GetTaskRunner()->BelongsToCurrentThread());
CHECK(params_.IsValid());
input_bus_ = AudioBus::Create(params_);
output_bus_ = AudioBus::Create(params_);
@@ -70,7 +70,7 @@ PulseAudioUnifiedStream::~PulseAudioUnifiedStream() {
}
bool PulseAudioUnifiedStream::Open() {
- DCHECK(manager_->GetMessageLoop()->BelongsToCurrentThread());
+ DCHECK(manager_->GetTaskRunner()->BelongsToCurrentThread());
// Prepare the recording buffers for the callbacks.
fifo_.reset(new media::SeekableBuffer(
0, kFifoSizeInPackets * params_.GetBytesPerBuffer()));
@@ -138,7 +138,7 @@ void PulseAudioUnifiedStream::Reset() {
}
void PulseAudioUnifiedStream::Close() {
- DCHECK(manager_->GetMessageLoop()->BelongsToCurrentThread());
+ DCHECK(manager_->GetTaskRunner()->BelongsToCurrentThread());
Reset();
// Signal to the manager that we're closed and can be removed.
@@ -211,7 +211,7 @@ void PulseAudioUnifiedStream::ReadData() {
}
void PulseAudioUnifiedStream::Start(AudioSourceCallback* callback) {
- DCHECK(manager_->GetMessageLoop()->BelongsToCurrentThread());
+ DCHECK(manager_->GetTaskRunner()->BelongsToCurrentThread());
CHECK(callback);
CHECK(input_stream_);
CHECK(output_stream_);
@@ -244,7 +244,7 @@ void PulseAudioUnifiedStream::Start(AudioSourceCallback* callback) {
}
void PulseAudioUnifiedStream::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.
@@ -278,13 +278,13 @@ void PulseAudioUnifiedStream::Stop() {
}
void PulseAudioUnifiedStream::SetVolume(double volume) {
- DCHECK(manager_->GetMessageLoop()->BelongsToCurrentThread());
+ DCHECK(manager_->GetTaskRunner()->BelongsToCurrentThread());
volume_ = static_cast<float>(volume);
}
void PulseAudioUnifiedStream::GetVolume(double* volume) {
- DCHECK(manager_->GetMessageLoop()->BelongsToCurrentThread());
+ DCHECK(manager_->GetTaskRunner()->BelongsToCurrentThread());
*volume = volume_;
}
« no previous file with comments | « media/audio/pulse/pulse_output.cc ('k') | media/audio/scoped_loop_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698