| 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_BASE_AUDIO_CAPTURER_SOURCE_H_ | 5 #ifndef MEDIA_BASE_AUDIO_CAPTURER_SOURCE_H_ |
| 6 #define MEDIA_BASE_AUDIO_CAPTURER_SOURCE_H_ | 6 #define MEDIA_BASE_AUDIO_CAPTURER_SOURCE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // TODO(chcunningham): Update delay argument to use frames instead of | 34 // TODO(chcunningham): Update delay argument to use frames instead of |
| 35 // milliseconds to prevent loss of precision. See http://crbug.com/587291. | 35 // milliseconds to prevent loss of precision. See http://crbug.com/587291. |
| 36 virtual void Capture(const AudioBus* audio_source, | 36 virtual void Capture(const AudioBus* audio_source, |
| 37 int audio_delay_milliseconds, | 37 int audio_delay_milliseconds, |
| 38 double volume, | 38 double volume, |
| 39 bool key_pressed) = 0; | 39 bool key_pressed) = 0; |
| 40 | 40 |
| 41 // Signals an error has occurred. | 41 // Signals an error has occurred. |
| 42 virtual void OnCaptureError(const std::string& message) = 0; | 42 virtual void OnCaptureError(const std::string& message) = 0; |
| 43 | 43 |
| 44 // Signals the muted state has changed. | 44 // Signals the muted state has changed. May be called before |
| 45 // OnCaptureStarted. |
| 45 virtual void OnCaptureMuted(bool is_muted) = 0; | 46 virtual void OnCaptureMuted(bool is_muted) = 0; |
| 46 | 47 |
| 47 protected: | 48 protected: |
| 48 virtual ~CaptureCallback() {} | 49 virtual ~CaptureCallback() {} |
| 49 }; | 50 }; |
| 50 | 51 |
| 51 // Sets information about the audio stream format and the device | 52 // Sets information about the audio stream format and the device |
| 52 // to be used. It must be called before any of the other methods. | 53 // to be used. It must be called before any of the other methods. |
| 53 // The |session_id| is used by the browser to identify which input device to | 54 // The |session_id| is used by the browser to identify which input device to |
| 54 // be used. For clients who do not care about device permission and device | 55 // be used. For clients who do not care about device permission and device |
| (...skipping 17 matching lines...) Expand all Loading... |
| 72 virtual void SetAutomaticGainControl(bool enable) = 0; | 73 virtual void SetAutomaticGainControl(bool enable) = 0; |
| 73 | 74 |
| 74 protected: | 75 protected: |
| 75 friend class base::RefCountedThreadSafe<AudioCapturerSource>; | 76 friend class base::RefCountedThreadSafe<AudioCapturerSource>; |
| 76 virtual ~AudioCapturerSource() {} | 77 virtual ~AudioCapturerSource() {} |
| 77 }; | 78 }; |
| 78 | 79 |
| 79 } // namespace media | 80 } // namespace media |
| 80 | 81 |
| 81 #endif // MEDIA_BASE_AUDIO_CAPTURER_SOURCE_H_ | 82 #endif // MEDIA_BASE_AUDIO_CAPTURER_SOURCE_H_ |
| OLD | NEW |