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; |
} |