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

Side by Side Diff: media/base/audio_renderer.h

Issue 10834236: Replace Pipeline::kEnded state and HasEnded() methods with renderer-specific bools. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « no previous file | media/base/media_log.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_BASE_AUDIO_RENDERER_H_ 5 #ifndef MEDIA_BASE_AUDIO_RENDERER_H_
6 #define MEDIA_BASE_AUDIO_RENDERER_H_ 6 #define MEDIA_BASE_AUDIO_RENDERER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 virtual void Preroll(base::TimeDelta time, 65 virtual void Preroll(base::TimeDelta time,
66 const PipelineStatusCB& callback) = 0; 66 const PipelineStatusCB& callback) = 0;
67 67
68 // Stop all operations in preparation for being deleted, executing |callback| 68 // Stop all operations in preparation for being deleted, executing |callback|
69 // when complete. 69 // when complete.
70 virtual void Stop(const base::Closure& callback) = 0; 70 virtual void Stop(const base::Closure& callback) = 0;
71 71
72 // Updates the current playback rate. 72 // Updates the current playback rate.
73 virtual void SetPlaybackRate(float playback_rate) = 0; 73 virtual void SetPlaybackRate(float playback_rate) = 0;
74 74
75 // Returns true if all audio data has been played back by the audio device.
76 virtual bool HasEnded() = 0;
77
78 // Sets the output volume. 75 // Sets the output volume.
79 virtual void SetVolume(float volume) = 0; 76 virtual void SetVolume(float volume) = 0;
80 77
81 // Resumes playback after underflow occurs. 78 // Resumes playback after underflow occurs.
82 // 79 //
83 // |buffer_more_audio| is set to true if you want to increase the size of the 80 // |buffer_more_audio| is set to true if you want to increase the size of the
84 // decoded audio buffer. 81 // decoded audio buffer.
85 virtual void ResumeAfterUnderflow(bool buffer_more_audio) = 0; 82 virtual void ResumeAfterUnderflow(bool buffer_more_audio) = 0;
86 83
87 protected: 84 protected:
88 friend class base::RefCountedThreadSafe<AudioRenderer>; 85 friend class base::RefCountedThreadSafe<AudioRenderer>;
89 86
90 AudioRenderer(); 87 AudioRenderer();
91 virtual ~AudioRenderer(); 88 virtual ~AudioRenderer();
92 89
93 private: 90 private:
94 DISALLOW_COPY_AND_ASSIGN(AudioRenderer); 91 DISALLOW_COPY_AND_ASSIGN(AudioRenderer);
95 }; 92 };
96 93
97 } // namespace media 94 } // namespace media
98 95
99 #endif // MEDIA_BASE_AUDIO_RENDERER_H_ 96 #endif // MEDIA_BASE_AUDIO_RENDERER_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/media_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698