OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_AUDIO_INPUT_CONTROLLER_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ |
6 #define MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ | 6 #define MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include "base/atomicops.h" | 9 #include "base/atomicops.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 const std::string& device_id); | 246 const std::string& device_id); |
247 void DoCreateForStream(AudioInputStream* stream_to_control, | 247 void DoCreateForStream(AudioInputStream* stream_to_control, |
248 bool enable_nodata_timer); | 248 bool enable_nodata_timer); |
249 void DoRecord(); | 249 void DoRecord(); |
250 void DoClose(); | 250 void DoClose(); |
251 void DoReportError(); | 251 void DoReportError(); |
252 void DoSetVolume(double volume); | 252 void DoSetVolume(double volume); |
253 void DoSetAutomaticGainControl(bool enabled); | 253 void DoSetAutomaticGainControl(bool enabled); |
254 void DoOnData(scoped_ptr<uint8[]> data, uint32 size); | 254 void DoOnData(scoped_ptr<uint8[]> data, uint32 size); |
255 | 255 |
| 256 // Method to check if we get recorded data after a stream was started, |
| 257 // and log the result to UMA. |
| 258 void FirstCheckForNoData(); |
| 259 |
256 // Method which ensures that OnError() is triggered when data recording | 260 // Method which ensures that OnError() is triggered when data recording |
257 // times out. Called on the audio thread. | 261 // times out. Called on the audio thread. |
258 void DoCheckForNoData(); | 262 void DoCheckForNoData(); |
259 | 263 |
260 // Helper method that stops, closes, and NULL:s |*stream_|. | 264 // Helper method that stops, closes, and NULL:s |*stream_|. |
261 void DoStopCloseAndClearStream(); | 265 void DoStopCloseAndClearStream(); |
262 | 266 |
263 void SetDataIsActive(bool enabled); | 267 void SetDataIsActive(bool enabled); |
264 bool GetDataIsActive(); | 268 bool GetDataIsActive(); |
265 | 269 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 UserInputMonitor* user_input_monitor_; | 310 UserInputMonitor* user_input_monitor_; |
307 | 311 |
308 size_t prev_key_down_count_; | 312 size_t prev_key_down_count_; |
309 | 313 |
310 DISALLOW_COPY_AND_ASSIGN(AudioInputController); | 314 DISALLOW_COPY_AND_ASSIGN(AudioInputController); |
311 }; | 315 }; |
312 | 316 |
313 } // namespace media | 317 } // namespace media |
314 | 318 |
315 #endif // MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ | 319 #endif // MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ |
OLD | NEW |