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

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

Issue 18580008: Rename VideoDecoder::HasOutputFrameAvailable() to CanReadWithoutStalling(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: name change and drop disabled (invalid) test Created 7 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 | Annotate | Revision Log
« no previous file with comments | « media/filters/gpu_video_decoder.h ('k') | media/filters/video_frame_stream.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) 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 #include "media/filters/gpu_video_decoder.h" 5 #include "media/filters/gpu_video_decoder.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/cpu.h" 9 #include "base/cpu.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 bool GpuVideoDecoder::HasAlpha() const { 473 bool GpuVideoDecoder::HasAlpha() const {
474 DCHECK(gvd_loop_proxy_->BelongsToCurrentThread()); 474 DCHECK(gvd_loop_proxy_->BelongsToCurrentThread());
475 return true; 475 return true;
476 } 476 }
477 477
478 bool GpuVideoDecoder::NeedsBitstreamConversion() const { 478 bool GpuVideoDecoder::NeedsBitstreamConversion() const {
479 DCHECK(gvd_loop_proxy_->BelongsToCurrentThread()); 479 DCHECK(gvd_loop_proxy_->BelongsToCurrentThread());
480 return needs_bitstream_conversion_; 480 return needs_bitstream_conversion_;
481 } 481 }
482 482
483 bool GpuVideoDecoder::HasOutputFrameAvailable() const { 483 bool GpuVideoDecoder::CanReadWithoutStalling() const {
484 DCHECK(gvd_loop_proxy_->BelongsToCurrentThread()); 484 DCHECK(gvd_loop_proxy_->BelongsToCurrentThread());
485 return available_pictures_ > 0; 485 return available_pictures_ > 0 || !ready_video_frames_.empty();
486 } 486 }
487 487
488 void GpuVideoDecoder::NotifyInitializeDone() { 488 void GpuVideoDecoder::NotifyInitializeDone() {
489 NOTREACHED() << "GpuVideoDecodeAcceleratorHost::Initialize is synchronous!"; 489 NOTREACHED() << "GpuVideoDecodeAcceleratorHost::Initialize is synchronous!";
490 } 490 }
491 491
492 void GpuVideoDecoder::ProvidePictureBuffers(uint32 count, 492 void GpuVideoDecoder::ProvidePictureBuffers(uint32 count,
493 const gfx::Size& size, 493 const gfx::Size& size,
494 uint32 texture_target) { 494 uint32 texture_target) {
495 DCHECK(gvd_loop_proxy_->BelongsToCurrentThread()); 495 DCHECK(gvd_loop_proxy_->BelongsToCurrentThread());
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 768
769 state_ = kError; 769 state_ = kError;
770 770
771 if (!pending_read_cb_.is_null()) { 771 if (!pending_read_cb_.is_null()) {
772 base::ResetAndReturn(&pending_read_cb_).Run(kDecodeError, NULL); 772 base::ResetAndReturn(&pending_read_cb_).Run(kDecodeError, NULL);
773 return; 773 return;
774 } 774 }
775 } 775 }
776 776
777 } // namespace media 777 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/gpu_video_decoder.h ('k') | media/filters/video_frame_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698