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

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

Issue 2919793002: Detect AudioInputStream muting and propagate to MediaStreamAudioSource. (Closed)
Patch Set: 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
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 friend class base::RefCountedThreadSafe<AudioInputDevice>; 99 friend class base::RefCountedThreadSafe<AudioInputDevice>;
100 ~AudioInputDevice() override; 100 ~AudioInputDevice() override;
101 101
102 // Methods called on IO thread ---------------------------------------------- 102 // Methods called on IO thread ----------------------------------------------
103 // AudioInputIPCDelegate implementation. 103 // AudioInputIPCDelegate implementation.
104 void OnStreamCreated(base::SharedMemoryHandle handle, 104 void OnStreamCreated(base::SharedMemoryHandle handle,
105 base::SyncSocket::Handle socket_handle, 105 base::SyncSocket::Handle socket_handle,
106 int length, 106 int length,
107 int total_segments) override; 107 int total_segments) override;
108 void OnError() override; 108 void OnError() override;
109 void OnMuted(bool is_muted) override;
109 void OnIPCClosed() override; 110 void OnIPCClosed() override;
110 111
111 private: 112 private:
112 // Note: The ordering of members in this enum is critical to correct behavior! 113 // Note: The ordering of members in this enum is critical to correct behavior!
113 enum State { 114 enum State {
114 IPC_CLOSED, // No more IPCs can take place. 115 IPC_CLOSED, // No more IPCs can take place.
115 IDLE, // Not started. 116 IDLE, // Not started.
116 CREATING_STREAM, // Waiting for OnStreamCreated() to be called back. 117 CREATING_STREAM, // Waiting for OnStreamCreated() to be called back.
117 RECORDING, // Receiving audio data. 118 RECORDING, // Receiving audio data.
118 }; 119 };
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // Flags that missing callbacks has been detected. Used for statistics, 197 // Flags that missing callbacks has been detected. Used for statistics,
197 // reported when stopping. Must only be accessed on the IO thread. 198 // reported when stopping. Must only be accessed on the IO thread.
198 bool missing_callbacks_detected_; 199 bool missing_callbacks_detected_;
199 200
200 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputDevice); 201 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputDevice);
201 }; 202 };
202 203
203 } // namespace media 204 } // namespace media
204 205
205 #endif // MEDIA_AUDIO_AUDIO_INPUT_DEVICE_H_ 206 #endif // MEDIA_AUDIO_AUDIO_INPUT_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698