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/time.h" | 10 #include "base/time/time.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // |callback| when playback is underway. | 67 // |callback| when playback is underway. |
68 virtual void Play(const base::Closure& callback) = 0; | 68 virtual void Play(const base::Closure& callback) = 0; |
69 | 69 |
70 // Temporarily suspend decoding and rendering video, executing |callback| when | 70 // Temporarily suspend decoding and rendering video, executing |callback| when |
71 // playback has been suspended. | 71 // playback has been suspended. |
72 virtual void Pause(const base::Closure& callback) = 0; | 72 virtual void Pause(const base::Closure& callback) = 0; |
73 | 73 |
74 // Discard any video data, executing |callback| when completed. | 74 // Discard any video data, executing |callback| when completed. |
75 virtual void Flush(const base::Closure& callback) = 0; | 75 virtual void Flush(const base::Closure& callback) = 0; |
76 | 76 |
77 // Start prerolling video data for samples starting at |time|, executing | 77 // Start prerolling video data. If |time| equals kNoTimestamp() then all |
78 // |callback| when completed. | 78 // samples delivered to the renderer are used to complete preroll. If |time| |
| 79 // does not equal kNoTimestamp(), then any samples delivered to the renderer |
| 80 // with timestamps less than |time| are silently dropped and not used to |
| 81 // satisfy preroll. |callback| is executed when preroll has completed. |
79 // | 82 // |
80 // Only valid to call after a successful Initialize() or Flush(). | 83 // Only valid to call after a successful Initialize(), Pause(), or Flush(). |
81 virtual void Preroll(base::TimeDelta time, | 84 virtual void Preroll(base::TimeDelta time, |
82 const PipelineStatusCB& callback) = 0; | 85 const PipelineStatusCB& callback) = 0; |
83 | 86 |
84 // Stop all operations in preparation for being deleted, executing |callback| | 87 // Stop all operations in preparation for being deleted, executing |callback| |
85 // when complete. | 88 // when complete. |
86 virtual void Stop(const base::Closure& callback) = 0; | 89 virtual void Stop(const base::Closure& callback) = 0; |
87 | 90 |
88 // Updates the current playback rate. | 91 // Updates the current playback rate. |
89 virtual void SetPlaybackRate(float playback_rate) = 0; | 92 virtual void SetPlaybackRate(float playback_rate) = 0; |
90 | 93 |
91 private: | 94 private: |
92 DISALLOW_COPY_AND_ASSIGN(VideoRenderer); | 95 DISALLOW_COPY_AND_ASSIGN(VideoRenderer); |
93 }; | 96 }; |
94 | 97 |
95 } // namespace media | 98 } // namespace media |
96 | 99 |
97 #endif // MEDIA_BASE_VIDEO_RENDERER_H_ | 100 #endif // MEDIA_BASE_VIDEO_RENDERER_H_ |
OLD | NEW |