Chromium Code Reviews| 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 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1387 ASSERT_TRUE(Seek(seek_time)); | 1387 ASSERT_TRUE(Seek(seek_time)); |
| 1388 EXPECT_GE(pipeline_->GetMediaTime(), seek_time); | 1388 EXPECT_GE(pipeline_->GetMediaTime(), seek_time); |
| 1389 ASSERT_TRUE(WaitUntilOnEnded()); | 1389 ASSERT_TRUE(WaitUntilOnEnded()); |
| 1390 | 1390 |
| 1391 // Make sure seeking after reaching the end works as expected. | 1391 // Make sure seeking after reaching the end works as expected. |
| 1392 ASSERT_TRUE(Seek(seek_time)); | 1392 ASSERT_TRUE(Seek(seek_time)); |
| 1393 EXPECT_GE(pipeline_->GetMediaTime(), seek_time); | 1393 EXPECT_GE(pipeline_->GetMediaTime(), seek_time); |
| 1394 ASSERT_TRUE(WaitUntilOnEnded()); | 1394 ASSERT_TRUE(WaitUntilOnEnded()); |
| 1395 } | 1395 } |
| 1396 | 1396 |
| 1397 TEST_F(PipelineIntegrationTest, Rotated_Metadata_0) { | |
|
scherkus (not reviewing)
2014/07/09 22:15:16
since these use MP4 types they should be protected
| |
| 1398 ASSERT_TRUE(Start(GetTestDataFilePath("bear_rotate_0.mov"), PIPELINE_OK)); | |
| 1399 ASSERT_TRUE(metadata_.video_rotation == media::VIDEO_ROTATION_0); | |
|
scherkus (not reviewing)
2014/07/09 22:15:16
ditto for ASSERT_EQ() here +below
| |
| 1400 } | |
| 1401 | |
| 1402 TEST_F(PipelineIntegrationTest, Rotated_Metadata_90) { | |
| 1403 ASSERT_TRUE(Start(GetTestDataFilePath("bear_rotate_90.mov"), PIPELINE_OK)); | |
| 1404 ASSERT_TRUE(metadata_.video_rotation == media::VIDEO_ROTATION_90); | |
| 1405 } | |
| 1406 | |
| 1407 TEST_F(PipelineIntegrationTest, Rotated_Metadata_180) { | |
| 1408 ASSERT_TRUE(Start(GetTestDataFilePath("bear_rotate_180.mov"), PIPELINE_OK)); | |
| 1409 ASSERT_TRUE(metadata_.video_rotation == media::VIDEO_ROTATION_180); | |
| 1410 } | |
| 1411 | |
| 1412 TEST_F(PipelineIntegrationTest, Rotated_Metadata_270) { | |
| 1413 ASSERT_TRUE(Start(GetTestDataFilePath("bear_rotate_270.mov"), PIPELINE_OK)); | |
| 1414 ASSERT_TRUE(metadata_.video_rotation == media::VIDEO_ROTATION_270); | |
| 1415 } | |
| 1416 | |
| 1397 // Verify audio decoder & renderer can handle aborted demuxer reads. | 1417 // Verify audio decoder & renderer can handle aborted demuxer reads. |
| 1398 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_AudioOnly) { | 1418 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_AudioOnly) { |
| 1399 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-audio-only.webm", kAudioOnlyWebM, | 1419 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-audio-only.webm", kAudioOnlyWebM, |
| 1400 8192, | 1420 8192, |
| 1401 base::TimeDelta::FromMilliseconds(464), | 1421 base::TimeDelta::FromMilliseconds(464), |
| 1402 base::TimeDelta::FromMilliseconds(617), | 1422 base::TimeDelta::FromMilliseconds(617), |
| 1403 0x10CA, 19730)); | 1423 0x10CA, 19730)); |
| 1404 } | 1424 } |
| 1405 | 1425 |
| 1406 // Verify video decoder & renderer can handle aborted demuxer reads. | 1426 // Verify video decoder & renderer can handle aborted demuxer reads. |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1485 | 1505 |
| 1486 // Verify that videos with an odd frame size playback successfully. | 1506 // Verify that videos with an odd frame size playback successfully. |
| 1487 TEST_F(PipelineIntegrationTest, BasicPlayback_OddVideoSize) { | 1507 TEST_F(PipelineIntegrationTest, BasicPlayback_OddVideoSize) { |
| 1488 ASSERT_TRUE(Start(GetTestDataFilePath("butterfly-853x480.webm"), | 1508 ASSERT_TRUE(Start(GetTestDataFilePath("butterfly-853x480.webm"), |
| 1489 PIPELINE_OK)); | 1509 PIPELINE_OK)); |
| 1490 Play(); | 1510 Play(); |
| 1491 ASSERT_TRUE(WaitUntilOnEnded()); | 1511 ASSERT_TRUE(WaitUntilOnEnded()); |
| 1492 } | 1512 } |
| 1493 | 1513 |
| 1494 } // namespace media | 1514 } // namespace media |
| OLD | NEW |