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 <algorithm> | 5 #include <algorithm> |
6 #include <limits> | 6 #include <limits> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/numerics/safe_conversions.h" | 10 #include "base/numerics/safe_conversions.h" |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 bool VaapiH264Decoder::DecodePicture() { | 481 bool VaapiH264Decoder::DecodePicture() { |
482 DCHECK(curr_pic_.get()); | 482 DCHECK(curr_pic_.get()); |
483 | 483 |
484 DVLOG(4) << "Decoding POC " << curr_pic_->pic_order_cnt; | 484 DVLOG(4) << "Decoding POC " << curr_pic_->pic_order_cnt; |
485 DecodeSurface* dec_surface = DecodeSurfaceByPoC(curr_pic_->pic_order_cnt); | 485 DecodeSurface* dec_surface = DecodeSurfaceByPoC(curr_pic_->pic_order_cnt); |
486 if (!dec_surface) { | 486 if (!dec_surface) { |
487 DVLOG(1) << "Asked to decode an invalid POC " << curr_pic_->pic_order_cnt; | 487 DVLOG(1) << "Asked to decode an invalid POC " << curr_pic_->pic_order_cnt; |
488 return false; | 488 return false; |
489 } | 489 } |
490 | 490 |
491 if (!vaapi_wrapper_->DecodeAndDestroyPendingBuffers( | 491 if (!vaapi_wrapper_->ExecuteAndDestroyPendingBuffers( |
492 dec_surface->va_surface()->id())) { | 492 dec_surface->va_surface()->id())) { |
493 DVLOG(1) << "Failed decoding picture"; | 493 DVLOG(1) << "Failed decoding picture"; |
494 return false; | 494 return false; |
495 } | 495 } |
496 | 496 |
497 return true; | 497 return true; |
498 } | 498 } |
499 | 499 |
500 bool VaapiH264Decoder::InitCurrPicture(media::H264SliceHeader* slice_hdr) { | 500 bool VaapiH264Decoder::InitCurrPicture(media::H264SliceHeader* slice_hdr) { |
501 DCHECK(curr_pic_.get()); | 501 DCHECK(curr_pic_.get()); |
502 | 502 |
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1681 break; | 1681 break; |
1682 } | 1682 } |
1683 } | 1683 } |
1684 } | 1684 } |
1685 | 1685 |
1686 size_t VaapiH264Decoder::GetRequiredNumOfPictures() { | 1686 size_t VaapiH264Decoder::GetRequiredNumOfPictures() { |
1687 return dpb_.max_num_pics() + kPicsInPipeline; | 1687 return dpb_.max_num_pics() + kPicsInPipeline; |
1688 } | 1688 } |
1689 | 1689 |
1690 } // namespace content | 1690 } // namespace content |
OLD | NEW |