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

Unified Diff: media/filters/decrypting_audio_decoder_unittest.cc

Issue 11280301: Roll FFMpeg for M26. Fix ffmpeg float audio decoding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix AFR. Created 8 years 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/decrypting_audio_decoder_unittest.cc
diff --git a/media/filters/decrypting_audio_decoder_unittest.cc b/media/filters/decrypting_audio_decoder_unittest.cc
index b4c2a7ba6f2cbbe2bc37b494eb14c8d01650fe12..c3a2ea362933bf62673f73909a21ff9ab8862745 100644
--- a/media/filters/decrypting_audio_decoder_unittest.cc
+++ b/media/filters/decrypting_audio_decoder_unittest.cc
@@ -108,13 +108,13 @@ class DecryptingAudioDecoderTest : public testing::Test {
EXPECT_CALL(*decryptor_, RegisterKeyAddedCB(Decryptor::kAudio, _))
.WillOnce(SaveArg<1>(&key_added_cb_));
- AudioDecoderConfig config(kCodecVorbis, 16, CHANNEL_LAYOUT_STEREO, 44100,
- NULL, 0, true);
+ AudioDecoderConfig config(kCodecVorbis, 32, CHANNEL_LAYOUT_STEREO, 44100,
+ NULL, 0, kSampleFormatFLTP, true);
InitializeAndExpectStatus(config, PIPELINE_OK);
- EXPECT_EQ(16, decoder_->bits_per_channel());
- EXPECT_EQ(CHANNEL_LAYOUT_STEREO, decoder_->channel_layout());
- EXPECT_EQ(44100, decoder_->samples_per_second());
+ EXPECT_EQ(config.bits_per_channel(), decoder_->bits_per_channel());
+ EXPECT_EQ(config.channel_layout(), decoder_->channel_layout());
+ EXPECT_EQ(config.samples_per_second(), decoder_->samples_per_second());
}
void ReadAndExpectFrameReadyWith(
@@ -244,8 +244,8 @@ TEST_F(DecryptingAudioDecoderTest, Initialize_Normal) {
// Ensure that DecryptingAudioDecoder only accepts encrypted audio.
TEST_F(DecryptingAudioDecoderTest, Initialize_UnencryptedAudioConfig) {
- AudioDecoderConfig config(kCodecVorbis, 16, CHANNEL_LAYOUT_STEREO, 44100,
- NULL, 0, false);
+ AudioDecoderConfig config(kCodecVorbis, 32, CHANNEL_LAYOUT_STEREO, 44100,
+ NULL, 0, kSampleFormatFLTP, false);
InitializeAndExpectStatus(config, DECODER_ERROR_NOT_SUPPORTED);
}
@@ -253,7 +253,7 @@ TEST_F(DecryptingAudioDecoderTest, Initialize_UnencryptedAudioConfig) {
// Ensure decoder handles invalid audio configs without crashing.
TEST_F(DecryptingAudioDecoderTest, Initialize_InvalidAudioConfig) {
AudioDecoderConfig config(kUnknownAudioCodec, 0, CHANNEL_LAYOUT_STEREO, 0,
- NULL, 0, true);
+ NULL, 0, kUnknownSampleFormat, true);
InitializeAndExpectStatus(config, PIPELINE_ERROR_DECODE);
}
@@ -265,8 +265,8 @@ TEST_F(DecryptingAudioDecoderTest, Initialize_UnsupportedAudioConfig) {
EXPECT_CALL(*this, RequestDecryptorNotification(_))
.WillOnce(RunCallbackIfNotNull(decryptor_.get()));
- AudioDecoderConfig config(kCodecVorbis, 16, CHANNEL_LAYOUT_STEREO, 44100,
- NULL, 0, true);
+ AudioDecoderConfig config(kCodecVorbis, 32, CHANNEL_LAYOUT_STEREO, 44100,
+ NULL, 0, kSampleFormatFLTP, true);
InitializeAndExpectStatus(config, DECODER_ERROR_NOT_SUPPORTED);
}

Powered by Google App Engine
This is Rietveld 408576698