| 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_IPC_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_INPUT_IPC_H_ |
| 6 #define MEDIA_AUDIO_AUDIO_INPUT_IPC_H_ | 6 #define MEDIA_AUDIO_AUDIO_INPUT_IPC_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // The |socket_handle| is used by the AudioInputController to signal | 33 // The |socket_handle| is used by the AudioInputController to signal |
| 34 // notifications that more data is available and can optionally provide | 34 // notifications that more data is available and can optionally provide |
| 35 // parameter changes back. The AudioInputDevice must read from this socket | 35 // parameter changes back. The AudioInputDevice must read from this socket |
| 36 // and process the shared memory whenever data is read from the socket. | 36 // and process the shared memory whenever data is read from the socket. |
| 37 virtual void OnStreamCreated(base::SharedMemoryHandle handle, | 37 virtual void OnStreamCreated(base::SharedMemoryHandle handle, |
| 38 base::SyncSocket::Handle socket_handle, | 38 base::SyncSocket::Handle socket_handle, |
| 39 int length, | 39 int length, |
| 40 int total_segments) = 0; | 40 int total_segments) = 0; |
| 41 | 41 |
| 42 // Called when state of an audio stream has changed. | 42 // Called when state of an audio stream has changed. |
| 43 virtual void OnStateChanged(AudioInputIPCDelegateState state) = 0; | 43 virtual void OnError() = 0; |
| 44 | |
| 45 // Called when the input stream volume has changed. | |
| 46 virtual void OnVolume(double volume) = 0; | |
| 47 | 44 |
| 48 // Called when the AudioInputIPC object is going away and/or when the | 45 // Called when the AudioInputIPC object is going away and/or when the |
| 49 // IPC channel has been closed and no more IPC requests can be made. | 46 // IPC channel has been closed and no more IPC requests can be made. |
| 50 // Implementations should delete their owned AudioInputIPC instance | 47 // Implementations should delete their owned AudioInputIPC instance |
| 51 // immediately. | 48 // immediately. |
| 52 virtual void OnIPCClosed() = 0; | 49 virtual void OnIPCClosed() = 0; |
| 53 | 50 |
| 54 protected: | 51 protected: |
| 55 virtual ~AudioInputIPCDelegate(); | 52 virtual ~AudioInputIPCDelegate(); |
| 56 }; | 53 }; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 81 virtual void SetVolume(double volume) = 0; | 78 virtual void SetVolume(double volume) = 0; |
| 82 | 79 |
| 83 // Closes the audio stream, which should shut down the corresponding | 80 // Closes the audio stream, which should shut down the corresponding |
| 84 // AudioInputController in the peer process. | 81 // AudioInputController in the peer process. |
| 85 virtual void CloseStream() = 0; | 82 virtual void CloseStream() = 0; |
| 86 }; | 83 }; |
| 87 | 84 |
| 88 } // namespace media | 85 } // namespace media |
| 89 | 86 |
| 90 #endif // MEDIA_AUDIO_AUDIO_INPUT_IPC_H_ | 87 #endif // MEDIA_AUDIO_AUDIO_INPUT_IPC_H_ |
| OLD | NEW |