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

Unified Diff: media/filters/ffmpeg_demuxer_unittest.cc

Issue 2515553002: Fix mimetype mappings for FLAC support. (Closed)
Patch Set: Comments. 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
« no previous file with comments | « media/filters/audio_decoder_unittest.cc ('k') | media/test/pipeline_integration_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_demuxer_unittest.cc
diff --git a/media/filters/ffmpeg_demuxer_unittest.cc b/media/filters/ffmpeg_demuxer_unittest.cc
index 8e2ad97c6f34559d3d2e167944e0819fe6349505..4225530af56ace84f41d510283508a68498d263f 100644
--- a/media/filters/ffmpeg_demuxer_unittest.cc
+++ b/media/filters/ffmpeg_demuxer_unittest.cc
@@ -1451,4 +1451,24 @@ TEST_F(FFmpegDemuxerTest, UTCDateToTime_Invalid) {
}
}
+TEST_F(FFmpegDemuxerTest, Read_Flac) {
+ CreateDemuxer("sfx.flac");
+ InitializeDemuxer();
+
+ // Video stream should not be present.
+ EXPECT_EQ(nullptr, demuxer_->GetStream(DemuxerStream::VIDEO));
+
+ // Audio stream should be present.
+ DemuxerStream* stream = demuxer_->GetStream(DemuxerStream::AUDIO);
+ ASSERT_TRUE(stream);
+ EXPECT_EQ(DemuxerStream::AUDIO, stream->type());
+
+ const AudioDecoderConfig& audio_config = stream->audio_decoder_config();
+ EXPECT_EQ(kCodecFLAC, audio_config.codec());
+ EXPECT_EQ(32, audio_config.bits_per_channel());
+ EXPECT_EQ(CHANNEL_LAYOUT_MONO, audio_config.channel_layout());
+ EXPECT_EQ(44100, audio_config.samples_per_second());
+ EXPECT_EQ(kSampleFormatS32, audio_config.sample_format());
+}
+
} // namespace media
« no previous file with comments | « media/filters/audio_decoder_unittest.cc ('k') | media/test/pipeline_integration_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698