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

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

Issue 11298006: Browser-wide audio mirroring for TabCapture API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments, finish unit_tests Created 8 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 | Annotate | Revision Log
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>
11 11
12 #include "base/atomic_ref_count.h" 12 #include "base/atomic_ref_count.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/observer_list.h" 15 #include "base/observer_list.h"
16 #include "base/synchronization/lock.h" 16 #include "base/synchronization/lock.h"
17 #include "media/audio/audio_manager.h" 17 #include "media/audio/audio_manager.h"
18 18
19 #if defined(OS_WIN) 19 #if defined(OS_WIN)
20 #include "base/win/scoped_com_initializer.h" 20 #include "base/win/scoped_com_initializer.h"
21 #endif 21 #endif
22 22
23 namespace base { 23 namespace base {
24 class Thread; 24 class Thread;
25 } 25 }
26 26
27 namespace media { 27 namespace media {
28 28
29 class AudioOutputDispatcher; 29 class AudioOutputDispatcher;
30 class VirtualAudioInputStream;
30 31
31 // AudioManagerBase provides AudioManager functions common for all platforms. 32 // AudioManagerBase provides AudioManager functions common for all platforms.
32 class MEDIA_EXPORT AudioManagerBase : public AudioManager { 33 class MEDIA_EXPORT AudioManagerBase : public AudioManager {
33 public: 34 public:
34 // Name of the generic "default" device. 35 // Name of the generic "default" device.
35 static const char kDefaultDeviceName[]; 36 static const char kDefaultDeviceName[];
36 // Unique Id of the generic "default" device. 37 // Unique Id of the generic "default" device.
37 static const char kDefaultDeviceId[]; 38 static const char kDefaultDeviceId[];
38 39
39 virtual ~AudioManagerBase(); 40 virtual ~AudioManagerBase();
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 153
153 // Thread used to interact with audio streams created by this audio manager. 154 // Thread used to interact with audio streams created by this audio manager.
154 scoped_ptr<base::Thread> audio_thread_; 155 scoped_ptr<base::Thread> audio_thread_;
155 mutable base::Lock audio_thread_lock_; 156 mutable base::Lock audio_thread_lock_;
156 157
157 // The message loop of the audio thread this object runs on. Used for internal 158 // The message loop of the audio thread this object runs on. Used for internal
158 // tasks which run on the audio thread even after Shutdown() has been started 159 // tasks which run on the audio thread even after Shutdown() has been started
159 // and GetMessageLoop() starts returning NULL. 160 // and GetMessageLoop() starts returning NULL.
160 scoped_refptr<base::MessageLoopProxy> message_loop_; 161 scoped_refptr<base::MessageLoopProxy> message_loop_;
161 162
163 // Currently active VirtualAudioInputStream. When this is set, we will
164 // create all audio output streams as virtual streams so as to redirect them
165 // to this virtual input stream for tab audio capture.
Alpha Left Google 2012/11/28 21:26:51 No need to mention tab audio capture here.
166 VirtualAudioInputStream* virtual_audio_input_stream_;
167
162 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); 168 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase);
163 }; 169 };
164 170
165 } // namespace media 171 } // namespace media
166 172
167 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ 173 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698