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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 ChunkDemuxer* chunk_demuxer_; | 442 ChunkDemuxer* chunk_demuxer_; |
443 scoped_ptr<Demuxer> owned_chunk_demuxer_; | 443 scoped_ptr<Demuxer> owned_chunk_demuxer_; |
444 Demuxer::NeedKeyCB need_key_cb_; | 444 Demuxer::NeedKeyCB need_key_cb_; |
445 base::TimeDelta last_timestamp_offset_; | 445 base::TimeDelta last_timestamp_offset_; |
446 bool use_legacy_frame_processor_; | 446 bool use_legacy_frame_processor_; |
447 }; | 447 }; |
448 | 448 |
449 // Test parameter determines which coded frame processor is used to process | 449 // Test parameter determines which coded frame processor is used to process |
450 // appended data, and is only applicable in tests where the pipeline is using a | 450 // appended data, and is only applicable in tests where the pipeline is using a |
451 // (Mock)MediaSource (which are TEST_P, not TEST_F). If true, | 451 // (Mock)MediaSource (which are TEST_P, not TEST_F). If true, |
452 // LegacyFrameProcessor is used. Otherwise, (not yet supported), a more | 452 // LegacyFrameProcessor is used. Otherwise, the new FrameProcessor is used. |
453 // compliant frame processor is used. | |
454 // TODO(wolenetz): Enable usage of new frame processor based on this flag. | |
455 // See http://crbug.com/249422. | |
456 class PipelineIntegrationTest | 453 class PipelineIntegrationTest |
457 : public testing::TestWithParam<bool>, | 454 : public testing::TestWithParam<bool>, |
458 public PipelineIntegrationTestBase { | 455 public PipelineIntegrationTestBase { |
459 public: | 456 public: |
460 void StartPipelineWithMediaSource(MockMediaSource* source) { | 457 void StartPipelineWithMediaSource(MockMediaSource* source) { |
461 EXPECT_CALL(*this, OnMetadata(_)).Times(AtMost(1)) | 458 EXPECT_CALL(*this, OnMetadata(_)).Times(AtMost(1)) |
462 .WillRepeatedly(SaveArg<0>(&metadata_)); | 459 .WillRepeatedly(SaveArg<0>(&metadata_)); |
463 EXPECT_CALL(*this, OnPrerollCompleted()).Times(AtMost(1)); | 460 EXPECT_CALL(*this, OnPrerollCompleted()).Times(AtMost(1)); |
464 pipeline_->Start( | 461 pipeline_->Start( |
465 CreateFilterCollection(source->GetDemuxer(), NULL), | 462 CreateFilterCollection(source->GetDemuxer(), NULL), |
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1312 | 1309 |
1313 // Verify that VP8 video with inband text track can be played back. | 1310 // Verify that VP8 video with inband text track can be played back. |
1314 TEST_F(PipelineIntegrationTest, | 1311 TEST_F(PipelineIntegrationTest, |
1315 BasicPlayback_VP8_WebVTT_WebM) { | 1312 BasicPlayback_VP8_WebVTT_WebM) { |
1316 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp8-webvtt.webm"), | 1313 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp8-webvtt.webm"), |
1317 PIPELINE_OK)); | 1314 PIPELINE_OK)); |
1318 Play(); | 1315 Play(); |
1319 ASSERT_TRUE(WaitUntilOnEnded()); | 1316 ASSERT_TRUE(WaitUntilOnEnded()); |
1320 } | 1317 } |
1321 | 1318 |
1322 // TODO(wolenetz): Enable MSE testing of new frame processor based on this flag, | 1319 // For MediaSource tests, generate two sets of tests: one using FrameProcessor, |
1323 // once the new processor has landed. See http://crbug.com/249422. | 1320 // and one using LegacyFrameProcessor. |
| 1321 INSTANTIATE_TEST_CASE_P(NewFrameProcessor, PipelineIntegrationTest, |
| 1322 Values(false)); |
1324 INSTANTIATE_TEST_CASE_P(LegacyFrameProcessor, PipelineIntegrationTest, | 1323 INSTANTIATE_TEST_CASE_P(LegacyFrameProcessor, PipelineIntegrationTest, |
1325 Values(true)); | 1324 Values(true)); |
1326 | 1325 |
1327 } // namespace media | 1326 } // namespace media |
OLD | NEW |