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

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

Issue 21183002: Adding key press detection in the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
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_WEBRTC_AUDIO_CAPTURER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 virtual ~WebRtcAudioCapturer(); 101 virtual ~WebRtcAudioCapturer();
102 102
103 private: 103 private:
104 class TrackOwner; 104 class TrackOwner;
105 typedef std::list<scoped_refptr<TrackOwner> > TrackList; 105 typedef std::list<scoped_refptr<TrackOwner> > TrackList;
106 106
107 // AudioCapturerSource::CaptureCallback implementation. 107 // AudioCapturerSource::CaptureCallback implementation.
108 // Called on the AudioInputDevice audio thread. 108 // Called on the AudioInputDevice audio thread.
109 virtual void Capture(media::AudioBus* audio_source, 109 virtual void Capture(media::AudioBus* audio_source,
110 int audio_delay_milliseconds, 110 int audio_delay_milliseconds,
111 double volume) OVERRIDE; 111 double volume,
112 bool key_pressed) OVERRIDE;
112 virtual void OnCaptureError() OVERRIDE; 113 virtual void OnCaptureError() OVERRIDE;
113 114
114 // Reconfigures the capturer with a new buffer size and capture parameters. 115 // Reconfigures the capturer with a new buffer size and capture parameters.
115 // Must be called without holding the lock. Returns true on success. 116 // Must be called without holding the lock. Returns true on success.
116 bool Reconfigure(int sample_rate, media::ChannelLayout channel_layout); 117 bool Reconfigure(int sample_rate, media::ChannelLayout channel_layout);
117 118
118 // Starts recording audio. 119 // Starts recording audio.
119 // Triggered by AddSink() on the main render thread or a Libjingle working 120 // Triggered by AddSink() on the main render thread or a Libjingle working
120 // thread. It should NOT be called under |lock_|. 121 // thread. It should NOT be called under |lock_|.
121 void Start(); 122 void Start();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // Stores latest microphone volume received in a CaptureData() callback. 159 // Stores latest microphone volume received in a CaptureData() callback.
159 // Range is [0, 255]. 160 // Range is [0, 255].
160 int volume_; 161 int volume_;
161 162
162 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioCapturer); 163 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioCapturer);
163 }; 164 };
164 165
165 } // namespace content 166 } // namespace content
166 167
167 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ 168 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/webaudio_capturer_source.cc ('k') | content/renderer/media/webrtc_audio_capturer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698