| 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 #if defined(USE_PROPRIETARY_CODECS) |
| 1398 TEST_F(PipelineIntegrationTest, Rotated_Metadata_0) { |
| 1399 ASSERT_TRUE(Start(GetTestDataFilePath("bear_rotate_0.mp4"), PIPELINE_OK)); |
| 1400 ASSERT_EQ(VIDEO_ROTATION_0, metadata_.video_rotation); |
| 1401 } |
| 1402 |
| 1403 TEST_F(PipelineIntegrationTest, Rotated_Metadata_90) { |
| 1404 ASSERT_TRUE(Start(GetTestDataFilePath("bear_rotate_90.mp4"), PIPELINE_OK)); |
| 1405 ASSERT_EQ(VIDEO_ROTATION_90, metadata_.video_rotation); |
| 1406 } |
| 1407 |
| 1408 TEST_F(PipelineIntegrationTest, Rotated_Metadata_180) { |
| 1409 ASSERT_TRUE(Start(GetTestDataFilePath("bear_rotate_180.mp4"), PIPELINE_OK)); |
| 1410 ASSERT_EQ(VIDEO_ROTATION_180, metadata_.video_rotation); |
| 1411 } |
| 1412 |
| 1413 TEST_F(PipelineIntegrationTest, Rotated_Metadata_270) { |
| 1414 ASSERT_TRUE(Start(GetTestDataFilePath("bear_rotate_270.mp4"), PIPELINE_OK)); |
| 1415 ASSERT_EQ(VIDEO_ROTATION_270, metadata_.video_rotation); |
| 1416 } |
| 1417 #endif |
| 1418 |
| 1397 // Verify audio decoder & renderer can handle aborted demuxer reads. | 1419 // Verify audio decoder & renderer can handle aborted demuxer reads. |
| 1398 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_AudioOnly) { | 1420 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_AudioOnly) { |
| 1399 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-audio-only.webm", kAudioOnlyWebM, | 1421 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-audio-only.webm", kAudioOnlyWebM, |
| 1400 8192, | 1422 8192, |
| 1401 base::TimeDelta::FromMilliseconds(464), | 1423 base::TimeDelta::FromMilliseconds(464), |
| 1402 base::TimeDelta::FromMilliseconds(617), | 1424 base::TimeDelta::FromMilliseconds(617), |
| 1403 0x10CA, 19730)); | 1425 0x10CA, 19730)); |
| 1404 } | 1426 } |
| 1405 | 1427 |
| 1406 // Verify video decoder & renderer can handle aborted demuxer reads. | 1428 // Verify video decoder & renderer can handle aborted demuxer reads. |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1485 | 1507 |
| 1486 // Verify that videos with an odd frame size playback successfully. | 1508 // Verify that videos with an odd frame size playback successfully. |
| 1487 TEST_F(PipelineIntegrationTest, BasicPlayback_OddVideoSize) { | 1509 TEST_F(PipelineIntegrationTest, BasicPlayback_OddVideoSize) { |
| 1488 ASSERT_TRUE(Start(GetTestDataFilePath("butterfly-853x480.webm"), | 1510 ASSERT_TRUE(Start(GetTestDataFilePath("butterfly-853x480.webm"), |
| 1489 PIPELINE_OK)); | 1511 PIPELINE_OK)); |
| 1490 Play(); | 1512 Play(); |
| 1491 ASSERT_TRUE(WaitUntilOnEnded()); | 1513 ASSERT_TRUE(WaitUntilOnEnded()); |
| 1492 } | 1514 } |
| 1493 | 1515 |
| 1494 } // namespace media | 1516 } // namespace media |
| OLD | NEW |