| 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 12 matching lines...) Expand all Loading... |
| 23 // The shared memory |handle| points to a memory section that's used to | 23 // The shared memory |handle| points to a memory section that's used to |
| 24 // transfer data between the AudioInputDevice and AudioInputController | 24 // transfer data between the AudioInputDevice and AudioInputController |
| 25 // objects. The implementation of OnStreamCreated takes ownership. | 25 // objects. The implementation of OnStreamCreated takes ownership. |
| 26 // The |socket_handle| is used by the AudioInputController to signal | 26 // The |socket_handle| is used by the AudioInputController to signal |
| 27 // notifications that more data is available and can optionally provide | 27 // notifications that more data is available and can optionally provide |
| 28 // parameter changes back. The AudioInputDevice must read from this socket | 28 // parameter changes back. The AudioInputDevice must read from this socket |
| 29 // and process the shared memory whenever data is read from the socket. | 29 // and process the shared memory whenever data is read from the socket. |
| 30 virtual void OnStreamCreated(base::SharedMemoryHandle handle, | 30 virtual void OnStreamCreated(base::SharedMemoryHandle handle, |
| 31 base::SyncSocket::Handle socket_handle, | 31 base::SyncSocket::Handle socket_handle, |
| 32 int length, | 32 int length, |
| 33 int total_segments) = 0; | 33 int total_segments, |
| 34 bool initially_muted) = 0; |
| 34 | 35 |
| 35 // Called when state of an audio stream has changed. | 36 // Called when state of an audio stream has changed. |
| 36 virtual void OnError() = 0; | 37 virtual void OnError() = 0; |
| 37 | 38 |
| 38 // Called when an audio stream is muted or unmuted. | 39 // Called when an audio stream is muted or unmuted. |
| 39 virtual void OnMuted(bool is_muted) = 0; | 40 virtual void OnMuted(bool is_muted) = 0; |
| 40 | 41 |
| 41 // Called when the AudioInputIPC object is going away and/or when the | 42 // Called when the AudioInputIPC object is going away and/or when the |
| 42 // IPC channel has been closed and no more IPC requests can be made. | 43 // IPC channel has been closed and no more IPC requests can be made. |
| 43 // Implementations should delete their owned AudioInputIPC instance | 44 // Implementations should delete their owned AudioInputIPC instance |
| (...skipping 30 matching lines...) Expand all Loading... |
| 74 virtual void SetVolume(double volume) = 0; | 75 virtual void SetVolume(double volume) = 0; |
| 75 | 76 |
| 76 // Closes the audio stream, which should shut down the corresponding | 77 // Closes the audio stream, which should shut down the corresponding |
| 77 // AudioInputController in the peer process. | 78 // AudioInputController in the peer process. |
| 78 virtual void CloseStream() = 0; | 79 virtual void CloseStream() = 0; |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 } // namespace media | 82 } // namespace media |
| 82 | 83 |
| 83 #endif // MEDIA_AUDIO_AUDIO_INPUT_IPC_H_ | 84 #endif // MEDIA_AUDIO_AUDIO_INPUT_IPC_H_ |
| OLD | NEW |