| OLD | NEW |
| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 bool SetAutomaticGainControl(bool enabled) override; | 43 bool SetAutomaticGainControl(bool enabled) override; |
| 44 bool GetAutomaticGainControl() override; | 44 bool GetAutomaticGainControl() override; |
| 45 bool IsMuted() override; | 45 bool IsMuted() override; |
| 46 | 46 |
| 47 static bool RegisterAudioRecordInput(JNIEnv* env); | 47 static bool RegisterAudioRecordInput(JNIEnv* env); |
| 48 | 48 |
| 49 // Called from Java when data is available. | 49 // Called from Java when data is available. |
| 50 void OnData(JNIEnv* env, | 50 void OnData(JNIEnv* env, |
| 51 const base::android::JavaParamRef<jobject>& obj, | 51 const base::android::JavaParamRef<jobject>& obj, |
| 52 jint size, | 52 jint size, |
| 53 jint hardware_delay_bytes); | 53 jint hardware_delay_ms); |
| 54 | 54 |
| 55 // Called from Java so that we can cache the address of the Java-managed | 55 // Called from Java so that we can cache the address of the Java-managed |
| 56 // |byte_buffer| in |direct_buffer_address_|. | 56 // |byte_buffer| in |direct_buffer_address_|. |
| 57 void CacheDirectBufferAddress( | 57 void CacheDirectBufferAddress( |
| 58 JNIEnv* env, | 58 JNIEnv* env, |
| 59 const base::android::JavaParamRef<jobject>& obj, | 59 const base::android::JavaParamRef<jobject>& obj, |
| 60 const base::android::JavaParamRef<jobject>& byte_buffer); | 60 const base::android::JavaParamRef<jobject>& byte_buffer); |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 base::ThreadChecker thread_checker_; | 63 base::ThreadChecker thread_checker_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 76 | 76 |
| 77 std::unique_ptr<media::AudioBus> audio_bus_; | 77 std::unique_ptr<media::AudioBus> audio_bus_; |
| 78 int bytes_per_sample_; | 78 int bytes_per_sample_; |
| 79 | 79 |
| 80 DISALLOW_COPY_AND_ASSIGN(AudioRecordInputStream); | 80 DISALLOW_COPY_AND_ASSIGN(AudioRecordInputStream); |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 } // namespace media | 83 } // namespace media |
| 84 | 84 |
| 85 #endif // MEDIA_AUDIO_ANDROID_AUDIO_RECORD_INPUT_H_ | 85 #endif // MEDIA_AUDIO_ANDROID_AUDIO_RECORD_INPUT_H_ |
| OLD | NEW |