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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <deque> 9 #include <deque>
10 #include <string> 10 #include <string>
(...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1444 }; 1444 };
1445 1445
1446 for (size_t i = 0; i < arraysize(invalid_date_strings); ++i) { 1446 for (size_t i = 0; i < arraysize(invalid_date_strings); ++i) {
1447 const char* date_string = invalid_date_strings[i]; 1447 const char* date_string = invalid_date_strings[i];
1448 base::Time result; 1448 base::Time result;
1449 EXPECT_FALSE(base::Time::FromUTCString(date_string, &result)) 1449 EXPECT_FALSE(base::Time::FromUTCString(date_string, &result))
1450 << "date_string '" << date_string << "'"; 1450 << "date_string '" << date_string << "'";
1451 } 1451 }
1452 } 1452 }
1453 1453
1454 TEST_F(FFmpegDemuxerTest, Read_Flac) {
1455 CreateDemuxer("sfx.flac");
1456 InitializeDemuxer();
1457
1458 // Video stream should not be present.
1459 EXPECT_EQ(nullptr, demuxer_->GetStream(DemuxerStream::VIDEO));
1460
1461 // Audio stream should be present.
1462 DemuxerStream* stream = demuxer_->GetStream(DemuxerStream::AUDIO);
1463 ASSERT_TRUE(stream);
1464 EXPECT_EQ(DemuxerStream::AUDIO, stream->type());
1465
1466 const AudioDecoderConfig& audio_config = stream->audio_decoder_config();
1467 EXPECT_EQ(kCodecFLAC, audio_config.codec());
1468 EXPECT_EQ(32, audio_config.bits_per_channel());
1469 EXPECT_EQ(CHANNEL_LAYOUT_MONO, audio_config.channel_layout());
1470 EXPECT_EQ(44100, audio_config.samples_per_second());
1471 EXPECT_EQ(kSampleFormatS32, audio_config.sample_format());
1472 }
1473
1454 } // namespace media 1474 } // namespace media
OLDNEW
« 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