OLD | NEW |
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_VIDEO_RENDERER_H_ | 5 #ifndef MEDIA_BASE_VIDEO_RENDERER_H_ |
6 #define MEDIA_BASE_VIDEO_RENDERER_H_ | 6 #define MEDIA_BASE_VIDEO_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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 virtual void Preroll(base::TimeDelta time, | 78 virtual void Preroll(base::TimeDelta time, |
79 const PipelineStatusCB& callback) = 0; | 79 const PipelineStatusCB& callback) = 0; |
80 | 80 |
81 // Stop all operations in preparation for being deleted, executing |callback| | 81 // Stop all operations in preparation for being deleted, executing |callback| |
82 // when complete. | 82 // when complete. |
83 virtual void Stop(const base::Closure& callback) = 0; | 83 virtual void Stop(const base::Closure& callback) = 0; |
84 | 84 |
85 // Updates the current playback rate. | 85 // Updates the current playback rate. |
86 virtual void SetPlaybackRate(float playback_rate) = 0; | 86 virtual void SetPlaybackRate(float playback_rate) = 0; |
87 | 87 |
88 // Returns true if all video data has been rendered. | |
89 virtual bool HasEnded() = 0; | |
90 | |
91 protected: | 88 protected: |
92 friend class base::RefCountedThreadSafe<VideoRenderer>; | 89 friend class base::RefCountedThreadSafe<VideoRenderer>; |
93 | 90 |
94 VideoRenderer(); | 91 VideoRenderer(); |
95 virtual ~VideoRenderer(); | 92 virtual ~VideoRenderer(); |
96 | 93 |
97 private: | 94 private: |
98 DISALLOW_COPY_AND_ASSIGN(VideoRenderer); | 95 DISALLOW_COPY_AND_ASSIGN(VideoRenderer); |
99 }; | 96 }; |
100 | 97 |
101 } // namespace media | 98 } // namespace media |
102 | 99 |
103 #endif // MEDIA_BASE_VIDEO_RENDERER_H_ | 100 #endif // MEDIA_BASE_VIDEO_RENDERER_H_ |
OLD | NEW |