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_
10 #include "gpu/config/gpu_info.h"
11 #include "media/video/video_decode_accelerator.h"
12 #include "media/video/video_encode_accelerator.h"
16 class GpuVideoAcceleratorUtil
{
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
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
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_