| Index: content/renderer/pepper/pepper_platform_audio_output_impl.h
|
| diff --git a/content/renderer/pepper/pepper_platform_audio_output_impl.h b/content/renderer/pepper/pepper_platform_audio_output_impl.h
|
| index 0be7588afd8b680ff9fffc5080af081d38d25822..1189ce1cf2c84f39d90eeb92cbf787c911e7f7ef 100644
|
| --- a/content/renderer/pepper/pepper_platform_audio_output_impl.h
|
| +++ b/content/renderer/pepper/pepper_platform_audio_output_impl.h
|
| @@ -7,6 +7,7 @@
|
|
|
| #include "base/basictypes.h"
|
| #include "base/memory/ref_counted.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| #include "media/audio/audio_output_ipc.h"
|
| #include "webkit/plugins/ppapi/plugin_delegate.h"
|
|
|
| @@ -20,8 +21,6 @@ class MessageLoopProxy;
|
|
|
| namespace content {
|
|
|
| -class AudioMessageFilter;
|
| -
|
| class PepperPlatformAudioOutputImpl
|
| : public webkit::ppapi::PluginDelegate::PlatformAudioOutput,
|
| public media::AudioOutputIPCDelegate,
|
| @@ -54,17 +53,15 @@ class PepperPlatformAudioOutputImpl
|
| private:
|
| friend class base::RefCountedThreadSafe<PepperPlatformAudioOutputImpl>;
|
|
|
| - PepperPlatformAudioOutputImpl();
|
| + explicit PepperPlatformAudioOutputImpl(int source_render_view_id);
|
|
|
| bool Initialize(
|
| int sample_rate,
|
| int frames_per_buffer,
|
| - int source_render_view_id,
|
| webkit::ppapi::PluginDelegate::PlatformAudioOutputClient* client);
|
|
|
| // I/O thread backends to above functions.
|
| - void InitializeOnIOThread(const media::AudioParameters& params,
|
| - int source_render_view_id);
|
| + void InitializeOnIOThread(const media::AudioParameters& params);
|
| void StartPlaybackOnIOThread();
|
| void StopPlaybackOnIOThread();
|
| void ShutDownOnIOThread();
|
| @@ -75,11 +72,12 @@ class PepperPlatformAudioOutputImpl
|
|
|
| // Used to send/receive IPC. THIS MUST ONLY BE ACCESSED ON THE
|
| // I/O thread except to send messages and get the message loop.
|
| - scoped_refptr<AudioMessageFilter> ipc_;
|
| + scoped_ptr<media::AudioOutputIPC> ipc_;
|
|
|
| - // Our ID on the MessageFilter. THIS MUST ONLY BE ACCESSED ON THE I/O THREAD
|
| - // or else you could race with the initialize function which sets it.
|
| - int32 stream_id_;
|
| + // True while the stream is live (i.e., between the Create and Close audio
|
| + // IPCs). THIS MUST ONLY BE ACCESSED ON THE I/O THREAD or else you could race
|
| + // with the initialize function which sets it.
|
| + bool stream_created_;
|
|
|
| base::MessageLoopProxy* main_message_loop_proxy_;
|
|
|
|
|