OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_RENDERER_H_ | 5 #ifndef MEDIA_BASE_RENDERER_H_ |
6 #define MEDIA_BASE_RENDERER_H_ | 6 #define MEDIA_BASE_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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 // The following functions must be called after Initialize(). | 63 // The following functions must be called after Initialize(). |
64 | 64 |
65 // Discards any buffered data, executing |flush_cb| when completed. | 65 // Discards any buffered data, executing |flush_cb| when completed. |
66 virtual void Flush(const base::Closure& flush_cb) = 0; | 66 virtual void Flush(const base::Closure& flush_cb) = 0; |
67 | 67 |
68 // Starts rendering from |time|. | 68 // Starts rendering from |time|. |
69 virtual void StartPlayingFrom(base::TimeDelta time) = 0; | 69 virtual void StartPlayingFrom(base::TimeDelta time) = 0; |
70 | 70 |
71 // Updates the current playback rate. The default playback rate should be 1. | 71 // Updates the current playback rate. The default playback rate should be 1. |
72 virtual void SetPlaybackRate(float playback_rate) = 0; | 72 virtual void SetPlaybackRate(double playback_rate) = 0; |
73 | 73 |
74 // Sets the output volume. The default volume should be 1. | 74 // Sets the output volume. The default volume should be 1. |
75 virtual void SetVolume(float volume) = 0; | 75 virtual void SetVolume(float volume) = 0; |
76 | 76 |
77 // Returns the current media time. | 77 // Returns the current media time. |
78 virtual base::TimeDelta GetMediaTime() = 0; | 78 virtual base::TimeDelta GetMediaTime() = 0; |
79 | 79 |
80 // Returns whether |this| renders audio. | 80 // Returns whether |this| renders audio. |
81 virtual bool HasAudio() = 0; | 81 virtual bool HasAudio() = 0; |
82 | 82 |
83 // Returns whether |this| renders video. | 83 // Returns whether |this| renders video. |
84 virtual bool HasVideo() = 0; | 84 virtual bool HasVideo() = 0; |
85 | 85 |
86 private: | 86 private: |
87 DISALLOW_COPY_AND_ASSIGN(Renderer); | 87 DISALLOW_COPY_AND_ASSIGN(Renderer); |
88 }; | 88 }; |
89 | 89 |
90 } // namespace media | 90 } // namespace media |
91 | 91 |
92 #endif // MEDIA_BASE_RENDERER_H_ | 92 #endif // MEDIA_BASE_RENDERER_H_ |
OLD | NEW |