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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // pause/flush/preroll. | 76 // pause/flush/preroll. |
77 void GetCurrentFrame(scoped_refptr<VideoFrame>* frame_out); | 77 void GetCurrentFrame(scoped_refptr<VideoFrame>* frame_out); |
78 void PutCurrentFrame(scoped_refptr<VideoFrame> frame); | 78 void PutCurrentFrame(scoped_refptr<VideoFrame> frame); |
79 | 79 |
80 protected: | 80 protected: |
81 virtual ~VideoRendererBase(); | 81 virtual ~VideoRendererBase(); |
82 | 82 |
83 private: | 83 private: |
84 // Callback from the video decoder delivering decoded video frames and | 84 // Callback from the video decoder delivering decoded video frames and |
85 // reporting video decoder status. | 85 // reporting video decoder status. |
86 void FrameReady(VideoDecoder::DecoderStatus status, | 86 void FrameReady(VideoDecoder::Status status, |
87 const scoped_refptr<VideoFrame>& frame); | 87 const scoped_refptr<VideoFrame>& frame); |
88 | 88 |
89 // Helper method for adding a frame to |ready_frames_| | 89 // Helper method for adding a frame to |ready_frames_| |
90 void AddReadyFrame(const scoped_refptr<VideoFrame>& frame); | 90 void AddReadyFrame(const scoped_refptr<VideoFrame>& frame); |
91 | 91 |
92 // Helper method that schedules an asynchronous read from the decoder as long | 92 // Helper method that schedules an asynchronous read from the decoder as long |
93 // as there isn't a pending read and we have capacity. | 93 // as there isn't a pending read and we have capacity. |
94 void AttemptRead_Locked(); | 94 void AttemptRead_Locked(); |
95 | 95 |
96 // Called when the VideoDecoder Flush() completes. | 96 // Called when the VideoDecoder Flush() completes. |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 | 231 |
232 // The last natural size |size_changed_cb_| was called with. | 232 // The last natural size |size_changed_cb_| was called with. |
233 gfx::Size last_natural_size_; | 233 gfx::Size last_natural_size_; |
234 | 234 |
235 DISALLOW_COPY_AND_ASSIGN(VideoRendererBase); | 235 DISALLOW_COPY_AND_ASSIGN(VideoRendererBase); |
236 }; | 236 }; |
237 | 237 |
238 } // namespace media | 238 } // namespace media |
239 | 239 |
240 #endif // MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_ | 240 #endif // MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_ |
OLD | NEW |