OLD | NEW |
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 <deque> | 5 #include <deque> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "media/base/decoder_buffer.h" | 10 #include "media/base/decoder_buffer.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 // Push in an EOS buffer. | 56 // Push in an EOS buffer. |
57 encoded_audio_.push_back(DecoderBuffer::CreateEOSBuffer()); | 57 encoded_audio_.push_back(DecoderBuffer::CreateEOSBuffer()); |
58 | 58 |
59 config_.Initialize(kCodecVorbis, | 59 config_.Initialize(kCodecVorbis, |
60 16, | 60 16, |
61 CHANNEL_LAYOUT_STEREO, | 61 CHANNEL_LAYOUT_STEREO, |
62 44100, | 62 44100, |
63 vorbis_extradata_->GetData(), | 63 vorbis_extradata_->GetData(), |
64 vorbis_extradata_->GetDataSize(), | 64 vorbis_extradata_->GetDataSize(), |
| 65 false, // Not encrypted. |
65 true); | 66 true); |
66 } | 67 } |
67 | 68 |
68 virtual ~FFmpegAudioDecoderTest() {} | 69 virtual ~FFmpegAudioDecoderTest() {} |
69 | 70 |
70 void Initialize() { | 71 void Initialize() { |
71 EXPECT_CALL(*demuxer_, audio_decoder_config()) | 72 EXPECT_CALL(*demuxer_, audio_decoder_config()) |
72 .WillRepeatedly(ReturnRef(config_)); | 73 .WillRepeatedly(ReturnRef(config_)); |
73 | 74 |
74 decoder_->Initialize(demuxer_, | 75 decoder_->Initialize(demuxer_, |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 172 |
172 EXPECT_CALL(*demuxer_, Read(_)) | 173 EXPECT_CALL(*demuxer_, Read(_)) |
173 .WillOnce(InvokeReadPacket(this)); | 174 .WillOnce(InvokeReadPacket(this)); |
174 Read(); | 175 Read(); |
175 | 176 |
176 EXPECT_EQ(decoded_audio_.size(), 1u); | 177 EXPECT_EQ(decoded_audio_.size(), 1u); |
177 EXPECT_TRUE(decoded_audio_[0].get() == NULL); | 178 EXPECT_TRUE(decoded_audio_[0].get() == NULL); |
178 } | 179 } |
179 | 180 |
180 } // namespace media | 181 } // namespace media |
OLD | NEW |