| Index: media/base/mime_util_internal.cc
|
| diff --git a/media/base/mime_util_internal.cc b/media/base/mime_util_internal.cc
|
| index 7370198ec2419a0dd84f40d87a8139d0bfad2b40..a5345249cb24f750407e9986dc59910e5b8919ad 100644
|
| --- a/media/base/mime_util_internal.cc
|
| +++ b/media/base/mime_util_internal.cc
|
| @@ -151,6 +151,8 @@ VideoCodec MimeUtilToVideoCodec(MimeUtil::Codec codec) {
|
| return kCodecVP9;
|
| case MimeUtil::THEORA:
|
| return kCodecTheora;
|
| + case MimeUtil::DolbyVision:
|
| + return kCodecDolbyVision;
|
| default:
|
| break;
|
| }
|
| @@ -269,6 +271,9 @@ void MimeUtil::AddSupportedMediaFormats() {
|
| // Only VP9 with valid codec string vp09.xx.xx.xx.xx.xx.xx.xx is supported.
|
| // See ParseVp9CodecID for details.
|
| mp4_video_codecs.insert(VP9);
|
| +#if BUILDFLAG(ENABLE_DOLBY_VISION_DEMUXING)
|
| + mp4_video_codecs.insert(DolbyVision);
|
| +#endif // BUILDFLAG(ENABLE_DOLBY_VISION_DEMUXING)
|
| CodecSet mp4_codecs(mp4_audio_codecs);
|
| mp4_codecs.insert(mp4_video_codecs.begin(), mp4_video_codecs.end());
|
| #endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
|
| @@ -537,6 +542,11 @@ bool MimeUtil::IsCodecSupportedOnPlatform(
|
| // MediaPlayer only supports VP9 in WebM.
|
| return mime_type_lower_case == "video/webm";
|
| }
|
| +
|
| + case DolbyVision:
|
| + // This function is only called on Android which doesn't support Dolby
|
| + // Vision.
|
| + return false;
|
| }
|
|
|
| return false;
|
| @@ -618,6 +628,14 @@ bool MimeUtil::StringToCodec(const std::string& mime_type_lower_case,
|
| }
|
| #endif
|
|
|
| +#if BUILDFLAG(ENABLE_DOLBY_VISION_DEMUXING)
|
| + if (ParseDolbyVisionCodecId(codec_id, out_profile, out_level)) {
|
| + *codec = MimeUtil::DolbyVision;
|
| + *is_ambiguous = false;
|
| + return true;
|
| + }
|
| +#endif
|
| +
|
| DVLOG(4) << __func__ << ": Unrecognized codec id " << codec_id;
|
| return false;
|
| }
|
| @@ -647,6 +665,7 @@ bool MimeUtil::IsCodecProprietary(Codec codec) const {
|
| case MPEG4_AAC:
|
| case H264:
|
| case HEVC:
|
| + case DolbyVision:
|
| return true;
|
|
|
| case PCM:
|
|
|