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

Unified Diff: content/common/gpu/media/gpu_video_accelerator_util.h

Issue 795633005: Add VDA supported profile to GPUInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add GetSupportedProfile to all platforms 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_accelerator_util.h
diff --git a/content/common/gpu/media/gpu_video_accelerator_util.h b/content/common/gpu/media/gpu_video_accelerator_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..e664b1ff590010c1c0dd97d05e612329ff7147ec
--- /dev/null
+++ b/content/common/gpu/media/gpu_video_accelerator_util.h
@@ -0,0 +1,55 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ACCELERATOR_UTIL_H_
+#define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ACCELERATOR_UTIL_H_
+
+#include <vector>
+
+#include "gpu/config/gpu_info.h"
+#include "media/video/video_decode_accelerator.h"
+#include "media/video/video_encode_accelerator.h"
+
+namespace content {
+
+class GpuVideoAcceleratorUtil {
+ public:
+ // Convert decoder gpu profiles to media profiles.
+ static std::vector<media::VideoDecodeAccelerator::SupportedProfile>
+ ConvertGpuToMediaDecodeProfiles(const std::vector<
+ gpu::VideoDecodeAcceleratorSupportedProfile>& gpu_profiles);
+
+ // Convert decoder media profiles to gpu profiles.
+ static std::vector<gpu::VideoDecodeAcceleratorSupportedProfile>
+ ConvertMediaToGpuDecodeProfiles(const std::vector<
+ media::VideoDecodeAccelerator::SupportedProfile>& media_profiles);
+
+ // Convert encoder gpu profiles to media profiles.
+ static std::vector<media::VideoEncodeAccelerator::SupportedProfile>
+ ConvertGpuToMediaEncodeProfiles(const std::vector<
+ gpu::VideoEncodeAcceleratorSupportedProfile>& gpu_profiles);
+
+ // Convert encoder media profiles to gpu profiles.
+ static std::vector<gpu::VideoEncodeAcceleratorSupportedProfile>
+ ConvertMediaToGpuEncodeProfiles(const std::vector<
+ media::VideoEncodeAccelerator::SupportedProfile>& media_profiles);
+
+ // Insert decoder media profiles without duplicate.
+ static void InsertUniqueDecodeProfiles(
+ const std::vector<media::VideoDecodeAccelerator::SupportedProfile>&
+ new_profiles,
+ std::vector<media::VideoDecodeAccelerator::SupportedProfile>*
+ media_profiles);
+
+ // Insert encoder media profiles without duplicate.
+ static void InsertUniqueEncodeProfiles(
+ const std::vector<media::VideoEncodeAccelerator::SupportedProfile>&
+ new_profiles,
+ std::vector<media::VideoEncodeAccelerator::SupportedProfile>*
+ media_profiles);
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ACCELERATOR_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698