OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_AUDIO_MODEM_AUDIO_RECORDER_IMPL_H_ | 5 #ifndef COMPONENTS_AUDIO_MODEM_AUDIO_RECORDER_IMPL_H_ |
6 #define COMPONENTS_AUDIO_MODEM_AUDIO_RECORDER_IMPL_H_ | 6 #define COMPONENTS_AUDIO_MODEM_AUDIO_RECORDER_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
| 10 #include <memory> |
10 #include <string> | 11 #include <string> |
11 | 12 |
12 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
13 #include "base/macros.h" | 14 #include "base/macros.h" |
14 #include "base/memory/scoped_ptr.h" | |
15 #include "components/audio_modem/audio_recorder.h" | 15 #include "components/audio_modem/audio_recorder.h" |
16 #include "media/audio/audio_io.h" | 16 #include "media/audio/audio_io.h" |
17 #include "media/base/audio_parameters.h" | 17 #include "media/base/audio_parameters.h" |
18 | 18 |
19 namespace base { | 19 namespace base { |
20 class MessageLoop; | 20 class MessageLoop; |
21 } | 21 } |
22 | 22 |
23 namespace media { | 23 namespace media { |
24 class AudioBus; | 24 class AudioBus; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 void OnError(media::AudioInputStream* stream) override; | 80 void OnError(media::AudioInputStream* stream) override; |
81 | 81 |
82 bool is_recording_; | 82 bool is_recording_; |
83 | 83 |
84 media::AudioInputStream* stream_; | 84 media::AudioInputStream* stream_; |
85 | 85 |
86 RecordedSamplesCallback decode_callback_; | 86 RecordedSamplesCallback decode_callback_; |
87 | 87 |
88 // Outside of the ctor/Initialize method, only access the next variables on | 88 // Outside of the ctor/Initialize method, only access the next variables on |
89 // the recording thread. | 89 // the recording thread. |
90 scoped_ptr<media::AudioBus> buffer_; | 90 std::unique_ptr<media::AudioBus> buffer_; |
91 int total_buffer_frames_; | 91 int total_buffer_frames_; |
92 int buffer_frame_index_; | 92 int buffer_frame_index_; |
93 | 93 |
94 scoped_ptr<media::AudioInputStream> input_stream_for_testing_; | 94 std::unique_ptr<media::AudioInputStream> input_stream_for_testing_; |
95 scoped_ptr<media::AudioParameters> params_for_testing_; | 95 std::unique_ptr<media::AudioParameters> params_for_testing_; |
96 | 96 |
97 DISALLOW_COPY_AND_ASSIGN(AudioRecorderImpl); | 97 DISALLOW_COPY_AND_ASSIGN(AudioRecorderImpl); |
98 }; | 98 }; |
99 | 99 |
100 } // namespace audio_modem | 100 } // namespace audio_modem |
101 | 101 |
102 #endif // COMPONENTS_AUDIO_MODEM_AUDIO_RECORDER_IMPL_H_ | 102 #endif // COMPONENTS_AUDIO_MODEM_AUDIO_RECORDER_IMPL_H_ |
OLD | NEW |