Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: content/common/media/audio_messages.h

Issue 525313002: SyncSocket Transit Descriptor - refactoring (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits done - Prelanding checks Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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(
43 IPC_MESSAGE_CONTROL4(AudioMsg_NotifyStreamCreated, 43 AudioMsg_NotifyStreamCreated,
44 int /* stream id */, 44 int /* stream id */,
45 base::SharedMemoryHandle /* handle */, 45 base::SharedMemoryHandle /* handle */,
46 base::SyncSocket::Handle /* socket handle */, 46 base::SyncSocket::TransitDescriptor /* socket descriptor */,
47 uint32 /* length */) 47 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 48
56 // Tell the renderer process that an audio input stream has been created. 49 // 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 50 // 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. 51 // from from then on. It is also given number of segments in shared memory.
59 #if defined(OS_WIN) 52 IPC_MESSAGE_CONTROL5(
60 IPC_MESSAGE_CONTROL5(AudioInputMsg_NotifyStreamCreated, 53 AudioInputMsg_NotifyStreamCreated,
61 int /* stream id */, 54 int /* stream id */,
62 base::SharedMemoryHandle /* handle */, 55 base::SharedMemoryHandle /* handle */,
63 base::SyncSocket::Handle /* socket handle */, 56 base::SyncSocket::TransitDescriptor /* socket descriptor */,
64 uint32 /* length */, 57 uint32 /* length */,
65 uint32 /* segment count */) 58 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 59
75 // Notification message sent from AudioRendererHost to renderer after an output 60 // Notification message sent from AudioRendererHost to renderer after an output
76 // device change has occurred. 61 // device change has occurred.
77 IPC_MESSAGE_CONTROL3(AudioMsg_NotifyDeviceChanged, 62 IPC_MESSAGE_CONTROL3(AudioMsg_NotifyDeviceChanged,
78 int /* stream_id */, 63 int /* stream_id */,
79 int /* new_buffer_size */, 64 int /* new_buffer_size */,
80 int /* new_sample_rate */) 65 int /* new_sample_rate */)
81 66
82 // Notification message sent from AudioRendererHost to renderer for state 67 // Notification message sent from AudioRendererHost to renderer for state
83 // update after the renderer has requested a Create/Start/Close. 68 // update after the renderer has requested a Create/Start/Close.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // Set audio volume of the stream specified by stream_id. 123 // 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. 124 // TODO(hclam): change this to vector if we have channel numbers other than 2.
140 IPC_MESSAGE_CONTROL2(AudioHostMsg_SetVolume, 125 IPC_MESSAGE_CONTROL2(AudioHostMsg_SetVolume,
141 int /* stream_id */, 126 int /* stream_id */,
142 double /* volume */) 127 double /* volume */)
143 128
144 // Set audio volume of the input stream specified by stream_id. 129 // Set audio volume of the input stream specified by stream_id.
145 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume, 130 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume,
146 int /* stream_id */, 131 int /* stream_id */,
147 double /* volume */) 132 double /* volume */)
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/audio_sync_reader.cc ('k') | content/renderer/media/audio_input_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698