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

Unified Diff: content/common/gpu/media/vaapi_wrapper.h

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
Index: content/common/gpu/media/vaapi_wrapper.h
diff --git a/content/common/gpu/media/vaapi_wrapper.h b/content/common/gpu/media/vaapi_wrapper.h
index f600cdfa1d17198d00f4fd67b4b59767ea60795e..dbd38bd0bcfc26e6b765a61d1ac5e481969d740e 100644
--- a/content/common/gpu/media/vaapi_wrapper.h
+++ b/content/common/gpu/media/vaapi_wrapper.h
@@ -50,6 +50,11 @@ class CONTENT_EXPORT VaapiWrapper {
Display* x_display,
const base::Closure& report_error_to_uma_cb);
+ // Return the supported encode profiles.
+ static std::vector<media::VideoCodecProfile> GetSupportedEncodeProfiles(
+ Display* x_display,
+ const base::Closure& report_error_to_uma_cb);
+
~VaapiWrapper();
// Create |num_surfaces| backing surfaces in driver for VASurfaces, each
@@ -140,8 +145,20 @@ class CONTENT_EXPORT VaapiWrapper {
bool Initialize(CodecMode mode,
media::VideoCodecProfile profile,
Display* x_display,
- const base::Closure& report_error__to_uma_cb);
+ const base::Closure& report_error_to_uma_cb);
void Deinitialize();
+ bool VaInitialize(Display* x_display,
+ const base::Closure& report_error_to_uma_cb);
+ bool GetSupportedVaProfiles(std::vector<VAProfile>* profiles);
+
+ // Return true if |profile| is supported with given VA profiles, entrypoint,
+ // and the required attributes. |va_profile| will be set to the corresponding
+ // VA profile.
+ bool IsProfileSupported(media::VideoCodecProfile profile,
+ const std::vector<VAProfile>& supported_profiles,
+ VAEntrypoint entrypoint,
+ const std::vector<VAConfigAttrib>& required_attribs,
+ VAProfile* va_profile);
// Execute pending job in hardware and destroy pending buffers. Return false
// if vaapi driver refuses to accept parameter or slice buffers submitted

Powered by Google App Engine
This is Rietveld 408576698