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

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

Issue 11416350: Tab Audio Mirroring: WebContentsAudioInputStream is a new implementation which represents the lifet… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 11 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_controller.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 10 matching lines...) Expand all
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 class VirtualAudioInputStream;
31 class VirtualAudioOutputStream;
31 32
32 // AudioManagerBase provides AudioManager functions common for all platforms. 33 // AudioManagerBase provides AudioManager functions common for all platforms.
33 class MEDIA_EXPORT AudioManagerBase : public AudioManager { 34 class MEDIA_EXPORT AudioManagerBase : public AudioManager {
34 public: 35 public:
35 // Name of the generic "default" device. 36 // Name of the generic "default" device.
36 static const char kDefaultDeviceName[]; 37 static const char kDefaultDeviceName[];
37 // Unique Id of the generic "default" device. 38 // Unique Id of the generic "default" device.
38 static const char kDefaultDeviceId[]; 39 static const char kDefaultDeviceId[];
39 40
40 virtual ~AudioManagerBase(); 41 virtual ~AudioManagerBase();
(...skipping 16 matching lines...) Expand all
57 58
58 virtual AudioOutputStream* MakeAudioOutputStreamProxy( 59 virtual AudioOutputStream* MakeAudioOutputStreamProxy(
59 const AudioParameters& params) OVERRIDE; 60 const AudioParameters& params) OVERRIDE;
60 61
61 virtual bool IsRecordingInProcess() OVERRIDE; 62 virtual bool IsRecordingInProcess() OVERRIDE;
62 63
63 // Called internally by the audio stream when it has been closed. 64 // Called internally by the audio stream when it has been closed.
64 virtual void ReleaseOutputStream(AudioOutputStream* stream); 65 virtual void ReleaseOutputStream(AudioOutputStream* stream);
65 virtual void ReleaseInputStream(AudioInputStream* stream); 66 virtual void ReleaseInputStream(AudioInputStream* stream);
66 67
68 // Called internally by the browser-wide VirtualAudioInputStream after it has
69 // been closed. Notifies all AudioDeviceListeners to re-create output
70 // streams and then deletes |stream|.
71 virtual void ReleaseVirtualInputStream(VirtualAudioInputStream* stream);
72 virtual void ReleaseVirtualOutputStream(VirtualAudioOutputStream* stream);
73
67 void IncreaseActiveInputStreamCount(); 74 void IncreaseActiveInputStreamCount();
68 void DecreaseActiveInputStreamCount(); 75 void DecreaseActiveInputStreamCount();
69 76
70 // Creates the output stream for the |AUDIO_PCM_LINEAR| format. The legacy 77 // Creates the output stream for the |AUDIO_PCM_LINEAR| format. The legacy
71 // name is also from |AUDIO_PCM_LINEAR|. 78 // name is also from |AUDIO_PCM_LINEAR|.
72 virtual AudioOutputStream* MakeLinearOutputStream( 79 virtual AudioOutputStream* MakeLinearOutputStream(
73 const AudioParameters& params) = 0; 80 const AudioParameters& params) = 0;
74 81
75 // Creates the output stream for the |AUDIO_PCM_LOW_LATENCY| format. 82 // Creates the output stream for the |AUDIO_PCM_LOW_LATENCY| format.
76 virtual AudioOutputStream* MakeLowLatencyOutputStream( 83 virtual AudioOutputStream* MakeLowLatencyOutputStream(
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // create all audio output streams as virtual streams so as to redirect audio 171 // create all audio output streams as virtual streams so as to redirect audio
165 // data to this virtual input stream. 172 // data to this virtual input stream.
166 VirtualAudioInputStream* virtual_audio_input_stream_; 173 VirtualAudioInputStream* virtual_audio_input_stream_;
167 174
168 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); 175 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase);
169 }; 176 };
170 177
171 } // namespace media 178 } // namespace media
172 179
173 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ 180 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_
OLDNEW
« no previous file with comments | « media/audio/audio_input_controller.cc ('k') | media/audio/audio_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698