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

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

Issue 9965076: Revert 130180 - Move media/audio files into media namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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_output_controller_unittest.cc ('k') | media/audio/audio_output_dispatcher.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 // AudioOutputDispatcher is a single-threaded class that dispatches creation and 5 // AudioOutputDispatcher is a single-threaded class that dispatches creation and
6 // deletion of audio output streams. AudioOutputProxy objects use this class to 6 // deletion of audio output streams. AudioOutputProxy objects use this class to
7 // allocate and recycle actual audio output streams. When playback is started, 7 // allocate and recycle actual audio output streams. When playback is started,
8 // the proxy calls StreamStarted() to get an output stream that it uses to play 8 // the proxy calls StreamStarted() to get an output stream that it uses to play
9 // audio. When playback is stopped, the proxy returns the stream back to the 9 // audio. When playback is stopped, the proxy returns the stream back to the
10 // dispatcher by calling StreamStopped(). 10 // dispatcher by calling StreamStopped().
(...skipping 14 matching lines...) Expand all
25 #include <vector> 25 #include <vector>
26 #include <list> 26 #include <list>
27 27
28 #include "base/basictypes.h" 28 #include "base/basictypes.h"
29 #include "base/memory/ref_counted.h" 29 #include "base/memory/ref_counted.h"
30 #include "base/memory/weak_ptr.h" 30 #include "base/memory/weak_ptr.h"
31 #include "base/timer.h" 31 #include "base/timer.h"
32 #include "media/audio/audio_manager.h" 32 #include "media/audio/audio_manager.h"
33 #include "media/audio/audio_parameters.h" 33 #include "media/audio/audio_parameters.h"
34 34
35 class AudioOutputStream;
35 class MessageLoop; 36 class MessageLoop;
36 37
37 namespace media {
38
39 class AudioOutputStream;
40
41 class MEDIA_EXPORT AudioOutputDispatcher 38 class MEDIA_EXPORT AudioOutputDispatcher
42 : public base::RefCountedThreadSafe<AudioOutputDispatcher> { 39 : public base::RefCountedThreadSafe<AudioOutputDispatcher> {
43 public: 40 public:
44 // |close_delay_ms| specifies delay after the stream is paused until 41 // |close_delay_ms| specifies delay after the stream is paused until
45 // the audio device is closed. 42 // the audio device is closed.
46 AudioOutputDispatcher(AudioManager* audio_manager, 43 AudioOutputDispatcher(AudioManager* audio_manager,
47 const AudioParameters& params, 44 const AudioParameters& params,
48 base::TimeDelta close_delay); 45 base::TimeDelta close_delay);
49 ~AudioOutputDispatcher(); 46 ~AudioOutputDispatcher();
50 47
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 AudioOutputStreamList idle_streams_; 100 AudioOutputStreamList idle_streams_;
104 AudioOutputStreamList pausing_streams_; 101 AudioOutputStreamList pausing_streams_;
105 102
106 // Used to post delayed tasks to ourselves that we cancel inside Shutdown(). 103 // Used to post delayed tasks to ourselves that we cancel inside Shutdown().
107 base::WeakPtrFactory<AudioOutputDispatcher> weak_this_; 104 base::WeakPtrFactory<AudioOutputDispatcher> weak_this_;
108 base::DelayTimer<AudioOutputDispatcher> close_timer_; 105 base::DelayTimer<AudioOutputDispatcher> close_timer_;
109 106
110 DISALLOW_COPY_AND_ASSIGN(AudioOutputDispatcher); 107 DISALLOW_COPY_AND_ASSIGN(AudioOutputDispatcher);
111 }; 108 };
112 109
113 } // namespace media
114
115 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_DISPATCHER_H_ 110 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_DISPATCHER_H_
OLDNEW
« no previous file with comments | « media/audio/audio_output_controller_unittest.cc ('k') | media/audio/audio_output_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698