| 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 // Low-latency audio capturing class utilizing audio input stream provided | 5 // Low-latency audio capturing class utilizing audio input stream provided |
| 6 // by a server (browser) process by use of an IPC interface. | 6 // by a server (browser) process by use of an IPC interface. |
| 7 // | 7 // |
| 8 // Relationship of classes: | 8 // Relationship of classes: |
| 9 // | 9 // |
| 10 // AudioInputController AudioInputDevice | 10 // AudioInputController AudioInputDevice |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 virtual void Initialize(const AudioParameters& params, | 88 virtual void Initialize(const AudioParameters& params, |
| 89 CaptureCallback* callback, | 89 CaptureCallback* callback, |
| 90 int session_id) OVERRIDE; | 90 int session_id) OVERRIDE; |
| 91 virtual void Start() OVERRIDE; | 91 virtual void Start() OVERRIDE; |
| 92 virtual void Stop() OVERRIDE; | 92 virtual void Stop() OVERRIDE; |
| 93 virtual void SetVolume(double volume) OVERRIDE; | 93 virtual void SetVolume(double volume) OVERRIDE; |
| 94 virtual void SetAutomaticGainControl(bool enabled) OVERRIDE; | 94 virtual void SetAutomaticGainControl(bool enabled) OVERRIDE; |
| 95 | 95 |
| 96 protected: | 96 protected: |
| 97 friend class base::RefCountedThreadSafe<AudioInputDevice>; | 97 friend class base::RefCountedThreadSafe<AudioInputDevice>; |
| 98 friend class AudioInputDeviceTest; |
| 98 virtual ~AudioInputDevice(); | 99 virtual ~AudioInputDevice(); |
| 99 | 100 |
| 100 // Methods called on IO thread ---------------------------------------------- | 101 // Methods called on IO thread ---------------------------------------------- |
| 101 // AudioInputIPCDelegate implementation. | 102 // AudioInputIPCDelegate implementation. |
| 102 virtual void OnStreamCreated(base::SharedMemoryHandle handle, | 103 virtual void OnStreamCreated(base::SharedMemoryHandle handle, |
| 103 base::SyncSocket::Handle socket_handle, | 104 base::SyncSocket::Handle socket_handle, |
| 104 int length, | 105 int length, |
| 105 int total_segments) OVERRIDE; | 106 int total_segments) OVERRIDE; |
| 106 virtual void OnVolume(double volume) OVERRIDE; | 107 virtual void OnVolume(double volume) OVERRIDE; |
| 107 virtual void OnStateChanged( | 108 virtual void OnStateChanged( |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 // TODO(miu): Replace this by changing AudioCapturerSource to accept the | 168 // TODO(miu): Replace this by changing AudioCapturerSource to accept the |
| 168 // callback via Start(). See http://crbug.com/151051 for details. | 169 // callback via Start(). See http://crbug.com/151051 for details. |
| 169 bool stopping_hack_; | 170 bool stopping_hack_; |
| 170 | 171 |
| 171 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputDevice); | 172 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputDevice); |
| 172 }; | 173 }; |
| 173 | 174 |
| 174 } // namespace media | 175 } // namespace media |
| 175 | 176 |
| 176 #endif // MEDIA_AUDIO_AUDIO_INPUT_DEVICE_H_ | 177 #endif // MEDIA_AUDIO_AUDIO_INPUT_DEVICE_H_ |
| OLD | NEW |