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

Side by Side Diff: media/audio/audio_input_ipc.h

Issue 2941773002: Added initial muted state to stream creation callback, to avoid races. (Closed)
Patch Set: Added mute information to DoCompleteCreation log message. Created 3 years, 6 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
« no previous file with comments | « media/audio/audio_input_device_unittest.cc ('k') | media/base/audio_capturer_source.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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
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
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_
OLDNEW
« no previous file with comments | « media/audio/audio_input_device_unittest.cc ('k') | media/base/audio_capturer_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698