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> |
| 11 |
10 #include "base/android/jni_android.h" | 12 #include "base/android/jni_android.h" |
11 #include "base/macros.h" | 13 #include "base/macros.h" |
12 #include "base/threading/thread_checker.h" | 14 #include "base/threading/thread_checker.h" |
13 #include "media/audio/audio_io.h" | 15 #include "media/audio/audio_io.h" |
14 #include "media/base/audio_parameters.h" | 16 #include "media/base/audio_parameters.h" |
15 | 17 |
16 namespace media { | 18 namespace media { |
17 | 19 |
18 class AudioBus; | 20 class AudioBus; |
19 class AudioManagerAndroid; | 21 class AudioManagerAndroid; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 base::android::ScopedJavaGlobalRef<jobject> j_audio_record_; | 70 base::android::ScopedJavaGlobalRef<jobject> j_audio_record_; |
69 | 71 |
70 // This is the only member accessed by both the Audio Manager and Java | 72 // This is the only member accessed by both the Audio Manager and Java |
71 // threads. Explanations for why we do not require explicit synchronization | 73 // threads. Explanations for why we do not require explicit synchronization |
72 // are given in the implementation. | 74 // are given in the implementation. |
73 AudioInputCallback* callback_; | 75 AudioInputCallback* callback_; |
74 | 76 |
75 // Owned by j_audio_record_. | 77 // Owned by j_audio_record_. |
76 uint8_t* direct_buffer_address_; | 78 uint8_t* direct_buffer_address_; |
77 | 79 |
78 scoped_ptr<media::AudioBus> audio_bus_; | 80 std::unique_ptr<media::AudioBus> audio_bus_; |
79 int bytes_per_sample_; | 81 int bytes_per_sample_; |
80 | 82 |
81 DISALLOW_COPY_AND_ASSIGN(AudioRecordInputStream); | 83 DISALLOW_COPY_AND_ASSIGN(AudioRecordInputStream); |
82 }; | 84 }; |
83 | 85 |
84 } // namespace media | 86 } // namespace media |
85 | 87 |
86 #endif // MEDIA_AUDIO_ANDROID_AUDIO_RECORD_INPUT_H_ | 88 #endif // MEDIA_AUDIO_ANDROID_AUDIO_RECORD_INPUT_H_ |
OLD | NEW |