| Index: media/base/mime_util_internal.cc
|
| diff --git a/media/base/mime_util_internal.cc b/media/base/mime_util_internal.cc
|
| index a0ce3c4951698d5f3f101f1d0cb4f866b4ca7ac3..b6338d186df8305fb56cdf04d2f078588d9728cc 100644
|
| --- a/media/base/mime_util_internal.cc
|
| +++ b/media/base/mime_util_internal.cc
|
| @@ -231,42 +231,6 @@ static bool IsValidH264Level(uint8_t level_idc) {
|
| (level_idc >= 50 && level_idc <= 51));
|
| }
|
|
|
| -#if BUILDFLAG(ENABLE_HEVC_DEMUXING)
|
| -// ISO/IEC FDIS 14496-15 standard section E.3 describes the syntax of codec ids
|
| -// reserved for HEVC. According to that spec HEVC codec id must start with
|
| -// either "hev1." or "hvc1.". We don't yet support full parsing of HEVC codec
|
| -// ids, but since no other codec id starts with those string we'll just treat
|
| -// any string starting with "hev1." or "hvc1." as valid HEVC codec ids.
|
| -// crbug.com/482761
|
| -static bool ParseHEVCCodecID(const std::string& codec_id,
|
| - MimeUtil::Codec* codec,
|
| - bool* is_ambiguous) {
|
| - if (base::StartsWith(codec_id, "hev1.", base::CompareCase::SENSITIVE) ||
|
| - base::StartsWith(codec_id, "hvc1.", base::CompareCase::SENSITIVE)) {
|
| - *codec = MimeUtil::HEVC_MAIN;
|
| -
|
| - // TODO(servolk): Full HEVC codec id parsing is not implemented yet (see
|
| - // crbug.com/482761). So treat HEVC codec ids as ambiguous for now.
|
| - *is_ambiguous = true;
|
| -
|
| - // TODO(servolk): Most HEVC codec ids are treated as ambiguous (see above),
|
| - // but we need to recognize at least one valid unambiguous HEVC codec id,
|
| - // which is added into kMP4VideoCodecsExpression. We need it to be
|
| - // unambiguous to avoid DCHECK(!is_ambiguous) in InitializeMimeTypeMaps. We
|
| - // also use these in unit tests (see
|
| - // content/browser/media/media_canplaytype_browsertest.cc).
|
| - // Remove this workaround after crbug.com/482761 is fixed.
|
| - if (codec_id == "hev1.1.6.L93.B0" || codec_id == "hvc1.1.6.L93.B0") {
|
| - *is_ambiguous = false;
|
| - }
|
| -
|
| - return true;
|
| - }
|
| -
|
| - return false;
|
| -}
|
| -#endif
|
| -
|
| MimeUtil::MimeUtil() : allow_proprietary_codecs_(false) {
|
| #if defined(OS_ANDROID)
|
| platform_info_.is_unified_media_pipeline_enabled =
|
| @@ -509,7 +473,7 @@ bool MimeUtil::IsCodecSupportedOnPlatform(
|
| DCHECK(!is_encrypted || platform_info.has_platform_decoders);
|
| return true;
|
|
|
| - case HEVC_MAIN:
|
| + case HEVC:
|
| #if BUILDFLAG(ENABLE_HEVC_DEMUXING)
|
| if (platform_info.is_unified_media_pipeline_enabled &&
|
| !platform_info.has_platform_decoders) {
|
| @@ -566,15 +530,17 @@ bool MimeUtil::StringToCodec(const std::string& codec_id,
|
| // If |codec_id| is not in |string_to_codec_map_|, then we assume that it is
|
| // either H.264 or HEVC/H.265 codec ID because currently those are the only
|
| // ones that are not added to the |string_to_codec_map_| and require parsing.
|
| + VideoCodecProfile profile = VIDEO_CODEC_PROFILE_UNKNOWN;
|
| + uint8_t level_idc = 0;
|
|
|
| #if BUILDFLAG(ENABLE_HEVC_DEMUXING)
|
| - if (ParseHEVCCodecID(codec_id, codec, is_ambiguous)) {
|
| + if (ParseHEVCCodecId(codec_id, &profile, &level_idc)) {
|
| + *is_ambiguous = false;
|
| + *codec = MimeUtil::HEVC;
|
| return true;
|
| }
|
| #endif
|
|
|
| - VideoCodecProfile profile = VIDEO_CODEC_PROFILE_UNKNOWN;
|
| - uint8_t level_idc = 0;
|
| if (ParseAVCCodecId(codec_id, &profile, &level_idc)) {
|
| *codec = MimeUtil::H264;
|
| *is_ambiguous =
|
| @@ -616,7 +582,7 @@ bool MimeUtil::IsCodecProprietary(Codec codec) const {
|
| case MPEG4_AAC_SBR_v1:
|
| case MPEG4_AAC_SBR_PS_v2:
|
| case H264:
|
| - case HEVC_MAIN:
|
| + case HEVC:
|
| return true;
|
|
|
| case PCM:
|
|
|