Chromium Code Reviews| 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); |
| } |