OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <deque> | 8 #include <deque> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 InitializeDecoder(config); | 167 InitializeDecoder(config); |
168 } | 168 } |
169 | 169 |
170 void InitializeDecoder(const AudioDecoderConfig& config) { | 170 void InitializeDecoder(const AudioDecoderConfig& config) { |
171 InitializeDecoderWithResult(config, true); | 171 InitializeDecoderWithResult(config, true); |
172 } | 172 } |
173 | 173 |
174 void InitializeDecoderWithResult(const AudioDecoderConfig& config, | 174 void InitializeDecoderWithResult(const AudioDecoderConfig& config, |
175 bool success) { | 175 bool success) { |
176 decoder_->Initialize( | 176 decoder_->Initialize( |
177 config, SetCdmReadyCB(), NewExpectedBoolCB(success), | 177 config, nullptr, NewExpectedBoolCB(success), |
178 base::Bind(&AudioDecoderTest::OnDecoderOutput, base::Unretained(this))); | 178 base::Bind(&AudioDecoderTest::OnDecoderOutput, base::Unretained(this))); |
179 base::RunLoop().RunUntilIdle(); | 179 base::RunLoop().RunUntilIdle(); |
180 } | 180 } |
181 | 181 |
182 void Decode() { | 182 void Decode() { |
183 AVPacket packet; | 183 AVPacket packet; |
184 ASSERT_TRUE(reader_->ReadPacketForTesting(&packet)); | 184 ASSERT_TRUE(reader_->ReadPacketForTesting(&packet)); |
185 | 185 |
186 // Split out packet metadata before making a copy. | 186 // Split out packet metadata before making a copy. |
187 av_packet_split_side_data(&packet); | 187 av_packet_split_side_data(&packet); |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 }; | 528 }; |
529 | 529 |
530 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderTest, | 530 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderTest, |
531 AudioDecoderTest, | 531 AudioDecoderTest, |
532 testing::ValuesIn(kFFmpegTests)); | 532 testing::ValuesIn(kFFmpegTests)); |
533 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderBehavioralTest, | 533 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderBehavioralTest, |
534 FFmpegAudioDecoderBehavioralTest, | 534 FFmpegAudioDecoderBehavioralTest, |
535 testing::ValuesIn(kFFmpegBehavioralTest)); | 535 testing::ValuesIn(kFFmpegBehavioralTest)); |
536 | 536 |
537 } // namespace media | 537 } // namespace media |
OLD | NEW |