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

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: 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.h » ('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..45847f26e0eddb9bf9913957b05f3ea616e76219 100644
--- a/content/common/gpu/media/vaapi_video_encode_accelerator.cc
+++ b/content/common/gpu/media/vaapi_video_encode_accelerator.cc
@@ -106,26 +106,23 @@ struct VaapiVideoEncodeAccelerator::BitstreamBufferRef {
std::vector<media::VideoEncodeAccelerator::SupportedProfile>
VaapiVideoEncodeAccelerator::GetSupportedProfiles() {
- std::vector<SupportedProfile> profiles;
-
const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
if (cmd_line->HasSwitch(switches::kDisableVaapiAcceleratedVideoEncode))
- return profiles;
+ return std::vector<SupportedProfile>();
+
+ std::vector<media::VideoCodecProfile> codecs =
Pawel Osciak 2014/09/26 07:15:12 maybe: s/codecs/hw_profiles/ ?
wuchengli 2014/09/26 09:02:28 Done. The construction of VEA::SupportedProfiles
+ VaapiWrapper::GetSupportedProfiles(x_display_,
+ base::Bind(&ReportToUMA, VAAPI_ERROR));
- SupportedProfile profile;
- profile.profile = media::H264PROFILE_MAIN;
+ std::vector<media::VideoEncodeAccelerator::SupportedProfile> profiles;
+ media::VideoEncodeAccelerator::SupportedProfile profile;
profile.max_resolution.SetSize(1920, 1088);
kcwu 2014/09/26 07:50:45 Is this detectable?
Pawel Osciak 2014/09/26 07:52:27 No.
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 < codecs.size(); i++) {
+ profile.profile = codecs[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.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698