Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1080)

Unified Diff: media/base/mime_util_internal.cc

Issue 2640113004: Introduce Dolby Vision video codec and Demuxer support (Closed)
Patch Set: fix build break on Android Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/mime_util_internal.h ('k') | media/base/mime_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/mime_util_internal.cc
diff --git a/media/base/mime_util_internal.cc b/media/base/mime_util_internal.cc
index 2172a63ca365f04a8c3d43710779172b596868fb..5382e9fd78d821cec0bbda2b566f89fa04556340 100644
--- a/media/base/mime_util_internal.cc
+++ b/media/base/mime_util_internal.cc
@@ -140,6 +140,8 @@ VideoCodec MimeUtilToVideoCodec(MimeUtil::Codec codec) {
return kCodecVP9;
case MimeUtil::THEORA:
return kCodecTheora;
+ case MimeUtil::DOLBY_VISION:
+ return kCodecDolbyVision;
default:
break;
}
@@ -268,6 +270,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(DOLBY_VISION);
+#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)
@@ -536,6 +541,11 @@ bool MimeUtil::IsCodecSupportedOnAndroid(
// MediaPlayer only supports VP9 in WebM.
return mime_type_lower_case == "video/webm";
}
+
+ case DOLBY_VISION:
+ // This function is only called on Android which doesn't support Dolby
+ // Vision.
+ return false;
}
return false;
@@ -602,6 +612,13 @@ bool MimeUtil::ParseCodecString(const std::string& mime_type_lower_case,
}
#endif
+#if BUILDFLAG(ENABLE_DOLBY_VISION_DEMUXING)
+ if (ParseDolbyVisionCodecId(codec_id, out_profile, out_level)) {
+ *codec = MimeUtil::DOLBY_VISION;
+ return true;
+ }
+#endif
+
DVLOG(2) << __func__ << ": Unrecognized codec id " << codec_id;
return false;
}
@@ -703,6 +720,7 @@ bool MimeUtil::IsCodecProprietary(Codec codec) const {
case MPEG4_AAC:
case H264:
case HEVC:
+ case DOLBY_VISION:
return true;
case PCM:
« no previous file with comments | « media/base/mime_util_internal.h ('k') | media/base/mime_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698