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

Unified Diff: content/renderer/pepper/pepper_platform_audio_output_impl.h

Issue 11359196: Associate audio streams with their source/destination RenderView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Plus, removed CalledOnValidThread DCHECK from sampleRate() call since nothing mutates. Created 8 years 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
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 5fab0e4af4b3748aebc4d7feea7b259d5fd2f92b..0be7588afd8b680ff9fffc5080af081d38d25822 100644
--- a/content/renderer/pepper/pepper_platform_audio_output_impl.h
+++ b/content/renderer/pepper/pepper_platform_audio_output_impl.h
@@ -20,6 +20,8 @@ class MessageLoopProxy;
namespace content {
+class AudioMessageFilter;
+
class PepperPlatformAudioOutputImpl
: public webkit::ppapi::PluginDelegate::PlatformAudioOutput,
public media::AudioOutputIPCDelegate,
@@ -30,6 +32,7 @@ class PepperPlatformAudioOutputImpl
static PepperPlatformAudioOutputImpl* Create(
int sample_rate,
int frames_per_buffer,
+ int source_render_view_id,
webkit::ppapi::PluginDelegate::PlatformAudioOutputClient* client);
// PlatformAudioOutput implementation (called on main thread).
@@ -56,10 +59,12 @@ class PepperPlatformAudioOutputImpl
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);
+ void InitializeOnIOThread(const media::AudioParameters& params,
+ int source_render_view_id);
void StartPlaybackOnIOThread();
void StopPlaybackOnIOThread();
void ShutDownOnIOThread();
@@ -70,7 +75,7 @@ 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.
- media::AudioOutputIPC* ipc_;
+ scoped_refptr<AudioMessageFilter> 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.

Powered by Google App Engine
This is Rietveld 408576698