OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ACCELERATOR_UTIL_H_ |
| 6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ACCELERATOR_UTIL_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "gpu/config/gpu_info.h" |
| 11 #include "media/video/video_decode_accelerator.h" |
| 12 #include "media/video/video_encode_accelerator.h" |
| 13 |
| 14 namespace content { |
| 15 |
| 16 class GpuVideoAcceleratorUtil { |
| 17 public: |
| 18 // Convert decoder gpu profiles to media profiles. |
| 19 static std::vector<media::VideoDecodeAccelerator::SupportedProfile> |
| 20 ConvertGpuToMediaDecodeProfiles(const std::vector< |
| 21 gpu::VideoDecodeAcceleratorSupportedProfile>& gpu_profiles); |
| 22 |
| 23 // Convert decoder media profiles to gpu profiles. |
| 24 static std::vector<gpu::VideoDecodeAcceleratorSupportedProfile> |
| 25 ConvertMediaToGpuDecodeProfiles(const std::vector< |
| 26 media::VideoDecodeAccelerator::SupportedProfile>& media_profiles); |
| 27 |
| 28 // Convert encoder gpu profiles to media profiles. |
| 29 static std::vector<media::VideoEncodeAccelerator::SupportedProfile> |
| 30 ConvertGpuToMediaEncodeProfiles(const std::vector< |
| 31 gpu::VideoEncodeAcceleratorSupportedProfile>& gpu_profiles); |
| 32 |
| 33 // Convert encoder media profiles to gpu profiles. |
| 34 static std::vector<gpu::VideoEncodeAcceleratorSupportedProfile> |
| 35 ConvertMediaToGpuEncodeProfiles(const std::vector< |
| 36 media::VideoEncodeAccelerator::SupportedProfile>& media_profiles); |
| 37 |
| 38 // Insert decoder media profiles without duplicate. |
| 39 static void InsertUniqueDecodeProfiles( |
| 40 const std::vector<media::VideoDecodeAccelerator::SupportedProfile>& |
| 41 new_profiles, |
| 42 std::vector<media::VideoDecodeAccelerator::SupportedProfile>* |
| 43 media_profiles); |
| 44 |
| 45 // Insert encoder media profiles without duplicate. |
| 46 static void InsertUniqueEncodeProfiles( |
| 47 const std::vector<media::VideoEncodeAccelerator::SupportedProfile>& |
| 48 new_profiles, |
| 49 std::vector<media::VideoEncodeAccelerator::SupportedProfile>* |
| 50 media_profiles); |
| 51 }; |
| 52 |
| 53 } // namespace content |
| 54 |
| 55 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ACCELERATOR_UTIL_H_ |
OLD | NEW |