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

Unified Diff: content/common/gpu/media/vaapi_video_encode_accelerator.cc

Issue 603153002: vaapi: detect supported profiles in runtime. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix a comment Created 6 years, 3 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 | « no previous file | content/common/gpu/media/vaapi_wrapper.h » ('j') | content/common/gpu/media/vaapi_wrapper.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/vaapi_video_encode_accelerator.cc
diff --git a/content/common/gpu/media/vaapi_video_encode_accelerator.cc b/content/common/gpu/media/vaapi_video_encode_accelerator.cc
index 8cddcfb35054f7b69ac62d632aefe27358d6c090..08ba91e5fc5453f8f499b9737d3911faa2410ca9 100644
--- a/content/common/gpu/media/vaapi_video_encode_accelerator.cc
+++ b/content/common/gpu/media/vaapi_video_encode_accelerator.cc
@@ -112,20 +112,18 @@ VaapiVideoEncodeAccelerator::GetSupportedProfiles() {
if (cmd_line->HasSwitch(switches::kDisableVaapiAcceleratedVideoEncode))
return profiles;
- SupportedProfile profile;
- profile.profile = media::H264PROFILE_MAIN;
+ std::vector<media::VideoCodecProfile> hw_profiles =
+ VaapiWrapper::GetSupportedEncodeProfiles(
+ x_display_, base::Bind(&ReportToUMA, VAAPI_ERROR));
+
+ media::VideoEncodeAccelerator::SupportedProfile profile;
profile.max_resolution.SetSize(1920, 1088);
profile.max_framerate_numerator = kDefaultFramerate;
profile.max_framerate_denominator = 1;
- profiles.push_back(profile);
-
- // This is actually only constrained (see crbug.com/345569).
- profile.profile = media::H264PROFILE_BASELINE;
- profiles.push_back(profile);
-
- profile.profile = media::H264PROFILE_HIGH;
- profiles.push_back(profile);
-
+ for (size_t i = 0; i < hw_profiles.size(); i++) {
+ profile.profile = hw_profiles[i];
+ profiles.push_back(profile);
+ }
return profiles;
}
« no previous file with comments | « no previous file | content/common/gpu/media/vaapi_wrapper.h » ('j') | content/common/gpu/media/vaapi_wrapper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698