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 "media/filters/pipeline_integration_test_base.h" | 5 #include "media/filters/pipeline_integration_test_base.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 0x38, 0x39, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35 | 56 0x38, 0x39, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35 |
57 }; | 57 }; |
58 | 58 |
59 const int kAppendWholeFile = -1; | 59 const int kAppendWholeFile = -1; |
60 | 60 |
61 // Constants for the Media Source config change tests. | 61 // Constants for the Media Source config change tests. |
62 const int kAppendTimeSec = 1; | 62 const int kAppendTimeSec = 1; |
63 const int kAppendTimeMs = kAppendTimeSec * 1000; | 63 const int kAppendTimeMs = kAppendTimeSec * 1000; |
64 const int k320WebMFileDurationMs = 2736; | 64 const int k320WebMFileDurationMs = 2736; |
65 const int k640WebMFileDurationMs = 2749; | 65 const int k640WebMFileDurationMs = 2749; |
66 const int kOpusEndTrimmingWebMFileDurationMs = 2771; | 66 const int kOpusEndTrimmingWebMFileDurationMs = 2741; |
67 const int kVP9WebMFileDurationMs = 2736; | 67 const int kVP9WebMFileDurationMs = 2736; |
68 const int kVP8AWebMFileDurationMs = 2733; | 68 const int kVP8AWebMFileDurationMs = 2733; |
69 | 69 |
70 #if defined(USE_PROPRIETARY_CODECS) | 70 #if defined(USE_PROPRIETARY_CODECS) |
71 const int k640IsoFileDurationMs = 2737; | 71 const int k640IsoFileDurationMs = 2737; |
72 const int k640IsoCencFileDurationMs = 2736; | 72 const int k640IsoCencFileDurationMs = 2736; |
73 const int k1280IsoFileDurationMs = 2736; | 73 const int k1280IsoFileDurationMs = 2736; |
74 const int k1280IsoAVC3FileDurationMs = 2736; | 74 const int k1280IsoAVC3FileDurationMs = 2736; |
75 #endif // defined(USE_PROPRIETARY_CODECS) | 75 #endif // defined(USE_PROPRIETARY_CODECS) |
76 | 76 |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 EXPECT_EQ(kVP8AWebMFileDurationMs, | 648 EXPECT_EQ(kVP8AWebMFileDurationMs, |
649 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds()); | 649 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds()); |
650 | 650 |
651 Play(); | 651 Play(); |
652 | 652 |
653 ASSERT_TRUE(WaitUntilOnEnded()); | 653 ASSERT_TRUE(WaitUntilOnEnded()); |
654 source.Abort(); | 654 source.Abort(); |
655 Stop(); | 655 Stop(); |
656 } | 656 } |
657 | 657 |
658 // Disabled until the fix for http://crbug.com/366750 is landed. | 658 TEST_P(PipelineIntegrationTest, BasicPlayback_MediaSource_Opus_WebM) { |
659 TEST_P(PipelineIntegrationTest, DISABLED_BasicPlayback_MediaSource_Opus_WebM) { | |
660 MockMediaSource source("bear-opus-end-trimming.webm", kOpusAudioOnlyWebM, | 659 MockMediaSource source("bear-opus-end-trimming.webm", kOpusAudioOnlyWebM, |
661 kAppendWholeFile, GetParam()); | 660 kAppendWholeFile, GetParam()); |
662 StartPipelineWithMediaSource(&source); | 661 StartPipelineWithMediaSource(&source); |
663 source.EndOfStream(); | 662 source.EndOfStream(); |
664 | 663 |
665 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size()); | 664 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size()); |
666 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds()); | 665 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds()); |
667 EXPECT_EQ(kOpusEndTrimmingWebMFileDurationMs, | 666 EXPECT_EQ(kOpusEndTrimmingWebMFileDurationMs, |
668 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds()); | 667 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds()); |
669 Play(); | 668 Play(); |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1275 Play(); | 1274 Play(); |
1276 ASSERT_TRUE(WaitUntilOnEnded()); | 1275 ASSERT_TRUE(WaitUntilOnEnded()); |
1277 } | 1276 } |
1278 | 1277 |
1279 // TODO(wolenetz): Enable MSE testing of new frame processor based on this flag, | 1278 // TODO(wolenetz): Enable MSE testing of new frame processor based on this flag, |
1280 // once the new processor has landed. See http://crbug.com/249422. | 1279 // once the new processor has landed. See http://crbug.com/249422. |
1281 INSTANTIATE_TEST_CASE_P(LegacyFrameProcessor, PipelineIntegrationTest, | 1280 INSTANTIATE_TEST_CASE_P(LegacyFrameProcessor, PipelineIntegrationTest, |
1282 Values(true)); | 1281 Values(true)); |
1283 | 1282 |
1284 } // namespace media | 1283 } // namespace media |
OLD | NEW |