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

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

Issue 1820553002: Expose encrypted_only attribute on VDA supported profiles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix logs. Created 4 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/android_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/android_video_decode_accelerator.cc b/content/common/gpu/media/android_video_decode_accelerator.cc
index 9eccdc65e0440ab49d2bdcb479e2e670382960ea..a6c82b531f29384e68209592cfff678f4c03db7a 100644
--- a/content/common/gpu/media/android_video_decode_accelerator.cc
+++ b/content/common/gpu/media/android_video_decode_accelerator.cc
@@ -317,15 +317,10 @@ bool AndroidVideoDecodeAccelerator::Initialize(const Config& config,
// Only use MediaCodec for VP8/9 if it's likely backed by hardware
// or if the stream is encrypted.
- if ((codec_ == media::kCodecVP8 || codec_ == media::kCodecVP9) &&
- !is_encrypted_) {
- if (media::VideoCodecBridge::IsKnownUnaccelerated(
- codec_, media::MEDIA_CODEC_DECODER)) {
- DVLOG(1) << "Initialization failed: "
- << (codec_ == media::kCodecVP8 ? "vp8" : "vp9")
- << " is not hardware accelerated";
- return false;
- }
+ if (codec_ == media::kCodecVP8 || codec_ == media::kCodecVP9) {
+ DCHECK(is_encrypted_ ||
+ !media::VideoCodecBridge::IsKnownUnaccelerated(
+ codec_, media::MEDIA_CODEC_DECODER));
}
if (!make_context_current_.Run()) {
@@ -1175,6 +1170,8 @@ AndroidVideoDecodeAccelerator::GetCapabilities() {
profile.profile = media::VP8PROFILE_ANY;
profile.min_resolution.SetSize(0, 0);
profile.max_resolution.SetSize(1920, 1088);
+ profile.encrypted_only = media::VideoCodecBridge::IsKnownUnaccelerated(
Ken Russell (switch to Gerrit) 2016/03/19 00:25:36 It's a little confusing to readers that the encryp
DaleCurtis 2016/03/19 00:29:06 Good point. Comment added explaining why this is t
+ media::kCodecVP8, media::MEDIA_CODEC_DECODER);
profiles.push_back(profile);
}
@@ -1182,6 +1179,8 @@ AndroidVideoDecodeAccelerator::GetCapabilities() {
profile.profile = media::VP9PROFILE_ANY;
profile.min_resolution.SetSize(0, 0);
profile.max_resolution.SetSize(1920, 1088);
+ profile.encrypted_only = media::VideoCodecBridge::IsKnownUnaccelerated(
+ media::kCodecVP9, media::MEDIA_CODEC_DECODER);
profiles.push_back(profile);
}
« no previous file with comments | « content/common/gpu/gpu_param_traits_macros.h ('k') | content/common/gpu/media/gpu_video_accelerator_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698