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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 const PipelineStatusCB& error_cb, | 50 const PipelineStatusCB& error_cb, |
51 const TimeDeltaCB& get_time_cb) = 0; | 51 const TimeDeltaCB& get_time_cb) = 0; |
52 | 52 |
53 // Discards any video data and stops reading from |stream|, executing | 53 // Discards any video data and stops reading from |stream|, executing |
54 // |callback| when completed. | 54 // |callback| when completed. |
55 // | 55 // |
56 // Clients should expect |buffering_state_cb| to be called with | 56 // Clients should expect |buffering_state_cb| to be called with |
57 // BUFFERING_HAVE_NOTHING while flushing is in progress. | 57 // BUFFERING_HAVE_NOTHING while flushing is in progress. |
58 virtual void Flush(const base::Closure& callback) = 0; | 58 virtual void Flush(const base::Closure& callback) = 0; |
59 | 59 |
60 // Starts playback by reading from |stream| and decoding and rendering video. | 60 // Starts playback at |timestamp| by reading from |stream| and decoding and |
| 61 // rendering video. |
61 // | 62 // |
62 // Only valid to call after a successful Initialize() or Flush(). | 63 // Only valid to call after a successful Initialize() or Flush(). |
63 virtual void StartPlaying() = 0; | 64 virtual void StartPlayingFrom(base::TimeDelta timestamp) = 0; |
64 | 65 |
65 private: | 66 private: |
66 DISALLOW_COPY_AND_ASSIGN(VideoRenderer); | 67 DISALLOW_COPY_AND_ASSIGN(VideoRenderer); |
67 }; | 68 }; |
68 | 69 |
69 } // namespace media | 70 } // namespace media |
70 | 71 |
71 #endif // MEDIA_BASE_VIDEO_RENDERER_H_ | 72 #endif // MEDIA_BASE_VIDEO_RENDERER_H_ |
OLD | NEW |