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 "content/common/gpu/media/vaapi_video_decode_accelerator.h" | 5 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 VaapiVideoDecodeAccelerator::CreateSurface() { | 993 VaapiVideoDecodeAccelerator::CreateSurface() { |
994 DCHECK(decoder_thread_task_runner_->BelongsToCurrentThread()); | 994 DCHECK(decoder_thread_task_runner_->BelongsToCurrentThread()); |
995 base::AutoLock auto_lock(lock_); | 995 base::AutoLock auto_lock(lock_); |
996 | 996 |
997 if (available_va_surfaces_.empty()) | 997 if (available_va_surfaces_.empty()) |
998 return nullptr; | 998 return nullptr; |
999 | 999 |
1000 DCHECK(!awaiting_va_surfaces_recycle_); | 1000 DCHECK(!awaiting_va_surfaces_recycle_); |
1001 scoped_refptr<VASurface> va_surface( | 1001 scoped_refptr<VASurface> va_surface( |
1002 new VASurface(available_va_surfaces_.front(), requested_pic_size_, | 1002 new VASurface(available_va_surfaces_.front(), requested_pic_size_, |
1003 va_surface_release_cb_)); | 1003 VA_RT_FORMAT_YUV420, va_surface_release_cb_)); |
1004 available_va_surfaces_.pop_front(); | 1004 available_va_surfaces_.pop_front(); |
1005 | 1005 |
1006 scoped_refptr<VaapiDecodeSurface> dec_surface = | 1006 scoped_refptr<VaapiDecodeSurface> dec_surface = |
1007 new VaapiDecodeSurface(curr_input_buffer_->id, va_surface); | 1007 new VaapiDecodeSurface(curr_input_buffer_->id, va_surface); |
1008 | 1008 |
1009 return dec_surface; | 1009 return dec_surface; |
1010 } | 1010 } |
1011 | 1011 |
1012 VaapiVideoDecodeAccelerator::VaapiH264Accelerator::VaapiH264Accelerator( | 1012 VaapiVideoDecodeAccelerator::VaapiH264Accelerator::VaapiH264Accelerator( |
1013 VaapiVideoDecodeAccelerator* vaapi_dec, | 1013 VaapiVideoDecodeAccelerator* vaapi_dec, |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1731 return vaapi_pic->dec_surface(); | 1731 return vaapi_pic->dec_surface(); |
1732 } | 1732 } |
1733 | 1733 |
1734 // static | 1734 // static |
1735 media::VideoDecodeAccelerator::SupportedProfiles | 1735 media::VideoDecodeAccelerator::SupportedProfiles |
1736 VaapiVideoDecodeAccelerator::GetSupportedProfiles() { | 1736 VaapiVideoDecodeAccelerator::GetSupportedProfiles() { |
1737 return VaapiWrapper::GetSupportedDecodeProfiles(); | 1737 return VaapiWrapper::GetSupportedDecodeProfiles(); |
1738 } | 1738 } |
1739 | 1739 |
1740 } // namespace content | 1740 } // namespace content |
OLD | NEW |