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

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

Issue 2582533002: Simplify AudioInputRendererHost IPC interface. (Closed)
Patch Set: Created 4 years 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 // Low-latency audio capturing class utilizing audio input stream provided 5 // Low-latency audio capturing class utilizing audio input stream provided
6 // by a server (browser) process by use of an IPC interface. 6 // by a server (browser) process by use of an IPC interface.
7 // 7 //
8 // Relationship of classes: 8 // Relationship of classes:
9 // 9 //
10 // AudioInputController AudioInputDevice 10 // AudioInputController AudioInputDevice
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 protected: 96 protected:
97 friend class base::RefCountedThreadSafe<AudioInputDevice>; 97 friend class base::RefCountedThreadSafe<AudioInputDevice>;
98 ~AudioInputDevice() override; 98 ~AudioInputDevice() override;
99 99
100 // Methods called on IO thread ---------------------------------------------- 100 // Methods called on IO thread ----------------------------------------------
101 // AudioInputIPCDelegate implementation. 101 // AudioInputIPCDelegate implementation.
102 void OnStreamCreated(base::SharedMemoryHandle handle, 102 void OnStreamCreated(base::SharedMemoryHandle handle,
103 base::SyncSocket::Handle socket_handle, 103 base::SyncSocket::Handle socket_handle,
104 int length, 104 int length,
105 int total_segments) override; 105 int total_segments) override;
106 void OnVolume(double volume) override; 106 void OnError() override;
107 void OnStateChanged(AudioInputIPCDelegateState state) override;
108 void OnIPCClosed() override; 107 void OnIPCClosed() override;
109 108
110 private: 109 private:
111 // Note: The ordering of members in this enum is critical to correct behavior! 110 // Note: The ordering of members in this enum is critical to correct behavior!
112 enum State { 111 enum State {
113 IPC_CLOSED, // No more IPCs can take place. 112 IPC_CLOSED, // No more IPCs can take place.
114 IDLE, // Not started. 113 IDLE, // Not started.
115 CREATING_STREAM, // Waiting for OnStreamCreated() to be called back. 114 CREATING_STREAM, // Waiting for OnStreamCreated() to be called back.
116 RECORDING, // Receiving audio data. 115 RECORDING, // Receiving audio data.
117 }; 116 };
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // TODO(miu): Replace this by changing AudioCapturerSource to accept the 165 // TODO(miu): Replace this by changing AudioCapturerSource to accept the
167 // callback via Start(). See http://crbug.com/151051 for details. 166 // callback via Start(). See http://crbug.com/151051 for details.
168 bool stopping_hack_; 167 bool stopping_hack_;
169 168
170 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputDevice); 169 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputDevice);
171 }; 170 };
172 171
173 } // namespace media 172 } // namespace media
174 173
175 #endif // MEDIA_AUDIO_AUDIO_INPUT_DEVICE_H_ 174 #endif // MEDIA_AUDIO_AUDIO_INPUT_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698