| 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_FILTERS_VIDEO_RENDERER_BASE_H_ | 5 #ifndef MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_ |
| 6 #define MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_ | 6 #define MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // Filter implementation. | 46 // Filter implementation. |
| 47 virtual void Play(const base::Closure& callback) OVERRIDE; | 47 virtual void Play(const base::Closure& callback) OVERRIDE; |
| 48 virtual void Pause(const base::Closure& callback) OVERRIDE; | 48 virtual void Pause(const base::Closure& callback) OVERRIDE; |
| 49 virtual void Flush(const base::Closure& callback) OVERRIDE; | 49 virtual void Flush(const base::Closure& callback) OVERRIDE; |
| 50 virtual void Stop(const base::Closure& callback) OVERRIDE; | 50 virtual void Stop(const base::Closure& callback) OVERRIDE; |
| 51 virtual void SetPlaybackRate(float playback_rate) OVERRIDE; | 51 virtual void SetPlaybackRate(float playback_rate) OVERRIDE; |
| 52 virtual void Seek(base::TimeDelta time, const FilterStatusCB& cb) OVERRIDE; | 52 virtual void Seek(base::TimeDelta time, const FilterStatusCB& cb) OVERRIDE; |
| 53 | 53 |
| 54 // VideoRenderer implementation. | 54 // VideoRenderer implementation. |
| 55 virtual void Initialize(VideoDecoder* decoder, | 55 virtual void Initialize(VideoDecoder* decoder, |
| 56 const base::Closure& callback, | 56 const base::Closure& init_cb, |
| 57 const StatisticsCallback& stats_callback) OVERRIDE; | 57 const StatisticsCallback& stats_callback, |
| 58 const VideoTimeCB& video_time_cb) OVERRIDE; |
| 58 virtual bool HasEnded() OVERRIDE; | 59 virtual bool HasEnded() OVERRIDE; |
| 59 | 60 |
| 60 // PlatformThread::Delegate implementation. | 61 // PlatformThread::Delegate implementation. |
| 61 virtual void ThreadMain() OVERRIDE; | 62 virtual void ThreadMain() OVERRIDE; |
| 62 | 63 |
| 63 // Clients of this class (painter/compositor) should use GetCurrentFrame() | 64 // Clients of this class (painter/compositor) should use GetCurrentFrame() |
| 64 // obtain ownership of VideoFrame, it should always relinquish the ownership | 65 // obtain ownership of VideoFrame, it should always relinquish the ownership |
| 65 // by use PutCurrentFrame(). Current frame is not guaranteed to be non-NULL. | 66 // by use PutCurrentFrame(). Current frame is not guaranteed to be non-NULL. |
| 66 // It expects clients to use color-fill the background if current frame | 67 // It expects clients to use color-fill the background if current frame |
| 67 // is NULL. This could happen before pipeline is pre-rolled or during | 68 // is NULL. This could happen before pipeline is pre-rolled or during |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 bool pending_read_; | 178 bool pending_read_; |
| 178 bool pending_paint_; | 179 bool pending_paint_; |
| 179 bool pending_paint_with_last_available_; | 180 bool pending_paint_with_last_available_; |
| 180 | 181 |
| 181 float playback_rate_; | 182 float playback_rate_; |
| 182 | 183 |
| 183 // Filter callbacks. | 184 // Filter callbacks. |
| 184 base::Closure flush_callback_; | 185 base::Closure flush_callback_; |
| 185 FilterStatusCB seek_cb_; | 186 FilterStatusCB seek_cb_; |
| 186 StatisticsCallback statistics_callback_; | 187 StatisticsCallback statistics_callback_; |
| 188 VideoTimeCB video_time_cb_; |
| 187 | 189 |
| 188 base::TimeDelta seek_timestamp_; | 190 base::TimeDelta seek_timestamp_; |
| 189 | 191 |
| 190 VideoDecoder::ReadCB read_cb_; | 192 VideoDecoder::ReadCB read_cb_; |
| 191 | 193 |
| 192 // Embedder callback for notifying a new frame is available for painting. | 194 // Embedder callback for notifying a new frame is available for painting. |
| 193 base::Closure paint_cb_; | 195 base::Closure paint_cb_; |
| 194 | 196 |
| 195 // Callback to execute to inform the player if the video decoder's output is | 197 // Callback to execute to inform the player if the video decoder's output is |
| 196 // opaque. | 198 // opaque. |
| 197 SetOpaqueCB set_opaque_cb_; | 199 SetOpaqueCB set_opaque_cb_; |
| 198 | 200 |
| 199 DISALLOW_COPY_AND_ASSIGN(VideoRendererBase); | 201 DISALLOW_COPY_AND_ASSIGN(VideoRendererBase); |
| 200 }; | 202 }; |
| 201 | 203 |
| 202 } // namespace media | 204 } // namespace media |
| 203 | 205 |
| 204 #endif // MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_ | 206 #endif // MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_ |
| OLD | NEW |