| Index: content/common/gpu/media/gpu_video_encode_accelerator.cc
|
| diff --git a/content/common/gpu/media/gpu_video_encode_accelerator.cc b/content/common/gpu/media/gpu_video_encode_accelerator.cc
|
| index 1f4c395cb17a121747fc45d13009751b41125534..9f76e7180fc883cff6eaba334feea75e87a2e021 100644
|
| --- a/content/common/gpu/media/gpu_video_encode_accelerator.cc
|
| +++ b/content/common/gpu/media/gpu_video_encode_accelerator.cc
|
| @@ -163,18 +163,36 @@ void GpuVideoEncodeAccelerator::OnWillDestroyStub() {
|
| }
|
|
|
| // static
|
| -std::vector<media::VideoEncodeAccelerator::SupportedProfile>
|
| +std::vector<gpu::VideoEncodeAcceleratorSupportedProfile>
|
| GpuVideoEncodeAccelerator::GetSupportedProfiles() {
|
| #if defined(OS_CHROMEOS) && defined(USE_X11) && defined(ARCH_CPU_ARMEL)
|
| // This is a work-around for M39 because the video device is not ready at
|
| // boot.
|
| // TODO(wuchengli): remove this after http://crbug.com/418762 is fixed.
|
| - return V4L2VideoEncodeAccelerator::GetSupportedProfilesStatic();
|
| + return ConvertMediaToGpuProfiles(
|
| + V4L2VideoEncodeAccelerator::GetSupportedProfilesStatic());
|
| #endif
|
| scoped_ptr<media::VideoEncodeAccelerator> encoder = CreateEncoder();
|
| if (!encoder)
|
| - return std::vector<media::VideoEncodeAccelerator::SupportedProfile>();
|
| - return encoder->GetSupportedProfiles();
|
| + return std::vector<gpu::VideoEncodeAcceleratorSupportedProfile>();
|
| + return ConvertMediaToGpuProfiles(encoder->GetSupportedProfiles());
|
| +}
|
| +
|
| +std::vector<gpu::VideoEncodeAcceleratorSupportedProfile>
|
| +GpuVideoEncodeAccelerator::ConvertMediaToGpuProfiles(const std::vector<
|
| + media::VideoEncodeAccelerator::SupportedProfile>& media_profiles) {
|
| + std::vector<gpu::VideoEncodeAcceleratorSupportedProfile> profiles;
|
| + for (size_t i = 0; i < media_profiles.size(); i++) {
|
| + gpu::VideoEncodeAcceleratorSupportedProfile profile;
|
| + profile.profile =
|
| + static_cast<gpu::VideoCodecProfile>(media_profiles[i].profile);
|
| + profile.max_resolution = media_profiles[i].max_resolution;
|
| + profile.max_framerate_numerator = media_profiles[i].max_framerate_numerator;
|
| + profile.max_framerate_denominator =
|
| + media_profiles[i].max_framerate_denominator;
|
| + profiles.push_back(profile);
|
| + }
|
| + return profiles;
|
| }
|
|
|
| scoped_ptr<media::VideoEncodeAccelerator>
|
|
|