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

Unified Diff: media/base/android/media_codec_util.cc

Issue 2466463005: Support (E)AC3 passthrough
Patch Set: Improve CastMediaClient::IsSupportedPassthroughAudio() Created 4 years, 1 month 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
Index: media/base/android/media_codec_util.cc
diff --git a/media/base/android/media_codec_util.cc b/media/base/android/media_codec_util.cc
index 467449f1262ead3a0438571bf52e55f9bb16a7db..205a79db97e1b673d851c6aeef01ab61ceb5bd5b 100644
--- a/media/base/android/media_codec_util.cc
+++ b/media/base/android/media_codec_util.cc
@@ -31,6 +31,8 @@ namespace {
const char kMp4aMimeType[] = "audio/mp4a-latm";
const char kOpusMimeType[] = "audio/opus";
const char kVorbisMimeType[] = "audio/vorbis";
+const char kAc3MimeType[] = "audio/ac3";
+const char kEac3MimeType[] = "audio/eac3";
const char kAvcMimeType[] = "video/avc";
const char kHevcMimeType[] = "video/hevc";
const char kVp8MimeType[] = "video/x-vnd.on2.vp8";
@@ -54,6 +56,11 @@ static std::string CodecTypeToAndroidMimeType(const std::string& codec) {
return kVorbisMimeType;
if (codec == "opus")
return kOpusMimeType;
+ if (codec == "ac3")
+ return kAc3MimeType;
+ if (codec == "eac3")
+ return kEac3MimeType;
+
DLOG(WARNING) << "Cannot convert codec to Android MIME type: " << codec;
return std::string();
}

Powered by Google App Engine
This is Rietveld 408576698