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

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

Issue 5741001: Even more virtual method deinlining. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase (windows) Created 10 years 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_renderer_base.h ('k') | net/base/host_resolver_impl.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "base/callback.h" 5 #include "base/callback.h"
6 #include "media/base/buffers.h" 6 #include "media/base/buffers.h"
7 #include "media/base/callback.h" 7 #include "media/base/callback.h"
8 #include "media/base/filter_host.h" 8 #include "media/base/filter_host.h"
9 #include "media/base/limits.h" 9 #include "media/base/limits.h"
10 #include "media/base/video_frame.h" 10 #include "media/base/video_frame.h"
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 if ((seek_callback_.get())) { 423 if ((seek_callback_.get())) {
424 seek_callback_->Run(); 424 seek_callback_->Run();
425 seek_callback_.reset(); 425 seek_callback_.reset();
426 } 426 }
427 } 427 }
428 } else if (state_ == kFlushing && pending_reads_ == 0 && !pending_paint_) { 428 } else if (state_ == kFlushing && pending_reads_ == 0 && !pending_paint_) {
429 OnFlushDone(); 429 OnFlushDone();
430 } 430 }
431 } 431 }
432 432
433 VideoDecoder* VideoRendererBase::GetDecoder() {
434 return decoder_.get();
435 }
436
433 void VideoRendererBase::ReadInput(scoped_refptr<VideoFrame> frame) { 437 void VideoRendererBase::ReadInput(scoped_refptr<VideoFrame> frame) {
434 // We should never return empty frames or EOS frame. 438 // We should never return empty frames or EOS frame.
435 DCHECK(frame.get() && !frame->IsEndOfStream()); 439 DCHECK(frame.get() && !frame->IsEndOfStream());
436 440
437 decoder_->ProduceVideoFrame(frame); 441 decoder_->ProduceVideoFrame(frame);
438 ++pending_reads_; 442 ++pending_reads_;
439 } 443 }
440 444
441 void VideoRendererBase::ScheduleRead_Locked() { 445 void VideoRendererBase::ScheduleRead_Locked() {
442 lock_.AssertAcquired(); 446 lock_.AssertAcquired();
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 previous_time_ = now; 521 previous_time_ = now;
518 } 522 }
519 523
520 // Scale our sleep based on the playback rate. 524 // Scale our sleep based on the playback rate.
521 // TODO(scherkus): floating point badness and degrade gracefully. 525 // TODO(scherkus): floating point badness and degrade gracefully.
522 return base::TimeDelta::FromMicroseconds( 526 return base::TimeDelta::FromMicroseconds(
523 static_cast<int64>(sleep.InMicroseconds() / playback_rate)); 527 static_cast<int64>(sleep.InMicroseconds() / playback_rate));
524 } 528 }
525 529
526 } // namespace media 530 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/video_renderer_base.h ('k') | net/base/host_resolver_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698