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

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

Issue 63253002: Rename WebKit namespace to blink (part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
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 #ifndef CONTENT_RENDERER_MEDIA_WEBAUDIO_CAPTURER_SOURCE_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBAUDIO_CAPTURER_SOURCE_H_
6 #define CONTENT_RENDERER_MEDIA_WEBAUDIO_CAPTURER_SOURCE_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBAUDIO_CAPTURER_SOURCE_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/synchronization/lock.h" 9 #include "base/synchronization/lock.h"
10 #include "base/threading/thread_checker.h" 10 #include "base/threading/thread_checker.h"
(...skipping 10 matching lines...) Expand all
21 21
22 // WebAudioCapturerSource is the missing link between 22 // WebAudioCapturerSource is the missing link between
23 // WebAudio's MediaStreamAudioDestinationNode and WebRtcLocalAudioTrack. 23 // WebAudio's MediaStreamAudioDestinationNode and WebRtcLocalAudioTrack.
24 // 24 //
25 // 1. WebKit calls the setFormat() method setting up the basic stream format 25 // 1. WebKit calls the setFormat() method setting up the basic stream format
26 // (channels, and sample-rate). 26 // (channels, and sample-rate).
27 // 2. consumeAudio() is called periodically by WebKit which dispatches the 27 // 2. consumeAudio() is called periodically by WebKit which dispatches the
28 // audio stream to the WebRtcLocalAudioTrack::Capture() method. 28 // audio stream to the WebRtcLocalAudioTrack::Capture() method.
29 class WebAudioCapturerSource 29 class WebAudioCapturerSource
30 : public base::RefCountedThreadSafe<WebAudioCapturerSource>, 30 : public base::RefCountedThreadSafe<WebAudioCapturerSource>,
31 public WebKit::WebAudioDestinationConsumer { 31 public blink::WebAudioDestinationConsumer {
32 public: 32 public:
33 WebAudioCapturerSource(); 33 WebAudioCapturerSource();
34 34
35 // WebAudioDestinationConsumer implementation. 35 // WebAudioDestinationConsumer implementation.
36 // setFormat() is called early on, so that we can configure the audio track. 36 // setFormat() is called early on, so that we can configure the audio track.
37 virtual void setFormat(size_t number_of_channels, float sample_rate) OVERRIDE; 37 virtual void setFormat(size_t number_of_channels, float sample_rate) OVERRIDE;
38 // MediaStreamAudioDestinationNode periodically calls consumeAudio(). 38 // MediaStreamAudioDestinationNode periodically calls consumeAudio().
39 // Called on the WebAudio audio thread. 39 // Called on the WebAudio audio thread.
40 virtual void consumeAudio(const WebKit::WebVector<const float*>& audio_data, 40 virtual void consumeAudio(const blink::WebVector<const float*>& audio_data,
41 size_t number_of_frames) OVERRIDE; 41 size_t number_of_frames) OVERRIDE;
42 42
43 // Called when the WebAudioCapturerSource is hooking to a media audio track. 43 // Called when the WebAudioCapturerSource is hooking to a media audio track.
44 // |track| is the sink of the data flow. |source_provider| is the source of 44 // |track| is the sink of the data flow. |source_provider| is the source of
45 // the data flow where stream information like delay, volume, key_pressed, 45 // the data flow where stream information like delay, volume, key_pressed,
46 // is stored. 46 // is stored.
47 void Start(WebRtcLocalAudioTrack* track, 47 void Start(WebRtcLocalAudioTrack* track,
48 WebRtcLocalAudioSourceProvider* source_provider); 48 WebRtcLocalAudioSourceProvider* source_provider);
49 49
50 // Called when the media audio track is stopping. 50 // Called when the media audio track is stopping.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // Synchronizes HandleCapture() with AudioCapturerSource calls. 82 // Synchronizes HandleCapture() with AudioCapturerSource calls.
83 base::Lock lock_; 83 base::Lock lock_;
84 bool started_; 84 bool started_;
85 85
86 DISALLOW_COPY_AND_ASSIGN(WebAudioCapturerSource); 86 DISALLOW_COPY_AND_ASSIGN(WebAudioCapturerSource);
87 }; 87 };
88 88
89 } // namespace content 89 } // namespace content
90 90
91 #endif // CONTENT_RENDERER_MEDIA_WEBAUDIO_CAPTURER_SOURCE_H_ 91 #endif // CONTENT_RENDERER_MEDIA_WEBAUDIO_CAPTURER_SOURCE_H_
OLDNEW
« no previous file with comments | « content/renderer/media/video_source_handler.cc ('k') | content/renderer/media/webaudio_capturer_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698