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

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

Issue 872623002: VaapiVEA: Get maximum resolution from libva (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/media/va.sigs ('k') | content/common/gpu/media/vaapi_wrapper.h » ('j') | no next file with comments »
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 6bf0e3b68e57fcc279c79dd04f3429ca798b7a06..3475ec0f9fedd58ab9b194dbc1955b37387bca03 100644
--- a/content/common/gpu/media/vaapi_video_encode_accelerator.cc
+++ b/content/common/gpu/media/vaapi_video_encode_accelerator.cc
@@ -6,12 +6,10 @@
#include "base/bind.h"
#include "base/callback.h"
-#include "base/command_line.h"
#include "base/message_loop/message_loop_proxy.h"
#include "base/metrics/histogram.h"
#include "base/numerics/safe_conversions.h"
#include "content/common/gpu/media/h264_dpb.h"
-#include "content/public/common/content_switches.h"
#include "media/base/bind_to_current_loop.h"
#include "third_party/libva/va/va_enc_h264.h"
@@ -107,24 +105,8 @@ 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;
-
- std::vector<media::VideoCodecProfile> hw_profiles =
- VaapiWrapper::GetSupportedEncodeProfiles(base::Bind(&base::DoNothing));
-
- media::VideoEncodeAccelerator::SupportedProfile profile;
- profile.max_resolution.SetSize(1920, 1088);
- profile.max_framerate_numerator = kDefaultFramerate;
- profile.max_framerate_denominator = 1;
- for (size_t i = 0; i < hw_profiles.size(); i++) {
- profile.profile = hw_profiles[i];
- profiles.push_back(profile);
- }
- return profiles;
+
+ return VaapiWrapper::GetSupportedEncodeProfiles();
}
static unsigned int Log2OfPowerOf2(unsigned int x) {
« no previous file with comments | « content/common/gpu/media/va.sigs ('k') | content/common/gpu/media/vaapi_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698