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

Unified Diff: media/filters/ffmpeg_demuxer_unittest.cc

Issue 812643005: Re-add AC3/EAC3 audio demuxing support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit tests Created 5 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
Index: media/filters/ffmpeg_demuxer_unittest.cc
diff --git a/media/filters/ffmpeg_demuxer_unittest.cc b/media/filters/ffmpeg_demuxer_unittest.cc
index b32718c0a3c35feb4e5098f7fe22f83ef061646c..56dcb417fb89d358fd72b257a3d5c6c81d638617 100644
--- a/media/filters/ffmpeg_demuxer_unittest.cc
+++ b/media/filters/ffmpeg_demuxer_unittest.cc
@@ -973,6 +973,38 @@ TEST_F(FFmpegDemuxerTest, Rotate_Metadata_270) {
ASSERT_EQ(VIDEO_ROTATION_270, stream->video_rotation());
}
+#if defined(ENABLE_AC3_EAC3_AUDIO_DEMUXING)
+TEST_F(FFmpegDemuxerTest, Read_AC3_Audio) {
+ CreateDemuxer("bear-ac3-frag.mp4");
+ InitializeDemuxer();
+
+ // Attempt a read from the audio stream and run the message loop until done.
+ DemuxerStream* audio = demuxer_->GetStream(DemuxerStream::AUDIO);
+
+ // Read the first two frames and check that we are getting expected data
+ audio->Read(NewReadCB(FROM_HERE, 834, 0, true));
+ message_loop_.Run();
+
+ audio->Read(NewReadCB(FROM_HERE, 836, 34830, true));
+ message_loop_.Run();
+}
+
+TEST_F(FFmpegDemuxerTest, Read_EAC3_Audio) {
+ CreateDemuxer("bear-eac3-frag.mp4");
+ InitializeDemuxer();
+
+ // Attempt a read from the audio stream and run the message loop until done.
+ DemuxerStream* audio = demuxer_->GetStream(DemuxerStream::AUDIO);
+
+ // Read the first two frames and check that we are getting expected data
+ audio->Read(NewReadCB(FROM_HERE, 870, 0, true));
+ message_loop_.Run();
+
+ audio->Read(NewReadCB(FROM_HERE, 872, 34830, true));
+ message_loop_.Run();
+}
+#endif
+
#endif
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698