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 // IPC messages for the audio. | 5 // IPC messages for the audio. |
6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/shared_memory.h" | 9 #include "base/memory/shared_memory.h" |
10 #include "base/sync_socket.h" | 10 #include "base/sync_socket.h" |
(...skipping 21 matching lines...) Expand all Loading... | |
32 IPC_STRUCT_MEMBER(uint32, shared_memory_count) | 32 IPC_STRUCT_MEMBER(uint32, shared_memory_count) |
33 IPC_STRUCT_END() | 33 IPC_STRUCT_END() |
34 | 34 |
35 // Messages sent from the browser to the renderer. | 35 // Messages sent from the browser to the renderer. |
36 | 36 |
37 // Tell the renderer process that an audio stream has been created. | 37 // Tell the renderer process that an audio stream has been created. |
38 // The renderer process is given a shared memory handle for the audio data | 38 // The renderer process is given a shared memory handle for the audio data |
39 // buffer it shares with the browser process. It is also given a SyncSocket that | 39 // buffer it shares with the browser process. It is also given a SyncSocket that |
40 // it uses to communicate with the browser process about the state of the | 40 // it uses to communicate with the browser process about the state of the |
41 // buffered audio data. | 41 // buffered audio data. |
42 #if defined(OS_WIN) | 42 IPC_MESSAGE_CONTROL4(AudioMsg_NotifyStreamCreated, int /* stream id */, |
43 IPC_MESSAGE_CONTROL4(AudioMsg_NotifyStreamCreated, | |
44 int /* stream id */, | |
45 base::SharedMemoryHandle /* handle */, | 43 base::SharedMemoryHandle /* handle */, |
46 base::SyncSocket::Handle /* socket handle */, | 44 base::SyncSocket::TransitDescriptor /* socket handle */, |
no longer working on chromium
2014/09/02 10:25:04
Either change the name to TransitHandle or update
burnik
2014/09/02 15:01:34
Done.
| |
47 uint32 /* length */) | 45 uint32 /* length */) |
48 #else | |
49 IPC_MESSAGE_CONTROL4(AudioMsg_NotifyStreamCreated, | |
50 int /* stream id */, | |
51 base::SharedMemoryHandle /* handle */, | |
52 base::FileDescriptor /* socket handle */, | |
53 uint32 /* length */) | |
54 #endif | |
55 | 46 |
56 // Tell the renderer process that an audio input stream has been created. | 47 // Tell the renderer process that an audio input stream has been created. |
57 // The renderer process would be given a SyncSocket that it should read | 48 // The renderer process would be given a SyncSocket that it should read |
58 // from from then on. It is also given number of segments in shared memory. | 49 // from from then on. It is also given number of segments in shared memory. |
59 #if defined(OS_WIN) | 50 IPC_MESSAGE_CONTROL5(AudioInputMsg_NotifyStreamCreated, int /* stream id */, |
60 IPC_MESSAGE_CONTROL5(AudioInputMsg_NotifyStreamCreated, | |
61 int /* stream id */, | |
62 base::SharedMemoryHandle /* handle */, | 51 base::SharedMemoryHandle /* handle */, |
63 base::SyncSocket::Handle /* socket handle */, | 52 base::SyncSocket::TransitDescriptor /* socket handle */, |
no longer working on chromium
2014/09/02 10:25:04
ditto
burnik
2014/09/02 15:01:34
Done.
| |
64 uint32 /* length */, | 53 uint32 /* length */, uint32 /* segment count */) |
henrika (OOO until Aug 14)
2014/09/02 07:46:06
I think these should go on one line each.
burnik
2014/09/02 10:02:54
clang-format applied to all -- oops.
Done.
On 201
no longer working on chromium
2014/09/02 10:25:04
?? could you double check, it should be one line e
burnik
2014/09/02 15:01:34
I've ran
git-cl-format -f master -- content/commo
no longer working on chromium
2014/09/02 15:09:01
The script might not be always correct, you should
burnik
2014/09/04 09:04:56
Done.
| |
65 uint32 /* segment count */) | |
66 #else | |
67 IPC_MESSAGE_CONTROL5(AudioInputMsg_NotifyStreamCreated, | |
68 int /* stream id */, | |
69 base::SharedMemoryHandle /* handle */, | |
70 base::FileDescriptor /* socket handle */, | |
71 uint32 /* length */, | |
72 uint32 /* segment count */) | |
73 #endif | |
74 | 54 |
75 // Notification message sent from AudioRendererHost to renderer after an output | 55 // Notification message sent from AudioRendererHost to renderer after an output |
76 // device change has occurred. | 56 // device change has occurred. |
77 IPC_MESSAGE_CONTROL3(AudioMsg_NotifyDeviceChanged, | 57 IPC_MESSAGE_CONTROL3(AudioMsg_NotifyDeviceChanged, |
78 int /* stream_id */, | 58 int /* stream_id */, |
79 int /* new_buffer_size */, | 59 int /* new_buffer_size */, |
80 int /* new_sample_rate */) | 60 int /* new_sample_rate */) |
81 | 61 |
82 // Notification message sent from AudioRendererHost to renderer for state | 62 // Notification message sent from AudioRendererHost to renderer for state |
83 // update after the renderer has requested a Create/Start/Close. | 63 // update after the renderer has requested a Create/Start/Close. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
138 // Set audio volume of the stream specified by stream_id. | 118 // Set audio volume of the stream specified by stream_id. |
139 // TODO(hclam): change this to vector if we have channel numbers other than 2. | 119 // TODO(hclam): change this to vector if we have channel numbers other than 2. |
140 IPC_MESSAGE_CONTROL2(AudioHostMsg_SetVolume, | 120 IPC_MESSAGE_CONTROL2(AudioHostMsg_SetVolume, |
141 int /* stream_id */, | 121 int /* stream_id */, |
142 double /* volume */) | 122 double /* volume */) |
143 | 123 |
144 // Set audio volume of the input stream specified by stream_id. | 124 // Set audio volume of the input stream specified by stream_id. |
145 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume, | 125 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume, |
146 int /* stream_id */, | 126 int /* stream_id */, |
147 double /* volume */) | 127 double /* volume */) |
OLD | NEW |