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

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

Issue 149215: Big media::Pipeline cleanup. (Closed)
Patch Set: Test Created 11 years, 5 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
« no previous file with comments | « media/base/pipeline_impl.cc ('k') | media/player/movie.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) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #include "media/base/buffers.h" 5 #include "media/base/buffers.h"
6 #include "media/base/filter_host.h" 6 #include "media/base/filter_host.h"
7 #include "media/filters/video_renderer_base.h" 7 #include "media/filters/video_renderer_base.h"
8 8
9 namespace media { 9 namespace media {
10 10
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 current_frame_ = frames_.front(); 181 current_frame_ = frames_.front();
182 if (frames_.size() >= 2) { 182 if (frames_.size() >= 2) {
183 next_frame = frames_[1]; 183 next_frame = frames_[1];
184 } 184 }
185 } 185 }
186 186
187 // Notify subclass that |current_frame_| has been updated. 187 // Notify subclass that |current_frame_| has been updated.
188 OnFrameAvailable(); 188 OnFrameAvailable();
189 189
190 // Determine the current and next presentation timestamps. 190 // Determine the current and next presentation timestamps.
191 base::TimeDelta now = host_->GetPipelineStatus()->GetTime(); 191 base::TimeDelta now = host_->GetTime();
192 base::TimeDelta this_pts = current_frame_->GetTimestamp(); 192 base::TimeDelta this_pts = current_frame_->GetTimestamp();
193 base::TimeDelta next_pts; 193 base::TimeDelta next_pts;
194 if (next_frame) { 194 if (next_frame) {
195 next_pts = next_frame->GetTimestamp(); 195 next_pts = next_frame->GetTimestamp();
196 } else { 196 } else {
197 next_pts = this_pts + current_frame_->GetDuration(); 197 next_pts = this_pts + current_frame_->GetDuration();
198 } 198 }
199 199
200 // Determine our sleep duration based on whether time advanced. 200 // Determine our sleep duration based on whether time advanced.
201 base::TimeDelta sleep; 201 base::TimeDelta sleep;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 if (state_ == STOPPED) { 272 if (state_ == STOPPED) {
273 return false; 273 return false;
274 } 274 }
275 } 275 }
276 DCHECK_EQ(state_, INITIALIZED); 276 DCHECK_EQ(state_, INITIALIZED);
277 DCHECK(current_frame_); 277 DCHECK(current_frame_);
278 return true; 278 return true;
279 } 279 }
280 280
281 } // namespace media 281 } // namespace media
OLDNEW
« no previous file with comments | « media/base/pipeline_impl.cc ('k') | media/player/movie.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698