Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(474)

Side by Side Diff: media/filters/video_renderer_base.h

Issue 10832087: Remove VideoDecoderConfig.frame_rate_xxx() & VideoFrame:Get/SetDuration() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address more CR comments. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/filters/video_frame_generator.cc ('k') | media/filters/video_renderer_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::DecoderStatus 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_|
90 void AddReadyFrame(const scoped_refptr<VideoFrame>& frame);
91
89 // 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
90 // as there isn't a pending read and we have capacity. 93 // as there isn't a pending read and we have capacity.
91 void AttemptRead_Locked(); 94 void AttemptRead_Locked();
92 95
93 // Called when the VideoDecoder Flush() completes. 96 // Called when the VideoDecoder Flush() completes.
94 void OnDecoderFlushDone(); 97 void OnDecoderFlushDone();
95 98
96 // Attempts to complete flushing and transition into the flushed state. 99 // Attempts to complete flushing and transition into the flushed state.
97 void AttemptFlush_Locked(); 100 void AttemptFlush_Locked();
98 101
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 StatisticsCB statistics_cb_; 210 StatisticsCB statistics_cb_;
208 TimeCB time_cb_; 211 TimeCB time_cb_;
209 NaturalSizeChangedCB size_changed_cb_; 212 NaturalSizeChangedCB size_changed_cb_;
210 base::Closure ended_cb_; 213 base::Closure ended_cb_;
211 PipelineStatusCB error_cb_; 214 PipelineStatusCB error_cb_;
212 TimeDeltaCB get_time_cb_; 215 TimeDeltaCB get_time_cb_;
213 TimeDeltaCB get_duration_cb_; 216 TimeDeltaCB get_duration_cb_;
214 217
215 base::TimeDelta preroll_timestamp_; 218 base::TimeDelta preroll_timestamp_;
216 219
220 // Delayed frame used during kPrerolling to determine whether
221 // |preroll_timestamp_| is between this frame and the next one.
222 scoped_refptr<VideoFrame> prerolling_delayed_frame_;
223
217 // Embedder callback for notifying a new frame is available for painting. 224 // Embedder callback for notifying a new frame is available for painting.
218 base::Closure paint_cb_; 225 base::Closure paint_cb_;
219 226
220 // Callback to execute to inform the player if the video decoder's output is 227 // Callback to execute to inform the player if the video decoder's output is
221 // opaque. 228 // opaque.
222 SetOpaqueCB set_opaque_cb_; 229 SetOpaqueCB set_opaque_cb_;
223 230
224 DISALLOW_COPY_AND_ASSIGN(VideoRendererBase); 231 DISALLOW_COPY_AND_ASSIGN(VideoRendererBase);
225 }; 232 };
226 233
227 } // namespace media 234 } // namespace media
228 235
229 #endif // MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_ 236 #endif // MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_
OLDNEW
« no previous file with comments | « media/filters/video_frame_generator.cc ('k') | media/filters/video_renderer_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698