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

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

Issue 275673002: Remove completion callbacks from AudioRenderer::Play/Pause(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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/mock_filters.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 #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/time.h" 10 #include "base/time/time.h"
(...skipping 29 matching lines...) Expand all
40 // 40 //
41 // |error_cb| is executed if an error was encountered. 41 // |error_cb| is executed if an error was encountered.
42 virtual void Initialize(DemuxerStream* stream, 42 virtual void Initialize(DemuxerStream* stream,
43 const PipelineStatusCB& init_cb, 43 const PipelineStatusCB& init_cb,
44 const StatisticsCB& statistics_cb, 44 const StatisticsCB& statistics_cb,
45 const base::Closure& underflow_cb, 45 const base::Closure& underflow_cb,
46 const TimeCB& time_cb, 46 const TimeCB& time_cb,
47 const base::Closure& ended_cb, 47 const base::Closure& ended_cb,
48 const PipelineStatusCB& error_cb) = 0; 48 const PipelineStatusCB& error_cb) = 0;
49 49
50 // Start audio decoding and rendering at the current playback rate, executing 50 // Signal audio playback to start at the current rate. It is expected that
51 // |callback| when playback is underway. 51 // |time_cb| will eventually start being run with time updates.
52 virtual void Play(const base::Closure& callback) = 0; 52 virtual void Play() = 0;
53 53
54 // Temporarily suspend decoding and rendering audio, executing |callback| when 54 // Signal audio playback to stop until further notice. It is expected that
55 // playback has been suspended. 55 // |time_cb| will no longer be run.
56 virtual void Pause(const base::Closure& callback) = 0; 56 virtual void Pause() = 0;
57 57
58 // Discard any audio data, executing |callback| when completed. 58 // Discard any audio data, executing |callback| when completed.
59 virtual void Flush(const base::Closure& callback) = 0; 59 virtual void Flush(const base::Closure& callback) = 0;
60 60
61 // Start prerolling audio data for samples starting at |time|, executing 61 // Start prerolling audio data for samples starting at |time|, executing
62 // |callback| when completed. 62 // |callback| when completed.
63 // 63 //
64 // Only valid to call after a successful Initialize() or Flush(). 64 // Only valid to call after a successful Initialize() or Flush().
65 virtual void Preroll(base::TimeDelta time, 65 virtual void Preroll(base::TimeDelta time,
66 const PipelineStatusCB& callback) = 0; 66 const PipelineStatusCB& callback) = 0;
(...skipping 11 matching lines...) Expand all
78 // Resumes playback after underflow occurs. 78 // Resumes playback after underflow occurs.
79 virtual void ResumeAfterUnderflow() = 0; 79 virtual void ResumeAfterUnderflow() = 0;
80 80
81 private: 81 private:
82 DISALLOW_COPY_AND_ASSIGN(AudioRenderer); 82 DISALLOW_COPY_AND_ASSIGN(AudioRenderer);
83 }; 83 };
84 84
85 } // namespace media 85 } // namespace media
86 86
87 #endif // MEDIA_BASE_AUDIO_RENDERER_H_ 87 #endif // MEDIA_BASE_AUDIO_RENDERER_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/mock_filters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698