Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Unified Diff: content/common/gpu/client/gpu_video_encode_accelerator_host.cc

Issue 668633002: Duplicate VideoEncodeAccelerator::SupportedProfile in gpu_info.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/client/gpu_video_encode_accelerator_host.h ('k') | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/client/gpu_video_encode_accelerator_host.cc
diff --git a/content/common/gpu/client/gpu_video_encode_accelerator_host.cc b/content/common/gpu/client/gpu_video_encode_accelerator_host.cc
index c33e27078120b70cf04c53cc6d311716062075cd..fbdee71dcaafab8ede86144b515405a57b928a1e 100644
--- a/content/common/gpu/client/gpu_video_encode_accelerator_host.cc
+++ b/content/common/gpu/client/gpu_video_encode_accelerator_host.cc
@@ -74,7 +74,25 @@ GpuVideoEncodeAcceleratorHost::GetSupportedProfiles() {
DCHECK(CalledOnValidThread());
if (!channel_)
return std::vector<media::VideoEncodeAccelerator::SupportedProfile>();
- return channel_->gpu_info().video_encode_accelerator_supported_profiles;
+ return ConvertGpuToMediaProfiles(
+ channel_->gpu_info().video_encode_accelerator_supported_profiles);
+}
+
+std::vector<media::VideoEncodeAccelerator::SupportedProfile>
+GpuVideoEncodeAcceleratorHost::ConvertGpuToMediaProfiles(const std::vector<
+ gpu::VideoEncodeAcceleratorSupportedProfile>& gpu_profiles) {
+ std::vector<media::VideoEncodeAccelerator::SupportedProfile> profiles;
+ for (size_t i = 0; i < gpu_profiles.size(); i++) {
+ media::VideoEncodeAccelerator::SupportedProfile profile;
+ profile.profile =
+ static_cast<media::VideoCodecProfile>(gpu_profiles[i].profile);
piman 2014/10/22 20:46:31 Can you add a list of static_asserts that check th
+ profile.max_resolution = gpu_profiles[i].max_resolution;
+ profile.max_framerate_numerator = gpu_profiles[i].max_framerate_numerator;
+ profile.max_framerate_denominator =
+ gpu_profiles[i].max_framerate_denominator;
+ profiles.push_back(profile);
+ }
+ return profiles;
}
bool GpuVideoEncodeAcceleratorHost::Initialize(
« no previous file with comments | « content/common/gpu/client/gpu_video_encode_accelerator_host.h ('k') | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698