Chromium Code Reviews| Index: content/common/gpu/media/gpu_video_decode_accelerator.cc |
| diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc |
| index fde81acaa4f86cdf09d080032316db55ac24bc46..3a753373c3bcc5e91fb91415e0c0757ab39251cd 100644 |
| --- a/content/common/gpu/media/gpu_video_decode_accelerator.cc |
| +++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc |
| @@ -15,6 +15,7 @@ |
| #include "content/common/gpu/gpu_channel.h" |
| #include "content/common/gpu/gpu_messages.h" |
| +#include "content/common/gpu/media/gpu_video_accelerator_util.h" |
| #include "content/public/common/content_switches.h" |
| #include "gpu/command_buffer/common/command_buffer.h" |
| #include "ipc/ipc_message_macros.h" |
| @@ -389,6 +390,31 @@ GpuVideoDecodeAccelerator::CreateAndroidVDA() { |
| return decoder.Pass(); |
| } |
| +// static |
| +std::vector<gpu::VideoDecodeAcceleratorSupportedProfile> |
| +GpuVideoDecodeAccelerator::GetSupportedProfiles() { |
|
wuchengli
2015/03/16 03:30:10
You need to combine the supported profiles from di
henryhsu
2015/03/16 08:31:17
Done. ConvertMediaToGpuDecodeProfiles function als
|
| + std::vector<media::VideoDecodeAccelerator::SupportedProfile> profiles; |
| + std::vector<media::VideoDecodeAccelerator::SupportedProfile> vda_profiles; |
| +#if defined(OS_CHROMEOS) |
| +#if defined(USE_V4L2_CODEC) |
| + vda_profiles = V4L2VideoDecodeAccelerator::GetSupportedProfiles(); |
| + profiles.insert(profiles.end(), vda_profiles.begin(), vda_profiles.end()); |
| +#endif |
| +#if defined(ARCH_CPU_X86_FAMILY) |
| + vda_profiles = VaapiVideoDecodeAccelerator::GetSupportedProfiles(); |
| + profiles.insert(profiles.end(), vda_profiles.begin(), vda_profiles.end()); |
| +#endif |
| +#else |
| + media::VideoDecodeAccelerator::SupportedProfile profile; |
| + profile.profile = VIDEO_CODEC_PROFILE_UNKNOWN; |
| + profile.max_resolution.SetSize(0, 0); |
| + profile.min_resolution.SetSize(0, 0); |
| + profile.support_query_profile = false; |
| + profiles.push_back(profile); |
| +#endif // defined(OS_CHROMEOS) |
| + return GpuVideoAcceleratorUtil::ConvertMediaToGpuDecodeProfiles(profiles); |
| +} |
| + |
| // Runs on IO thread if video_decode_accelerator_->CanDecodeOnIOThread() is |
| // true, otherwise on the main thread. |
| void GpuVideoDecodeAccelerator::OnDecode( |