| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/common/gpu/media/gpu_video_accelerator_util.h" | 5 #include "content/common/gpu/media/gpu_video_accelerator_util.h" |
| 6 | 6 |
| 7 namespace content { | 7 namespace content { |
| 8 | 8 |
| 9 // Make sure the enum values of media::VideoCodecProfile and | 9 // Make sure the enum values of media::VideoCodecProfile and |
| 10 // gpu::VideoCodecProfile match. | 10 // gpu::VideoCodecProfile match. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 STATIC_ASSERT_ENUM_MATCH(H264PROFILE_HIGH444PREDICTIVEPROFILE); | 24 STATIC_ASSERT_ENUM_MATCH(H264PROFILE_HIGH444PREDICTIVEPROFILE); |
| 25 STATIC_ASSERT_ENUM_MATCH(H264PROFILE_SCALABLEBASELINE); | 25 STATIC_ASSERT_ENUM_MATCH(H264PROFILE_SCALABLEBASELINE); |
| 26 STATIC_ASSERT_ENUM_MATCH(H264PROFILE_SCALABLEHIGH); | 26 STATIC_ASSERT_ENUM_MATCH(H264PROFILE_SCALABLEHIGH); |
| 27 STATIC_ASSERT_ENUM_MATCH(H264PROFILE_STEREOHIGH); | 27 STATIC_ASSERT_ENUM_MATCH(H264PROFILE_STEREOHIGH); |
| 28 STATIC_ASSERT_ENUM_MATCH(H264PROFILE_MULTIVIEWHIGH); | 28 STATIC_ASSERT_ENUM_MATCH(H264PROFILE_MULTIVIEWHIGH); |
| 29 STATIC_ASSERT_ENUM_MATCH(VP8PROFILE_ANY); | 29 STATIC_ASSERT_ENUM_MATCH(VP8PROFILE_ANY); |
| 30 STATIC_ASSERT_ENUM_MATCH(VP9PROFILE_PROFILE0); | 30 STATIC_ASSERT_ENUM_MATCH(VP9PROFILE_PROFILE0); |
| 31 STATIC_ASSERT_ENUM_MATCH(VP9PROFILE_PROFILE1); | 31 STATIC_ASSERT_ENUM_MATCH(VP9PROFILE_PROFILE1); |
| 32 STATIC_ASSERT_ENUM_MATCH(VP9PROFILE_PROFILE2); | 32 STATIC_ASSERT_ENUM_MATCH(VP9PROFILE_PROFILE2); |
| 33 STATIC_ASSERT_ENUM_MATCH(VP9PROFILE_PROFILE3); | 33 STATIC_ASSERT_ENUM_MATCH(VP9PROFILE_PROFILE3); |
| 34 STATIC_ASSERT_ENUM_MATCH(HEVCPROFILE_MAIN); |
| 35 STATIC_ASSERT_ENUM_MATCH(HEVCPROFILE_MAIN10); |
| 36 STATIC_ASSERT_ENUM_MATCH(HEVCPROFILE_MAIN_STILL_PICTURE); |
| 34 STATIC_ASSERT_ENUM_MATCH(VIDEO_CODEC_PROFILE_MAX); | 37 STATIC_ASSERT_ENUM_MATCH(VIDEO_CODEC_PROFILE_MAX); |
| 35 | 38 |
| 36 // static | 39 // static |
| 37 media::VideoDecodeAccelerator::Capabilities | 40 media::VideoDecodeAccelerator::Capabilities |
| 38 GpuVideoAcceleratorUtil::ConvertGpuToMediaDecodeCapabilities( | 41 GpuVideoAcceleratorUtil::ConvertGpuToMediaDecodeCapabilities( |
| 39 const gpu::VideoDecodeAcceleratorCapabilities& gpu_capabilities) { | 42 const gpu::VideoDecodeAcceleratorCapabilities& gpu_capabilities) { |
| 40 media::VideoDecodeAccelerator::Capabilities capabilities; | 43 media::VideoDecodeAccelerator::Capabilities capabilities; |
| 41 capabilities.supported_profiles = | 44 capabilities.supported_profiles = |
| 42 ConvertGpuToMediaDecodeProfiles(gpu_capabilities.supported_profiles); | 45 ConvertGpuToMediaDecodeProfiles(gpu_capabilities.supported_profiles); |
| 43 capabilities.flags = gpu_capabilities.flags; | 46 capabilities.flags = gpu_capabilities.flags; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 duplicate = true; | 154 duplicate = true; |
| 152 break; | 155 break; |
| 153 } | 156 } |
| 154 } | 157 } |
| 155 if (!duplicate) | 158 if (!duplicate) |
| 156 media_profiles->push_back(profile); | 159 media_profiles->push_back(profile); |
| 157 } | 160 } |
| 158 } | 161 } |
| 159 | 162 |
| 160 } // namespace content | 163 } // namespace content |
| OLD | NEW |