Commit f5813c27 authored by ziyangch's avatar ziyangch Committed by Commit Bot

[Chromecast] Remove VP9.2/3 decoder check in IsCodecSupportedOnAndroid.

-VP9.2/3 decoder check has been moved into
 ContentRendererClient::IsSupportedVideoType ->IsDefaultSupportedVideoType
 -> IsVp9ProfileSupported

Bug: internal b/144324034

Test: Cast from Google Play Movie to Android TV and check the result of
VP9.2 query.

Change-Id: Idbfacd1feddcc6d65083c7c3d06778f8bbd0c569
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1927411Reviewed-by: default avatarChrome Cunningham <chcunningham@chromium.org>
Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Reviewed-by: default avatarJohn Rummell <jrummell@chromium.org>
Commit-Queue: Ziyang Cheng <ziyangch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#720724}
parent 6aaf6675
...@@ -145,10 +145,6 @@ MimeUtil::MimeUtil() { ...@@ -145,10 +145,6 @@ MimeUtil::MimeUtil() {
MediaCodecUtil::IsVp8DecoderAvailable(); MediaCodecUtil::IsVp8DecoderAvailable();
platform_info_.has_platform_vp9_decoder = platform_info_.has_platform_vp9_decoder =
MediaCodecUtil::IsVp9DecoderAvailable(); MediaCodecUtil::IsVp9DecoderAvailable();
platform_info_.has_platform_vp9_2_decoder =
MediaCodecUtil::IsVp9Profile2DecoderAvailable();
platform_info_.has_platform_vp9_3_decoder =
MediaCodecUtil::IsVp9Profile3DecoderAvailable();
#if BUILDFLAG(ENABLE_PLATFORM_HEVC) #if BUILDFLAG(ENABLE_PLATFORM_HEVC)
platform_info_.has_platform_hevc_decoder = platform_info_.has_platform_hevc_decoder =
MediaCodecUtil::IsHEVCDecoderAvailable(); MediaCodecUtil::IsHEVCDecoderAvailable();
...@@ -641,16 +637,6 @@ bool MimeUtil::IsCodecSupportedOnAndroid( ...@@ -641,16 +637,6 @@ bool MimeUtil::IsCodecSupportedOnAndroid(
if (!platform_info.has_platform_vp9_decoder) if (!platform_info.has_platform_vp9_decoder)
return false; return false;
if (video_profile == VP9PROFILE_PROFILE2 &&
!platform_info.has_platform_vp9_2_decoder) {
return false;
}
if (video_profile == VP9PROFILE_PROFILE3 &&
!platform_info.has_platform_vp9_3_decoder) {
return false;
}
return true; return true;
} }
......
...@@ -55,8 +55,6 @@ class MEDIA_EXPORT MimeUtil { ...@@ -55,8 +55,6 @@ class MEDIA_EXPORT MimeUtil {
bool has_platform_decoders = false; bool has_platform_decoders = false;
bool has_platform_vp8_decoder = false; bool has_platform_vp8_decoder = false;
bool has_platform_vp9_decoder = false; bool has_platform_vp9_decoder = false;
bool has_platform_vp9_2_decoder = false;
bool has_platform_vp9_3_decoder = false;
#if BUILDFLAG(ENABLE_PLATFORM_HEVC) #if BUILDFLAG(ENABLE_PLATFORM_HEVC)
bool has_platform_hevc_decoder = false; bool has_platform_hevc_decoder = false;
#endif #endif
......
...@@ -569,38 +569,6 @@ TEST(IsCodecSupportedOnAndroidTest, HEVCSupport) { ...@@ -569,38 +569,6 @@ TEST(IsCodecSupportedOnAndroidTest, HEVCSupport) {
} }
#endif #endif
TEST(IsCodecSupportedOnAndroidTest, Vp9Profile23Support) {
MimeUtil::PlatformInfo info;
info.has_platform_decoders = false;
info.has_platform_vp9_decoder = false;
info.has_platform_vp9_2_decoder = false;
info.has_platform_vp9_3_decoder = false;
EXPECT_FALSE(MimeUtil::IsCodecSupportedOnAndroid(
MimeUtil::VP9, kTestMimeType, false, VP9PROFILE_PROFILE2, info));
EXPECT_FALSE(MimeUtil::IsCodecSupportedOnAndroid(
MimeUtil::VP9, kTestMimeType, false, VP9PROFILE_PROFILE3, info));
info.has_platform_decoders = true;
info.has_platform_vp9_decoder = true;
EXPECT_FALSE(MimeUtil::IsCodecSupportedOnAndroid(
MimeUtil::VP9, kTestMimeType, false, VP9PROFILE_PROFILE2, info));
EXPECT_FALSE(MimeUtil::IsCodecSupportedOnAndroid(
MimeUtil::VP9, kTestMimeType, false, VP9PROFILE_PROFILE3, info));
info.has_platform_vp9_2_decoder = true;
EXPECT_TRUE(MimeUtil::IsCodecSupportedOnAndroid(
MimeUtil::VP9, kTestMimeType, false, VP9PROFILE_PROFILE2, info));
EXPECT_FALSE(MimeUtil::IsCodecSupportedOnAndroid(
MimeUtil::VP9, kTestMimeType, false, VP9PROFILE_PROFILE3, info));
info.has_platform_vp9_3_decoder = true;
EXPECT_TRUE(MimeUtil::IsCodecSupportedOnAndroid(
MimeUtil::VP9, kTestMimeType, false, VP9PROFILE_PROFILE2, info));
EXPECT_TRUE(MimeUtil::IsCodecSupportedOnAndroid(
MimeUtil::VP9, kTestMimeType, false, VP9PROFILE_PROFILE3, info));
}
TEST(IsCodecSupportedOnAndroidTest, AndroidHLSAAC) { TEST(IsCodecSupportedOnAndroidTest, AndroidHLSAAC) {
const std::string hls_mime_types[] = {"application/x-mpegurl", const std::string hls_mime_types[] = {"application/x-mpegurl",
"application/vnd.apple.mpegurl", "application/vnd.apple.mpegurl",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment