Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(931)

Unified Diff: content/common/gpu/media/gpu_video_decode_accelerator.cc

Issue 795633005: Add VDA supported profile to GPUInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address patch set 13 review comments Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..4ccca46a3bdd881f39640669b124850ef88b5b6d 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,29 @@ GpuVideoDecodeAccelerator::CreateAndroidVDA() {
return decoder.Pass();
}
+// static
+std::vector<gpu::VideoDecodeAcceleratorSupportedProfile>
+GpuVideoDecodeAccelerator::GetSupportedProfiles(bool* support_query_profile) {
+ std::vector<media::VideoDecodeAccelerator::SupportedProfile> profiles;
+ std::vector<media::VideoDecodeAccelerator::SupportedProfile> vda_profiles;
wuchengli 2015/03/18 08:02:37 Move this inside #if defined(OS_CHROMEOS)
henryhsu 2015/03/18 11:06:09 Done.
+#if defined(OS_CHROMEOS)
+ *support_query_profile = true;
+#if defined(USE_V4L2_CODEC)
+ vda_profiles = V4L2VideoDecodeAccelerator::GetSupportedProfiles();
+ profiles.insert(profiles.end(), vda_profiles.begin(), vda_profiles.end());
+ vda_profiles = V4L2SliceVideoDecodeAccelerator::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
+ *support_query_profile = false;
+#endif // defined(OS_CHROMEOS)
wuchengli 2015/03/18 08:02:37 This looks as if line 411 is OS_CHROMEOS. How abou
henryhsu 2015/03/18 11:06:09 Done.
+ return GpuVideoAcceleratorUtil::ConvertMediaToGpuDecodeProfiles(profiles);
+}
+
// Runs on IO thread if video_decode_accelerator_->CanDecodeOnIOThread() is
// true, otherwise on the main thread.
void GpuVideoDecodeAccelerator::OnDecode(

Powered by Google App Engine
This is Rietveld 408576698