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

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

Issue 13006011: Merge 189983 "Add speaker on/off control on Android for WebRTC " (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1410/src/
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « media/audio/audio_input_unittest.cc ('k') | media/audio/audio_manager_base.cc » ('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_MANAGER_BASE_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_
6 #define MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ 6 #define MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 void NotifyAllOutputDeviceChangeListeners(); 139 void NotifyAllOutputDeviceChangeListeners();
140 140
141 // Map of cached AudioOutputDispatcher instances. Must only be touched 141 // Map of cached AudioOutputDispatcher instances. Must only be touched
142 // from the audio thread (no locking). 142 // from the audio thread (no locking).
143 AudioOutputDispatchersMap output_dispatchers_; 143 AudioOutputDispatchersMap output_dispatchers_;
144 144
145 private: 145 private:
146 // Called by Shutdown(). 146 // Called by Shutdown().
147 void ShutdownOnAudioThread(); 147 void ShutdownOnAudioThread();
148 148
149 #if defined(OS_ANDROID)
149 void SetAudioMode(int mode); 150 void SetAudioMode(int mode);
151 void RegisterHeadsetReceiver();
152 void UnregisterHeadsetReceiver();
153 #endif
150 154
151 // Counts the number of active input streams to find out if something else 155 // Counts the number of active input streams to find out if something else
152 // is currently recording in Chrome. 156 // is currently recording in Chrome.
153 base::AtomicRefCount num_active_input_streams_; 157 base::AtomicRefCount num_active_input_streams_;
154 158
155 // Max number of open output streams, modified by 159 // Max number of open output streams, modified by
156 // SetMaxOutputStreamsAllowed(). 160 // SetMaxOutputStreamsAllowed().
157 int max_num_output_streams_; 161 int max_num_output_streams_;
158 162
159 // Max number of open input streams. 163 // Max number of open input streams.
(...skipping 15 matching lines...) Expand all
175 // The message loop of the audio thread this object runs on. Used for internal 179 // The message loop of the audio thread this object runs on. Used for internal
176 // tasks which run on the audio thread even after Shutdown() has been started 180 // tasks which run on the audio thread even after Shutdown() has been started
177 // and GetMessageLoop() starts returning NULL. 181 // and GetMessageLoop() starts returning NULL.
178 scoped_refptr<base::MessageLoopProxy> message_loop_; 182 scoped_refptr<base::MessageLoopProxy> message_loop_;
179 183
180 // Currently active VirtualAudioInputStream. When this is set, we will 184 // Currently active VirtualAudioInputStream. When this is set, we will
181 // create all audio output streams as virtual streams so as to redirect audio 185 // create all audio output streams as virtual streams so as to redirect audio
182 // data to this virtual input stream. 186 // data to this virtual input stream.
183 VirtualAudioInputStream* virtual_audio_input_stream_; 187 VirtualAudioInputStream* virtual_audio_input_stream_;
184 188
189 #if defined(OS_ANDROID)
190 // Java AudioManager instance.
191 base::android::ScopedJavaGlobalRef<jobject> j_audio_manager_;
192 #endif
193
185 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); 194 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase);
186 }; 195 };
187 196
188 } // namespace media 197 } // namespace media
189 198
190 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ 199 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_
OLDNEW
« no previous file with comments | « media/audio/audio_input_unittest.cc ('k') | media/audio/audio_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698