Index: content/common/gpu/media/vaapi_wrapper.cc |
diff --git a/content/common/gpu/media/vaapi_wrapper.cc b/content/common/gpu/media/vaapi_wrapper.cc |
index 92d978453aff5f54f7907b843955f1c3e1d85d27..64f296fc77b04a21fc0ea13a889d2d53d5790e93 100644 |
--- a/content/common/gpu/media/vaapi_wrapper.cc |
+++ b/content/common/gpu/media/vaapi_wrapper.cc |
@@ -199,6 +199,31 @@ VaapiWrapper::GetSupportedEncodeProfiles() { |
return profiles; |
} |
+// static |
+std::vector<media::VideoDecodeAccelerator::SupportedProfile> |
+VaapiWrapper::GetSupportedDecodeProfiles() { |
wuchengli
2015/03/18 08:02:38
check switch::kDisableAcceleratedVideoDecode
henryhsu
2015/03/18 11:06:09
Done.
|
+ std::vector<media::VideoDecodeAccelerator::SupportedProfile> profiles; |
+ std::vector<ProfileInfo> decode_profile_infos = |
+ profile_infos_.Get().GetSupportedProfileInfosForCodecMode(kDecode); |
+ |
+ for (size_t i = 0; i < arraysize(kProfileMap); ++i) { |
+ VAProfile va_profile = ProfileToVAProfile(kProfileMap[i].profile, kDecode); |
+ if (va_profile == VAProfileNone) |
+ continue; |
+ for (const auto& profile_info : decode_profile_infos) { |
+ if (profile_info.va_profile == va_profile) { |
+ media::VideoDecodeAccelerator::SupportedProfile profile; |
+ profile.profile = kProfileMap[i].profile; |
+ profile.max_resolution = profile_info.max_resolution; |
+ profile.min_resolution.SetSize(16, 16); |
+ profiles.push_back(profile); |
+ break; |
+ } |
+ } |
+ } |
+ return profiles; |
+} |
+ |
void VaapiWrapper::TryToSetVADisplayAttributeToLocalGPU() { |
base::AutoLock auto_lock(va_lock_); |
VADisplayAttribute item = {VADisplayAttribRenderMode, |