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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/cpu.h" | |
6 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
7 #include "base/logging.h" | 8 #include "base/logging.h" |
8 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
9 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
10 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
11 #include "base/synchronization/waitable_event.h" | 12 #include "base/synchronization/waitable_event.h" |
12 #include "base/threading/non_thread_safe.h" | 13 #include "base/threading/non_thread_safe.h" |
13 #include "content/common/gpu/gpu_channel.h" | 14 #include "content/common/gpu/gpu_channel.h" |
14 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h" | 15 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h" |
15 #include "media/base/bind_to_current_loop.h" | 16 #include "media/base/bind_to_current_loop.h" |
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
916 void VaapiVideoDecodeAccelerator::Destroy() { | 917 void VaapiVideoDecodeAccelerator::Destroy() { |
917 DCHECK_EQ(message_loop_, base::MessageLoop::current()); | 918 DCHECK_EQ(message_loop_, base::MessageLoop::current()); |
918 Cleanup(); | 919 Cleanup(); |
919 delete this; | 920 delete this; |
920 } | 921 } |
921 | 922 |
922 bool VaapiVideoDecodeAccelerator::CanDecodeOnIOThread() { | 923 bool VaapiVideoDecodeAccelerator::CanDecodeOnIOThread() { |
923 return false; | 924 return false; |
924 } | 925 } |
925 | 926 |
927 // static | |
928 media::VideoDecodeAccelerator::SupportedResolution | |
929 VaapiVideoDecodeAccelerator::GetSupportedResolution() { | |
930 media::VideoDecodeAccelerator::SupportedResolution resolution; | |
931 resolution.min.SetSize(16, 16); | |
932 base::CPU cpu; | |
933 // Ivy Bridge+ platforms can support more than 1920x1080. | |
934 if ((cpu.vendor_name() == "GenuineIntel") && cpu.model() >= 55) | |
piman
2015/01/05 21:45:22
NAK. Please pass this on the command line, or have
henryhsu
2015/01/13 05:40:44
We have many devices using VAAPI and VAAPI doesn't
| |
935 resolution.max.SetSize(4096, 2160); | |
936 else | |
937 resolution.max.SetSize(1920, 1088); | |
938 return resolution; | |
939 } | |
940 | |
926 } // namespace content | 941 } // namespace content |
OLD | NEW |