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

Side by Side Diff: content/renderer/media/render_audiosourceprovider.h

Issue 10823175: Switch AudioRenderSink::Callback to use AudioBus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup MCR AudioBus usage. Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/renderer/media/render_audiosourceprovider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // RenderAudioSourceProvider provides a bridge between classes: 5 // RenderAudioSourceProvider provides a bridge between classes:
6 // WebKit::WebAudioSourceProvider <---> media::AudioRendererSink 6 // WebKit::WebAudioSourceProvider <---> media::AudioRendererSink
7 // 7 //
8 // RenderAudioSourceProvider is a "sink" of audio, and uses a default 8 // RenderAudioSourceProvider is a "sink" of audio, and uses a default
9 // AudioOutputDevice if a client has not explicitly been set. 9 // AudioOutputDevice if a client has not explicitly been set.
10 // 10 //
11 // WebKit optionally sets a client, and then periodically calls provideInput() 11 // WebKit optionally sets a client, and then periodically calls provideInput()
12 // to render a certain number of audio sample-frames. provideInput() 12 // to render a certain number of audio sample-frames. provideInput()
13 // uses the renderer to get this data, and then massages it into the form 13 // uses the renderer to get this data, and then massages it into the form
14 // required by provideInput(). In this case, the default AudioOutputDevice 14 // required by provideInput(). In this case, the default AudioOutputDevice
15 // is no longer used. 15 // is no longer used.
16 // 16 //
17 // THREAD SAFETY: 17 // THREAD SAFETY:
18 // It is assumed that the callers to setClient() and provideInput() 18 // It is assumed that the callers to setClient() and provideInput()
19 // implement appropriate locking for thread safety when making 19 // implement appropriate locking for thread safety when making
20 // these calls. This happens in WebKit. 20 // these calls. This happens in WebKit.
21 21
22 #ifndef CONTENT_RENDERER_MEDIA_RENDER_AUDIOSOURCEPROVIDER_H_ 22 #ifndef CONTENT_RENDERER_MEDIA_RENDER_AUDIOSOURCEPROVIDER_H_
23 #define CONTENT_RENDERER_MEDIA_RENDER_AUDIOSOURCEPROVIDER_H_ 23 #define CONTENT_RENDERER_MEDIA_RENDER_AUDIOSOURCEPROVIDER_H_
24 24
25 #include <vector>
26
27 #include "base/synchronization/lock.h" 25 #include "base/synchronization/lock.h"
28 #include "media/base/audio_renderer_sink.h" 26 #include "media/base/audio_renderer_sink.h"
29 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" 27 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAudioSourceProvide r.h" 28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAudioSourceProvide r.h"
31 29
32 namespace WebKit { 30 namespace WebKit {
33 class WebAudioSourceProviderClient; 31 class WebAudioSourceProviderClient;
34 } 32 }
35 33
36 class RenderAudioSourceProvider 34 class RenderAudioSourceProvider
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // Protects access to sink_ 74 // Protects access to sink_
77 base::Lock sink_lock_; 75 base::Lock sink_lock_;
78 76
79 // default_sink_ is the default sink. 77 // default_sink_ is the default sink.
80 scoped_refptr<media::AudioRendererSink> default_sink_; 78 scoped_refptr<media::AudioRendererSink> default_sink_;
81 79
82 DISALLOW_COPY_AND_ASSIGN(RenderAudioSourceProvider); 80 DISALLOW_COPY_AND_ASSIGN(RenderAudioSourceProvider);
83 }; 81 };
84 82
85 #endif // CONTENT_RENDERER_MEDIA_RENDER_AUDIOSOURCEPROVIDER_H_ 83 #endif // CONTENT_RENDERER_MEDIA_RENDER_AUDIOSOURCEPROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/render_audiosourceprovider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698