Chromium Code Reviews| 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..bc6e5f6b0f2adb67df5c8fcb715d857565c78e42 |
| --- /dev/null |
| +++ b/content/common/gpu/media/gpu_video_accelerator_util.h |
| @@ -0,0 +1,43 @@ |
| +// 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 and eliminate duplicate |
| + // profiles for decoder. |
|
wuchengli
2015/03/19 06:19:24
nit: s/for decoder//. Having decoder at the beginn
henryhsu
2015/03/19 10:00:32
Done.
|
| + 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 and eliminate duplicate |
| + // profiles for encoder. |
|
wuchengli
2015/03/19 06:19:24
s/for encoder//
henryhsu
2015/03/19 10:00:32
Done.
|
| + static std::vector<gpu::VideoEncodeAcceleratorSupportedProfile> |
| + ConvertMediaToGpuEncodeProfiles(const std::vector< |
| + media::VideoEncodeAccelerator::SupportedProfile>& media_profiles); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ACCELERATOR_UTIL_H_ |