| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 }; | 496 }; |
| 497 | 497 |
| 498 INSTANTIATE_TEST_CASE_P(OpusAudioDecoderTest, | 498 INSTANTIATE_TEST_CASE_P(OpusAudioDecoderTest, |
| 499 AudioDecoderTest, | 499 AudioDecoderTest, |
| 500 testing::ValuesIn(kOpusTests)); | 500 testing::ValuesIn(kOpusTests)); |
| 501 INSTANTIATE_TEST_CASE_P(OpusAudioDecoderBehavioralTest, | 501 INSTANTIATE_TEST_CASE_P(OpusAudioDecoderBehavioralTest, |
| 502 OpusAudioDecoderBehavioralTest, | 502 OpusAudioDecoderBehavioralTest, |
| 503 testing::ValuesIn(kOpusBehavioralTest)); | 503 testing::ValuesIn(kOpusBehavioralTest)); |
| 504 | 504 |
| 505 #if defined(OS_ANDROID) | 505 #if defined(OS_ANDROID) |
| 506 |
| 506 const DecoderTestData kMediaCodecTests[] = { | 507 const DecoderTestData kMediaCodecTests[] = { |
| 507 {MEDIA_CODEC, kCodecOpus, "bear-opus.ogg", kBearOpusExpectations, 24, 48000, | 508 {MEDIA_CODEC, kCodecOpus, "bear-opus.ogg", kBearOpusExpectations, 24, 48000, |
| 508 CHANNEL_LAYOUT_STEREO}, | 509 CHANNEL_LAYOUT_STEREO}, |
| 509 }; | 510 }; |
| 510 | 511 |
| 511 INSTANTIATE_TEST_CASE_P(MediaCodecAudioDecoderTest, | 512 INSTANTIATE_TEST_CASE_P(MediaCodecAudioDecoderTest, |
| 512 AudioDecoderTest, | 513 AudioDecoderTest, |
| 513 testing::ValuesIn(kMediaCodecTests)); | 514 testing::ValuesIn(kMediaCodecTests)); |
| 514 #endif // defined(OS_ANDROID) | 515 |
| 516 #else // !defined(OS_ANDROID) |
| 517 |
| 518 // Disable all FFmpeg decoder tests on Android. http://crbug.com/570762. |
| 515 | 519 |
| 516 #if defined(USE_PROPRIETARY_CODECS) | 520 #if defined(USE_PROPRIETARY_CODECS) |
| 517 const DecodedBufferExpectations kSfxMp3Expectations[] = { | 521 const DecodedBufferExpectations kSfxMp3Expectations[] = { |
| 518 {0, 1065, "2.81,3.99,4.53,4.10,3.08,2.46,"}, | 522 {0, 1065, "2.81,3.99,4.53,4.10,3.08,2.46,"}, |
| 519 {1065, 26122, "-3.81,-4.14,-3.90,-3.36,-3.03,-3.23,"}, | 523 {1065, 26122, "-3.81,-4.14,-3.90,-3.36,-3.03,-3.23,"}, |
| 520 {27188, 26122, "4.24,3.95,4.22,4.78,5.13,4.93,"}, | 524 {27188, 26122, "4.24,3.95,4.22,4.78,5.13,4.93,"}, |
| 521 }; | 525 }; |
| 522 | 526 |
| 523 const DecodedBufferExpectations kSfxAdtsExpectations[] = { | 527 const DecodedBufferExpectations kSfxAdtsExpectations[] = { |
| 524 {0, 23219, "-1.90,-1.53,-0.15,1.28,1.23,-0.33,"}, | 528 {0, 23219, "-1.90,-1.53,-0.15,1.28,1.23,-0.33,"}, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 {FFMPEG, kUnknownAudioCodec, "", NULL, 0, 0, CHANNEL_LAYOUT_NONE}, | 591 {FFMPEG, kUnknownAudioCodec, "", NULL, 0, 0, CHANNEL_LAYOUT_NONE}, |
| 588 }; | 592 }; |
| 589 | 593 |
| 590 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderTest, | 594 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderTest, |
| 591 AudioDecoderTest, | 595 AudioDecoderTest, |
| 592 testing::ValuesIn(kFFmpegTests)); | 596 testing::ValuesIn(kFFmpegTests)); |
| 593 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderBehavioralTest, | 597 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderBehavioralTest, |
| 594 FFmpegAudioDecoderBehavioralTest, | 598 FFmpegAudioDecoderBehavioralTest, |
| 595 testing::ValuesIn(kFFmpegBehavioralTest)); | 599 testing::ValuesIn(kFFmpegBehavioralTest)); |
| 596 | 600 |
| 601 #endif // !defined(OS_ANDROID) |
| 602 |
| 597 } // namespace media | 603 } // namespace media |
| OLD | NEW |