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

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

Issue 38533002: Revert 230334 "Improve and simplify AudioOutputDispatcher." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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 | « no previous file | trunk/src/media/audio/audio_output_dispatcher_impl.h » ('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 base class that dispatches 5 // AudioOutputDispatcher is a single-threaded base class that dispatches
6 // creation and deletion of audio output streams. AudioOutputProxy objects use 6 // creation and deletion of audio output streams. AudioOutputProxy objects use
7 // this class to allocate and recycle actual audio output streams. When playback 7 // this class to allocate and recycle actual audio output streams. When playback
8 // is started, the proxy calls StartStream() to get an output stream that it 8 // is started, the proxy calls StartStream() to get an output stream that it
9 // uses to play audio. When playback is stopped, the proxy returns the stream 9 // uses to play audio. When playback is stopped, the proxy returns the stream
10 // back to the dispatcher by calling StopStream(). 10 // back to the dispatcher by calling StopStream().
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 virtual void CloseStream(AudioOutputProxy* stream_proxy) = 0; 64 virtual void CloseStream(AudioOutputProxy* stream_proxy) = 0;
65 65
66 // Called on the audio thread when the AudioManager is shutting down. 66 // Called on the audio thread when the AudioManager is shutting down.
67 virtual void Shutdown() = 0; 67 virtual void Shutdown() = 0;
68 68
69 // Accessor to the input device id used by unified IO. 69 // Accessor to the input device id used by unified IO.
70 const std::string& input_device_id() const { return input_device_id_; } 70 const std::string& input_device_id() const { return input_device_id_; }
71 71
72 protected: 72 protected:
73 friend class base::RefCountedThreadSafe<AudioOutputDispatcher>; 73 friend class base::RefCountedThreadSafe<AudioOutputDispatcher>;
74 friend class AudioOutputProxyTest;
75
74 virtual ~AudioOutputDispatcher(); 76 virtual ~AudioOutputDispatcher();
75 77
76 // A no-reference-held pointer (we don't want circular references) back to the 78 // A no-reference-held pointer (we don't want circular references) back to the
77 // AudioManager that owns this object. 79 // AudioManager that owns this object.
78 AudioManager* audio_manager_; 80 AudioManager* audio_manager_;
79 const scoped_refptr<base::MessageLoopProxy> message_loop_; 81 const scoped_refptr<base::MessageLoopProxy> message_loop_;
80 const AudioParameters params_; 82 const AudioParameters params_;
81 const std::string output_device_id_; 83 const std::string output_device_id_;
82 const std::string input_device_id_; 84 const std::string input_device_id_;
83 85
84 private: 86 private:
85 DISALLOW_COPY_AND_ASSIGN(AudioOutputDispatcher); 87 DISALLOW_COPY_AND_ASSIGN(AudioOutputDispatcher);
86 }; 88 };
87 89
88 } // namespace media 90 } // namespace media
89 91
90 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_DISPATCHER_H_ 92 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_DISPATCHER_H_
OLDNEW
« no previous file with comments | « no previous file | trunk/src/media/audio/audio_output_dispatcher_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698