[Android WebView] Fix webview perf bot switchover to use org.chromium.webview_shell...
[chromium-blink-merge.git] / content / common / gpu / media / gpu_video_accelerator_util.h
blob28b11d13e6b39f706c3fdbabcaf40e3521f2c97f
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ACCELERATOR_UTIL_H_
6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ACCELERATOR_UTIL_H_
8 #include <vector>
10 #include "gpu/config/gpu_info.h"
11 #include "media/video/video_decode_accelerator.h"
12 #include "media/video/video_encode_accelerator.h"
14 namespace content {
16 class GpuVideoAcceleratorUtil {
17 public:
18 // Convert decoder gpu profiles to media profiles.
19 static media::VideoDecodeAccelerator::SupportedProfiles
20 ConvertGpuToMediaDecodeProfiles(const
21 gpu::VideoDecodeAcceleratorSupportedProfiles& gpu_profiles);
23 // Convert decoder media profiles to gpu profiles.
24 static gpu::VideoDecodeAcceleratorSupportedProfiles
25 ConvertMediaToGpuDecodeProfiles(const
26 media::VideoDecodeAccelerator::SupportedProfiles& media_profiles);
28 // Convert encoder gpu profiles to media profiles.
29 static media::VideoEncodeAccelerator::SupportedProfiles
30 ConvertGpuToMediaEncodeProfiles(const
31 gpu::VideoEncodeAcceleratorSupportedProfiles& gpu_profiles);
33 // Convert encoder media profiles to gpu profiles.
34 static gpu::VideoEncodeAcceleratorSupportedProfiles
35 ConvertMediaToGpuEncodeProfiles(const
36 media::VideoEncodeAccelerator::SupportedProfiles& media_profiles);
38 // Insert |new_profiles| into |media_profiles|, ensuring no duplicates are
39 // inserted.
40 static void InsertUniqueDecodeProfiles(
41 const media::VideoDecodeAccelerator::SupportedProfiles& new_profiles,
42 media::VideoDecodeAccelerator::SupportedProfiles* media_profiles);
44 // Insert |new_profiles| into |media_profiles|, ensuring no duplicates are
45 // inserted.
46 static void InsertUniqueEncodeProfiles(
47 const media::VideoEncodeAccelerator::SupportedProfiles& new_profiles,
48 media::VideoEncodeAccelerator::SupportedProfiles* media_profiles);
51 } // namespace content
53 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ACCELERATOR_UTIL_H_