Chromium Code Reviews| Index: media/base/mime_util.cc |
| diff --git a/media/base/mime_util.cc b/media/base/mime_util.cc |
| index ff1d3369e1d6017a2274a0aeef4ef2d90f50d18f..d0af6747035acdb7b73a56992a084ca3f4dcc646 100644 |
| --- a/media/base/mime_util.cc |
| +++ b/media/base/mime_util.cc |
| @@ -14,6 +14,7 @@ |
| #include "base/strings/string_split.h" |
| #include "base/strings/string_util.h" |
| #include "build/build_config.h" |
| +#include "media/base/media.h" |
| #include "media/base/mime_util.h" |
| #include "media/media_features.h" |
| @@ -167,7 +168,8 @@ static bool IsCodecSupportedOnAndroid(MimeUtil::Codec codec) { |
| case MimeUtil::OPUS: |
| // Opus is supported only in Lollipop+ (API Level 21). |
| - return base::android::BuildInfo::GetInstance()->sdk_int() >= 21; |
| + return base::android::BuildInfo::GetInstance()->sdk_int() >= 21 || |
| + IsUnifiedMediaPipelineEnabled(); |
| case MimeUtil::HEVC_MAIN: |
| #if BUILDFLAG(ENABLE_HEVC_DEMUXING) |
| @@ -180,7 +182,8 @@ static bool IsCodecSupportedOnAndroid(MimeUtil::Codec codec) { |
| case MimeUtil::VP9: |
| // VP9 is supported only in KitKat+ (API Level 19). |
| - return base::android::BuildInfo::GetInstance()->sdk_int() >= 19; |
| + return base::android::BuildInfo::GetInstance()->sdk_int() >= 19 || |
| + IsUnifiedMediaPipelineEnabled(); |
| case MimeUtil::THEORA: |
| return false; |
| @@ -254,16 +257,11 @@ static const MediaFormat kFormatCodecMappings[] = { |
| {"audio/webm", COMMON, "opus,vorbis"}, |
| {"audio/wav", COMMON, "1"}, |
| {"audio/x-wav", COMMON, "1"}, |
| -#if defined(OS_ANDROID) |
| - // Android does not support Opus in Ogg container. |
| - // Android does not support Theora and thus video/ogg. |
| - {"audio/ogg", COMMON, "vorbis"}, |
| - {"application/ogg", COMMON, "vorbis"}, |
| -#else |
| + // Note: Theora is not supported on Android and will be rejected during the |
| + // call to IsCodecSupportedOnAndroid(). |
| {"video/ogg", COMMON, "opus,theora,vorbis"}, |
|
ddorwin
2016/02/11 21:08:24
Previously, "VIDEO/ogg" was not supported on Andro
DaleCurtis
2016/02/11 22:04:53
Ah, yeah I missed that, it seems that restriction
|
| {"audio/ogg", COMMON, "opus,vorbis"}, |
| {"application/ogg", COMMON, "opus,theora,vorbis"}, |
| -#endif |
| #if defined(USE_PROPRIETARY_CODECS) |
| {"audio/mpeg", PROPRIETARY, "mp3"}, |
| {"audio/mp3", PROPRIETARY, ""}, |