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

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

Issue 795633005: Add VDA supported profile to GPUInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add GetSupportedProfile to all platforms 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
Index: content/common/gpu/media/dxva_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/dxva_video_decode_accelerator.cc b/content/common/gpu/media/dxva_video_decode_accelerator.cc
index be50634283fa0f00806b7c69f5951f6889453eba..959828bdf576ba77bf22e38847e1b908d1a1f9ea 100644
--- a/content/common/gpu/media/dxva_video_decode_accelerator.cc
+++ b/content/common/gpu/media/dxva_video_decode_accelerator.cc
@@ -911,6 +911,31 @@ GLenum DXVAVideoDecodeAccelerator::GetSurfaceInternalFormat() const {
return GL_BGRA_EXT;
}
+// static
+std::vector<media::VideoDecodeAccelerator::SupportedProfile>
+DXVAVideoDecodeAccelerator::GetSupportedProfiles() {
wuchengli 2015/03/23 08:28:08 Add a TODO to say we need to make sure the profile
henryhsu 2015/03/23 10:06:35 Done.
+ // Supported media profiles should be synced with Initialize function.
wuchengli 2015/03/23 08:28:08 line 537 should also use |media_profiles| array to
henryhsu 2015/03/23 10:06:35 Done.
+ std::vector<media::VideoCodecProfile> media_profiles({
wuchengli 2015/03/23 08:28:08 Just use an array.
henryhsu 2015/03/23 10:06:35 Done.
+ media::H264PROFILE_BASELINE,
+ media::H264PROFILE_MAIN,
+ media::H264PROFILE_HIGH,
+ media::VP8PROFILE_ANY,
+ media::VP9PROFILE_ANY});
+ std::vector<media::VideoDecodeAccelerator::SupportedProfile> profiles;
+ for (const auto& media_profile : media_profiles) {
+ media::VideoDecodeAccelerator::SupportedProfile profile;
+ profile.profile = media_profile;
+ // Windows Media Foundation H.264 decoding does not support decoding videos
+ // with any dimension smaller than 48 pixels:
+ // http://msdn.microsoft.com/en-us/library/windows/desktop/dd797815
+ profile.min_resolution.SetSize(48, 48);
+ // Use 1088 to account for 16x16 macroblocks.
+ profile.max_resolution.SetSize(1920, 1088);
+ profiles.push_back(profile);
+ }
+ return profiles;
+}
+
bool DXVAVideoDecodeAccelerator::InitDecoder(media::VideoCodecProfile profile) {
HMODULE decoder_dll = NULL;

Powered by Google App Engine
This is Rietveld 408576698