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

Unified Diff: media/formats/mp4/mp4_stream_parser_unittest.cc

Issue 812643005: Re-add AC3/EAC3 audio demuxing support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: buildfix Created 4 years, 11 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/formats/mp4/mp4_stream_parser.cc ('k') | media/media.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/mp4/mp4_stream_parser_unittest.cc
diff --git a/media/formats/mp4/mp4_stream_parser_unittest.cc b/media/formats/mp4/mp4_stream_parser_unittest.cc
index 79f68c1fe2d3988fe1c1997832c9cd28c65aab18..eec9824614e08da0331ef9339e4d9c27d71582bc 100644
--- a/media/formats/mp4/mp4_stream_parser_unittest.cc
+++ b/media/formats/mp4/mp4_stream_parser_unittest.cc
@@ -22,6 +22,7 @@
#include "media/base/video_decoder_config.h"
#include "media/formats/mp4/es_descriptor.h"
#include "media/formats/mp4/mp4_stream_parser.h"
+#include "media/media_features.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -341,5 +342,27 @@ TEST_F(MP4StreamParserTest, NaturalSizeWithPASP) {
EXPECT_EQ(gfx::Size(639, 360), video_decoder_config_.natural_size());
}
+#if BUILDFLAG(ENABLE_AC3_EAC3_AUDIO_DEMUXING)
+TEST_F(MP4StreamParserTest, DemuxingAC3) {
+ std::set<int> audio_object_types;
+ audio_object_types.insert(kAC3);
+ parser_.reset(new MP4StreamParser(audio_object_types, false));
+ InitializeParserAndExpectLiveness(DemuxerStream::LIVENESS_RECORDED);
+ scoped_refptr<DecoderBuffer> buffer =
+ ReadTestDataFile("bear-ac3-only-frag.mp4");
+ EXPECT_TRUE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512));
+}
+
+TEST_F(MP4StreamParserTest, DemuxingEAC3) {
+ std::set<int> audio_object_types;
+ audio_object_types.insert(kEAC3);
+ parser_.reset(new MP4StreamParser(audio_object_types, false));
+ InitializeParserAndExpectLiveness(DemuxerStream::LIVENESS_RECORDED);
+ scoped_refptr<DecoderBuffer> buffer =
+ ReadTestDataFile("bear-eac3-only-frag.mp4");
+ EXPECT_TRUE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512));
+}
+#endif
+
} // namespace mp4
} // namespace media
« no previous file with comments | « media/formats/mp4/mp4_stream_parser.cc ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698