Index: content/renderer/pepper/pepper_platform_audio_output_impl.cc |
diff --git a/content/renderer/pepper/pepper_platform_audio_output_impl.cc b/content/renderer/pepper/pepper_platform_audio_output_impl.cc |
index 65239e615fa5a0e859729044a9dcaf706719b04c..2d64bf27d425adfb11198459a71773c0936abcaa 100644 |
--- a/content/renderer/pepper/pepper_platform_audio_output_impl.cc |
+++ b/content/renderer/pepper/pepper_platform_audio_output_impl.cc |
@@ -11,6 +11,7 @@ |
#include "content/common/child_process.h" |
#include "content/common/media/audio_messages.h" |
#include "content/renderer/media/audio_hardware.h" |
+#include "content/renderer/media/audio_message_filter.h" |
#include "content/renderer/render_thread_impl.h" |
namespace content { |
@@ -31,7 +32,7 @@ PepperPlatformAudioOutputImpl* PepperPlatformAudioOutputImpl::Create( |
} |
bool PepperPlatformAudioOutputImpl::StartPlayback() { |
- if (filter_) { |
+ if (ipc_) { |
ChildProcess::current()->io_message_loop()->PostTask( |
FROM_HERE, |
base::Bind(&PepperPlatformAudioOutputImpl::StartPlaybackOnIOThread, |
@@ -42,7 +43,7 @@ bool PepperPlatformAudioOutputImpl::StartPlayback() { |
} |
bool PepperPlatformAudioOutputImpl::StopPlayback() { |
- if (filter_) { |
+ if (ipc_) { |
ChildProcess::current()->io_message_loop()->PostTask( |
FROM_HERE, |
base::Bind(&PepperPlatformAudioOutputImpl::StopPlaybackOnIOThread, |
@@ -61,7 +62,9 @@ void PepperPlatformAudioOutputImpl::ShutDown() { |
base::Bind(&PepperPlatformAudioOutputImpl::ShutDownOnIOThread, this)); |
} |
-void PepperPlatformAudioOutputImpl::OnStateChanged(AudioStreamState state) {} |
+void PepperPlatformAudioOutputImpl::OnStateChanged( |
+ media::AudioStreamState state) { |
+} |
void PepperPlatformAudioOutputImpl::OnStreamCreated( |
base::SharedMemoryHandle handle, |
@@ -99,7 +102,7 @@ PepperPlatformAudioOutputImpl::PepperPlatformAudioOutputImpl() |
: client_(NULL), |
stream_id_(0), |
main_message_loop_proxy_(base::MessageLoopProxy::current()) { |
- filter_ = RenderThreadImpl::current()->audio_message_filter(); |
+ ipc_ = RenderThreadImpl::current()->audio_message_filter(); |
} |
bool PepperPlatformAudioOutputImpl::Initialize( |
@@ -136,18 +139,18 @@ bool PepperPlatformAudioOutputImpl::Initialize( |
void PepperPlatformAudioOutputImpl::InitializeOnIOThread( |
const media::AudioParameters& params) { |
- stream_id_ = filter_->AddDelegate(this); |
- filter_->Send(new AudioHostMsg_CreateStream(stream_id_, params)); |
+ stream_id_ = ipc_->AddDelegate(this); |
+ ipc_->CreateStream(stream_id_, params); |
} |
void PepperPlatformAudioOutputImpl::StartPlaybackOnIOThread() { |
if (stream_id_) |
- filter_->Send(new AudioHostMsg_PlayStream(stream_id_)); |
+ ipc_->PlayStream(stream_id_); |
} |
void PepperPlatformAudioOutputImpl::StopPlaybackOnIOThread() { |
if (stream_id_) |
- filter_->Send(new AudioHostMsg_PauseStream(stream_id_)); |
+ ipc_->PauseStream(stream_id_); |
} |
void PepperPlatformAudioOutputImpl::ShutDownOnIOThread() { |
@@ -155,8 +158,8 @@ void PepperPlatformAudioOutputImpl::ShutDownOnIOThread() { |
if (!stream_id_) |
return; |
- filter_->Send(new AudioHostMsg_CloseStream(stream_id_)); |
- filter_->RemoveDelegate(stream_id_); |
+ ipc_->CloseStream(stream_id_); |
+ ipc_->RemoveDelegate(stream_id_); |
stream_id_ = 0; |
Release(); // Release for the delegate, balances out the reference taken in |