| 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 #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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |