| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 const TimeDeltaCB& get_duration_cb) = 0; | 59 const TimeDeltaCB& get_duration_cb) = 0; |
| 60 | 60 |
| 61 // Discard any video data and stop reading from |stream|, executing |callback| | 61 // Discard any video data and stop reading from |stream|, executing |callback| |
| 62 // when completed. | 62 // when completed. |
| 63 // | 63 // |
| 64 // Clients should expect |buffering_state_cb| to be called with | 64 // Clients should expect |buffering_state_cb| to be called with |
| 65 // BUFFERING_HAVE_NOTHING while flushing is in progress. | 65 // BUFFERING_HAVE_NOTHING while flushing is in progress. |
| 66 virtual void Flush(const base::Closure& callback) = 0; | 66 virtual void Flush(const base::Closure& callback) = 0; |
| 67 | 67 |
| 68 // Starts playback by reading from |stream| and decoding and rendering video. | 68 // Starts playback by reading from |stream| and decoding and rendering video. |
| 69 // |timestamp| is the media timestamp playback should start rendering from. | |
| 70 // | 69 // |
| 71 // Only valid to call after a successful Initialize() or Flush(). | 70 // Only valid to call after a successful Initialize() or Flush(). |
| 72 virtual void StartPlayingFrom(base::TimeDelta timestamp) = 0; | 71 virtual void StartPlaying() = 0; |
| 73 | 72 |
| 74 // Stop all operations in preparation for being deleted, executing |callback| | 73 // Stop all operations in preparation for being deleted, executing |callback| |
| 75 // when complete. | 74 // when complete. |
| 76 virtual void Stop(const base::Closure& callback) = 0; | 75 virtual void Stop(const base::Closure& callback) = 0; |
| 77 | 76 |
| 78 private: | 77 private: |
| 79 DISALLOW_COPY_AND_ASSIGN(VideoRenderer); | 78 DISALLOW_COPY_AND_ASSIGN(VideoRenderer); |
| 80 }; | 79 }; |
| 81 | 80 |
| 82 } // namespace media | 81 } // namespace media |
| 83 | 82 |
| 84 #endif // MEDIA_BASE_VIDEO_RENDERER_H_ | 83 #endif // MEDIA_BASE_VIDEO_RENDERER_H_ |
| OLD | NEW |