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

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: ... rebase Created 7 years, 12 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/filters/chunk_demuxer_unittest.cc ('k') | media/filters/decrypting_demuxer_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c8c0f0fb666c3a885d80473eda5496b5834eac28..efc68151050f28cc87d3234579ce3b9f79a916aa 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_, RegisterNewKeyCB(Decryptor::kAudio, _))
.WillOnce(SaveArg<1>(&key_added_cb_));
- AudioDecoderConfig config(kCodecVorbis, 16, CHANNEL_LAYOUT_STEREO, 44100,
- NULL, 0, true);
+ AudioDecoderConfig config(kCodecVorbis, kSampleFormatPlanarF32,
+ CHANNEL_LAYOUT_STEREO, 44100, NULL, 0, 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(
@@ -243,16 +243,16 @@ 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, kSampleFormatPlanarF32,
+ CHANNEL_LAYOUT_STEREO, 44100, NULL, 0, false);
InitializeAndExpectStatus(config, DECODER_ERROR_NOT_SUPPORTED);
}
// Ensure decoder handles invalid audio configs without crashing.
TEST_F(DecryptingAudioDecoderTest, Initialize_InvalidAudioConfig) {
- AudioDecoderConfig config(kUnknownAudioCodec, 0, CHANNEL_LAYOUT_STEREO, 0,
- NULL, 0, true);
+ AudioDecoderConfig config(kUnknownAudioCodec, kUnknownSampleFormat,
+ CHANNEL_LAYOUT_STEREO, 0, NULL, 0, true);
InitializeAndExpectStatus(config, PIPELINE_ERROR_DECODE);
}
@@ -264,8 +264,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, kSampleFormatPlanarF32,
+ CHANNEL_LAYOUT_STEREO, 44100, NULL, 0, true);
InitializeAndExpectStatus(config, DECODER_ERROR_NOT_SUPPORTED);
}
« no previous file with comments | « media/filters/chunk_demuxer_unittest.cc ('k') | media/filters/decrypting_demuxer_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698