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

Unified Diff: media/base/mime_util_unittest.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/mime_util_unittest.cc
diff --git a/media/base/mime_util_unittest.cc b/media/base/mime_util_unittest.cc
index dd226f6320a550233ad5a337ad554d07062a3c62..0edf1cda15a8a5ecc4cceffe93aebff9217dad81 100644
--- a/media/base/mime_util_unittest.cc
+++ b/media/base/mime_util_unittest.cc
@@ -117,6 +117,14 @@ static bool HasHevcSupport() {
#endif // BUILDFLAG(ENABLE_HEVC_DEMUXING)
}
+static bool HasEac3Support() {
+#if BUILDFLAG(ENABLE_AC3_EAC3_AUDIO_DEMUXING)
+ return true;
+#else
+ return false;
+#endif
+}
+
TEST(MimeUtilTest, CommonMediaMimeType) {
EXPECT_TRUE(IsSupportedMediaMimeType("audio/webm"));
EXPECT_TRUE(IsSupportedMediaMimeType("video/webm"));
@@ -252,8 +260,6 @@ TEST(IsCodecSupportedOnPlatformTest, EncryptedCodecBehavior) {
switch (codec) {
// These codecs are never supported by the Android platform.
case MimeUtil::INVALID_CODEC:
- case MimeUtil::AC3:
- case MimeUtil::EAC3:
case MimeUtil::MPEG2_AAC:
case MimeUtil::THEORA:
EXPECT_FALSE(result);
@@ -285,6 +291,11 @@ TEST(IsCodecSupportedOnPlatformTest, EncryptedCodecBehavior) {
case MimeUtil::HEVC:
EXPECT_EQ(HasHevcSupport(), result);
break;
+
+ case MimeUtil::AC3:
+ case MimeUtil::EAC3:
+ EXPECT_EQ(HasEac3Support(), result);
+ break;
}
});
}
@@ -306,8 +317,6 @@ TEST(IsCodecSupportedOnPlatformTest, ClearCodecBehaviorWithAndroidPipeline) {
switch (codec) {
// These codecs are never supported by the Android platform.
case MimeUtil::INVALID_CODEC:
- case MimeUtil::AC3:
- case MimeUtil::EAC3:
case MimeUtil::MPEG2_AAC:
case MimeUtil::THEORA:
EXPECT_FALSE(result);
@@ -336,6 +345,11 @@ TEST(IsCodecSupportedOnPlatformTest, ClearCodecBehaviorWithAndroidPipeline) {
case MimeUtil::HEVC:
EXPECT_EQ(HasHevcSupport(), result);
break;
+
+ case MimeUtil::AC3:
+ case MimeUtil::EAC3:
+ EXPECT_EQ(HasEac3Support(), result);
+ break;
}
});
@@ -367,8 +381,6 @@ TEST(IsCodecSupportedOnPlatformTest, ClearCodecBehaviorWithUnifiedPipeline) {
switch (codec) {
// These codecs are never supported by the Android platform.
case MimeUtil::INVALID_CODEC:
- case MimeUtil::AC3:
- case MimeUtil::EAC3:
case MimeUtil::THEORA:
EXPECT_FALSE(result);
break;
@@ -393,6 +405,11 @@ TEST(IsCodecSupportedOnPlatformTest, ClearCodecBehaviorWithUnifiedPipeline) {
case MimeUtil::HEVC:
EXPECT_EQ(HasHevcSupport() && info.has_platform_decoders, result);
break;
+
+ case MimeUtil::AC3:
+ case MimeUtil::EAC3:
+ EXPECT_EQ(HasEac3Support(), result);
+ break;
}
});
}

Powered by Google App Engine
This is Rietveld 408576698