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 <deque> | 5 #include <deque> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
9 #include "base/md5.h" | 9 #include "base/md5.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 } | 92 } |
93 | 93 |
94 class AudioDecoderTest : public testing::TestWithParam<DecoderTestData> { | 94 class AudioDecoderTest : public testing::TestWithParam<DecoderTestData> { |
95 public: | 95 public: |
96 AudioDecoderTest() | 96 AudioDecoderTest() |
97 : pending_decode_(false), | 97 : pending_decode_(false), |
98 pending_reset_(false), | 98 pending_reset_(false), |
99 last_decode_status_(AudioDecoder::kDecodeError) { | 99 last_decode_status_(AudioDecoder::kDecodeError) { |
100 switch (GetParam().decoder_type) { | 100 switch (GetParam().decoder_type) { |
101 case FFMPEG: | 101 case FFMPEG: |
102 decoder_.reset(new FFmpegAudioDecoder( | 102 decoder_.reset(new FFmpegAudioDecoder(message_loop_.task_runner(), |
103 message_loop_.task_runner(), LogCB())); | 103 new MediaLog())); |
104 break; | 104 break; |
105 case OPUS: | 105 case OPUS: |
106 decoder_.reset( | 106 decoder_.reset( |
107 new OpusAudioDecoder(message_loop_.task_runner())); | 107 new OpusAudioDecoder(message_loop_.task_runner())); |
108 break; | 108 break; |
109 } | 109 } |
110 } | 110 } |
111 | 111 |
112 virtual ~AudioDecoderTest() { | 112 virtual ~AudioDecoderTest() { |
113 EXPECT_FALSE(pending_decode_); | 113 EXPECT_FALSE(pending_decode_); |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 }; | 523 }; |
524 | 524 |
525 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderTest, | 525 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderTest, |
526 AudioDecoderTest, | 526 AudioDecoderTest, |
527 testing::ValuesIn(kFFmpegTests)); | 527 testing::ValuesIn(kFFmpegTests)); |
528 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderBehavioralTest, | 528 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderBehavioralTest, |
529 FFmpegAudioDecoderBehavioralTest, | 529 FFmpegAudioDecoderBehavioralTest, |
530 testing::ValuesIn(kFFmpegBehavioralTest)); | 530 testing::ValuesIn(kFFmpegBehavioralTest)); |
531 | 531 |
532 } // namespace media | 532 } // namespace media |
OLD | NEW |