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 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1142 | 1142 |
1143 // TODO(dalecurtis): Add an opus test file which FFmpeg and ChunkDemuxer will | 1143 // TODO(dalecurtis): Add an opus test file which FFmpeg and ChunkDemuxer will |
1144 // both seek the same in and shows the difference of preroll. | 1144 // both seek the same in and shows the difference of preroll. |
1145 // http://crbug.com/509894 | 1145 // http://crbug.com/509894 |
1146 | 1146 |
1147 TEST_F(PipelineIntegrationTest, BasicPlaybackLive) { | 1147 TEST_F(PipelineIntegrationTest, BasicPlaybackLive) { |
1148 ASSERT_EQ(PIPELINE_OK, Start("bear-320x240-live.webm", kHashed)); | 1148 ASSERT_EQ(PIPELINE_OK, Start("bear-320x240-live.webm", kHashed)); |
1149 | 1149 |
1150 // Live stream does not have duration in the initialization segment. | 1150 // Live stream does not have duration in the initialization segment. |
1151 // It will be set after the entire file is available. | 1151 // It will be set after the entire file is available. |
1152 EXPECT_CALL(*this, OnDurationChange()).Times(1); | 1152 EXPECT_CALL(*this, OnDurationChange()).Times(AtLeast(1)); |
1153 | 1153 |
1154 Play(); | 1154 Play(); |
1155 | 1155 |
1156 ASSERT_TRUE(WaitUntilOnEnded()); | 1156 ASSERT_TRUE(WaitUntilOnEnded()); |
1157 | 1157 |
1158 EXPECT_HASH_EQ("f0be120a90a811506777c99a2cdf7cc1", GetVideoHash()); | 1158 EXPECT_HASH_EQ("f0be120a90a811506777c99a2cdf7cc1", GetVideoHash()); |
1159 EXPECT_HASH_EQ("-3.59,-2.06,-0.43,2.15,0.77,-0.95,", GetAudioHash()); | 1159 EXPECT_HASH_EQ("-3.59,-2.06,-0.43,2.15,0.77,-0.95,", GetAudioHash()); |
1160 | 1160 |
1161 // TODO: Fix FFmpeg code to return higher resolution time values so | 1161 // TODO: Fix FFmpeg code to return higher resolution time values so |
1162 // we don't have to truncate our expectations here. | 1162 // we don't have to truncate our expectations here. |
(...skipping 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2478 | 2478 |
2479 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { | 2479 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { |
2480 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); | 2480 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); |
2481 Play(); | 2481 Play(); |
2482 ASSERT_TRUE(WaitUntilOnEnded()); | 2482 ASSERT_TRUE(WaitUntilOnEnded()); |
2483 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), | 2483 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), |
2484 demuxer_->GetStartTime()); | 2484 demuxer_->GetStartTime()); |
2485 } | 2485 } |
2486 | 2486 |
2487 } // namespace media | 2487 } // namespace media |
OLD | NEW |