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

Unified Diff: content/renderer/media/webrtc_audio_capturer.cc

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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/webrtc_audio_capturer.cc
diff --git a/content/renderer/media/webrtc_audio_capturer.cc b/content/renderer/media/webrtc_audio_capturer.cc
index 238b2a231867208eae02276d9f936c8202316ece..26b0fd769f790b3a5fbd3129823b8019c0a8f561 100644
--- a/content/renderer/media/webrtc_audio_capturer.cc
+++ b/content/renderer/media/webrtc_audio_capturer.cc
@@ -102,14 +102,16 @@ class WebRtcAudioCapturer::TrackOwner
int number_of_channels,
int number_of_frames,
int audio_delay_milliseconds,
- int volume) {
+ int volume,
+ bool key_pressed) {
base::AutoLock lock(lock_);
if (delegate_) {
delegate_->CaptureData(audio_data,
number_of_channels,
number_of_frames,
audio_delay_milliseconds,
- volume);
+ volume,
+ key_pressed);
}
}
@@ -424,10 +426,11 @@ void WebRtcAudioCapturer::SetAutomaticGainControl(bool enable) {
void WebRtcAudioCapturer::Capture(media::AudioBus* audio_source,
int audio_delay_milliseconds,
- double volume) {
- // This callback is driven by AudioInputDevice::AudioThreadCallback if
- // |source_| is AudioInputDevice, otherwise it is driven by client's
- // CaptureCallback.
+ double volume,
+ bool key_pressed) {
+// This callback is driven by AudioInputDevice::AudioThreadCallback if
+// |source_| is AudioInputDevice, otherwise it is driven by client's
+// CaptureCallback.
#if defined(OS_WIN) || defined(OS_MACOSX)
DCHECK_LE(volume, 1.0);
#elif defined(OS_LINUX) || defined(OS_OPENBSD)
@@ -471,8 +474,11 @@ void WebRtcAudioCapturer::Capture(media::AudioBus* audio_source,
it != tracks.end();
++it) {
(*it)->CaptureData(buffer_ref_while_calling->buffer(),
- audio_source->channels(), audio_source->frames(),
- audio_delay_milliseconds, volume_);
+ audio_source->channels(),
+ audio_source->frames(),
+ audio_delay_milliseconds,
+ volume,
+ key_pressed);
}
}
« no previous file with comments | « content/renderer/media/webrtc_audio_capturer.h ('k') | content/renderer/media/webrtc_audio_capturer_sink_owner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698