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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
46 // data or has enough data to continue playback. | 46 // data or has enough data to continue playback. |
47 // | 47 // |
48 // |paint_cb| is executed on the video frame timing thread whenever a new | 48 // |paint_cb| is executed on the video frame timing thread whenever a new |
49 // frame is available for painting. Can be called from any thread. | 49 // frame is available for painting. Can be called from any thread. |
50 // | 50 // |
51 // |ended_cb| is executed when video rendering has reached the end of stream. | 51 // |ended_cb| is executed when video rendering has reached the end of stream. |
52 // | 52 // |
53 // |error_cb| is executed if an error was encountered after initialization. | 53 // |error_cb| is executed if an error was encountered after initialization. |
54 // | 54 // |
55 // |get_time_cb| is used to query the current media playback time. | 55 // |get_time_cb| is used to query the current media playback time. |
56 virtual void Initialize(DemuxerStream* stream, | 56 // |
57 const PipelineStatusCB& init_cb, | 57 // |waiting_for_encryption_key_cb| is executed whenever the stream needs |
ddorwin
2015/02/19 05:33:17
dittos
jrummell
2015/02/23 22:06:32
Done.
| |
58 const SetDecryptorReadyCB& set_decryptor_ready_cb, | 58 // a new key provided in order to decrypt the data. |
59 const StatisticsCB& statistics_cb, | 59 virtual void Initialize( |
60 const BufferingStateCB& buffering_state_cb, | 60 DemuxerStream* stream, |
61 const PaintCB& paint_cb, | 61 const PipelineStatusCB& init_cb, |
62 const base::Closure& ended_cb, | 62 const SetDecryptorReadyCB& set_decryptor_ready_cb, |
63 const PipelineStatusCB& error_cb, | 63 const StatisticsCB& statistics_cb, |
64 const TimeDeltaCB& get_time_cb) = 0; | 64 const BufferingStateCB& buffering_state_cb, |
65 const PaintCB& paint_cb, | |
66 const base::Closure& ended_cb, | |
67 const PipelineStatusCB& error_cb, | |
68 const TimeDeltaCB& get_time_cb, | |
69 const base::Closure& waiting_for_encryption_key_cb) = 0; | |
65 | 70 |
66 // Discards any video data and stops reading from |stream|, executing | 71 // Discards any video data and stops reading from |stream|, executing |
67 // |callback| when completed. | 72 // |callback| when completed. |
68 // | 73 // |
69 // Clients should expect |buffering_state_cb| to be called with | 74 // Clients should expect |buffering_state_cb| to be called with |
70 // BUFFERING_HAVE_NOTHING while flushing is in progress. | 75 // BUFFERING_HAVE_NOTHING while flushing is in progress. |
71 virtual void Flush(const base::Closure& callback) = 0; | 76 virtual void Flush(const base::Closure& callback) = 0; |
72 | 77 |
73 // Starts playback at |timestamp| by reading from |stream| and decoding and | 78 // Starts playback at |timestamp| by reading from |stream| and decoding and |
74 // rendering video. | 79 // rendering video. |
75 // | 80 // |
76 // Only valid to call after a successful Initialize() or Flush(). | 81 // Only valid to call after a successful Initialize() or Flush(). |
77 virtual void StartPlayingFrom(base::TimeDelta timestamp) = 0; | 82 virtual void StartPlayingFrom(base::TimeDelta timestamp) = 0; |
78 | 83 |
79 private: | 84 private: |
80 DISALLOW_COPY_AND_ASSIGN(VideoRenderer); | 85 DISALLOW_COPY_AND_ASSIGN(VideoRenderer); |
81 }; | 86 }; |
82 | 87 |
83 } // namespace media | 88 } // namespace media |
84 | 89 |
85 #endif // MEDIA_BASE_VIDEO_RENDERER_H_ | 90 #endif // MEDIA_BASE_VIDEO_RENDERER_H_ |
OLD | NEW |