| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1586 | 1586 |
| 1587 Play(); | 1587 Play(); |
| 1588 EXPECT_TRUE(WaitUntilOnEnded()); | 1588 EXPECT_TRUE(WaitUntilOnEnded()); |
| 1589 | 1589 |
| 1590 EXPECT_EQ(592, source.last_timestamp_offset().InMilliseconds()); | 1590 EXPECT_EQ(592, source.last_timestamp_offset().InMilliseconds()); |
| 1591 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size()); | 1591 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size()); |
| 1592 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds()); | 1592 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds()); |
| 1593 EXPECT_EQ(592, pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds()); | 1593 EXPECT_EQ(592, pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds()); |
| 1594 | 1594 |
| 1595 // Verify preroll is stripped. | 1595 // Verify preroll is stripped. |
| 1596 EXPECT_HASH_EQ("-0.06,0.97,-0.90,-0.70,-0.53,-0.34,", GetAudioHash()); | 1596 EXPECT_HASH_EQ("-0.25,0.67,0.04,0.14,-0.49,-0.41,", GetAudioHash()); |
| 1597 } | 1597 } |
| 1598 | 1598 |
| 1599 TEST_F(PipelineIntegrationTest, BasicPlaybackHashed_MP3) { | 1599 TEST_F(PipelineIntegrationTest, BasicPlaybackHashed_MP3) { |
| 1600 ASSERT_EQ(PIPELINE_OK, Start("sfx.mp3", kHashed)); | 1600 ASSERT_EQ(PIPELINE_OK, Start("sfx.mp3", kHashed)); |
| 1601 | 1601 |
| 1602 Play(); | 1602 Play(); |
| 1603 | 1603 |
| 1604 ASSERT_TRUE(WaitUntilOnEnded()); | 1604 ASSERT_TRUE(WaitUntilOnEnded()); |
| 1605 | 1605 |
| 1606 // Verify codec delay and preroll are stripped. | 1606 // Verify codec delay and preroll are stripped. |
| (...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2500 | 2500 |
| 2501 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { | 2501 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { |
| 2502 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); | 2502 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); |
| 2503 Play(); | 2503 Play(); |
| 2504 ASSERT_TRUE(WaitUntilOnEnded()); | 2504 ASSERT_TRUE(WaitUntilOnEnded()); |
| 2505 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), | 2505 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), |
| 2506 demuxer_->GetStartTime()); | 2506 demuxer_->GetStartTime()); |
| 2507 } | 2507 } |
| 2508 | 2508 |
| 2509 } // namespace media | 2509 } // namespace media |
| OLD | NEW |