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

Side by Side Diff: media/audio/android/audio_record_input.h

Issue 645923002: Add support for audio input mute detection on all platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 6 years, 2 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
« no previous file with comments | « media/audio/alsa/alsa_input.cc ('k') | media/audio/android/audio_record_input.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 MEDIA_AUDIO_ANDROID_AUDIO_RECORD_INPUT_H_ 5 #ifndef MEDIA_AUDIO_ANDROID_AUDIO_RECORD_INPUT_H_
6 #define MEDIA_AUDIO_ANDROID_AUDIO_RECORD_INPUT_H_ 6 #define MEDIA_AUDIO_ANDROID_AUDIO_RECORD_INPUT_H_
7 7
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/threading/thread_checker.h" 9 #include "base/threading/thread_checker.h"
10 #include "media/audio/audio_io.h" 10 #include "media/audio/audio_io.h"
(...skipping 22 matching lines...) Expand all
33 // Implementation of AudioInputStream. 33 // Implementation of AudioInputStream.
34 virtual bool Open() override; 34 virtual bool Open() override;
35 virtual void Start(AudioInputCallback* callback) override; 35 virtual void Start(AudioInputCallback* callback) override;
36 virtual void Stop() override; 36 virtual void Stop() override;
37 virtual void Close() override; 37 virtual void Close() override;
38 virtual double GetMaxVolume() override; 38 virtual double GetMaxVolume() override;
39 virtual void SetVolume(double volume) override; 39 virtual void SetVolume(double volume) override;
40 virtual double GetVolume() override; 40 virtual double GetVolume() override;
41 virtual void SetAutomaticGainControl(bool enabled) override; 41 virtual void SetAutomaticGainControl(bool enabled) override;
42 virtual bool GetAutomaticGainControl() override; 42 virtual bool GetAutomaticGainControl() override;
43 virtual bool IsMuted() override;
43 44
44 static bool RegisterAudioRecordInput(JNIEnv* env); 45 static bool RegisterAudioRecordInput(JNIEnv* env);
45 46
46 // Called from Java when data is available. 47 // Called from Java when data is available.
47 void OnData(JNIEnv* env, jobject obj, jint size, jint hardware_delay_bytes); 48 void OnData(JNIEnv* env, jobject obj, jint size, jint hardware_delay_bytes);
48 49
49 // Called from Java so that we can cache the address of the Java-managed 50 // Called from Java so that we can cache the address of the Java-managed
50 // |byte_buffer| in |direct_buffer_address_|. 51 // |byte_buffer| in |direct_buffer_address_|.
51 void CacheDirectBufferAddress(JNIEnv* env, jobject obj, jobject byte_buffer); 52 void CacheDirectBufferAddress(JNIEnv* env, jobject obj, jobject byte_buffer);
52 53
(...skipping 14 matching lines...) Expand all
67 68
68 scoped_ptr<media::AudioBus> audio_bus_; 69 scoped_ptr<media::AudioBus> audio_bus_;
69 int bytes_per_sample_; 70 int bytes_per_sample_;
70 71
71 DISALLOW_COPY_AND_ASSIGN(AudioRecordInputStream); 72 DISALLOW_COPY_AND_ASSIGN(AudioRecordInputStream);
72 }; 73 };
73 74
74 } // namespace media 75 } // namespace media
75 76
76 #endif // MEDIA_AUDIO_ANDROID_AUDIO_RECORD_INPUT_H_ 77 #endif // MEDIA_AUDIO_ANDROID_AUDIO_RECORD_INPUT_H_
OLDNEW
« no previous file with comments | « media/audio/alsa/alsa_input.cc ('k') | media/audio/android/audio_record_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698