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/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 // PlatformThread::Delegate implementation. | 83 // PlatformThread::Delegate implementation. |
84 virtual void ThreadMain() OVERRIDE; | 84 virtual void ThreadMain() OVERRIDE; |
85 | 85 |
86 private: | 86 private: |
87 // Callback for |video_frame_stream_| initialization. | 87 // Callback for |video_frame_stream_| initialization. |
88 void OnVideoFrameStreamInitialized(bool success, bool has_alpha); | 88 void OnVideoFrameStreamInitialized(bool success, bool has_alpha); |
89 | 89 |
90 // Callback for |video_frame_stream_| to deliver decoded video frames and | 90 // Callback for |video_frame_stream_| to deliver decoded video frames and |
91 // report video decoding status. | 91 // report video decoding status. |
92 void FrameReady(VideoDecoder::Status status, | 92 void FrameReady(VideoFrameStream::Status status, |
93 const scoped_refptr<VideoFrame>& frame); | 93 const scoped_refptr<VideoFrame>& frame); |
94 | 94 |
95 // Helper method for adding a frame to |ready_frames_|. | 95 // Helper method for adding a frame to |ready_frames_|. |
96 void AddReadyFrame_Locked(const scoped_refptr<VideoFrame>& frame); | 96 void AddReadyFrame_Locked(const scoped_refptr<VideoFrame>& frame); |
97 | 97 |
98 // Helper method that schedules an asynchronous read from the | 98 // Helper method that schedules an asynchronous read from the |
99 // |video_frame_stream_| as long as there isn't a pending read and we have | 99 // |video_frame_stream_| as long as there isn't a pending read and we have |
100 // capacity. | 100 // capacity. |
101 void AttemptRead(); | 101 void AttemptRead(); |
102 void AttemptRead_Locked(); | 102 void AttemptRead_Locked(); |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 // either for calling |paint_cb_| or for dropping. Set to kNoTimestamp() | 235 // either for calling |paint_cb_| or for dropping. Set to kNoTimestamp() |
236 // during flushing. | 236 // during flushing. |
237 base::TimeDelta last_timestamp_; | 237 base::TimeDelta last_timestamp_; |
238 | 238 |
239 DISALLOW_COPY_AND_ASSIGN(VideoRendererBase); | 239 DISALLOW_COPY_AND_ASSIGN(VideoRendererBase); |
240 }; | 240 }; |
241 | 241 |
242 } // namespace media | 242 } // namespace media |
243 | 243 |
244 #endif // MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_ | 244 #endif // MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_ |
OLD | NEW |