| 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 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1125 | 1125 |
| 1126 ASSERT_EQ(PIPELINE_OK, Start("bear-320x240-av_enc-av.webm", | 1126 ASSERT_EQ(PIPELINE_OK, Start("bear-320x240-av_enc-av.webm", |
| 1127 encrypted_media.GetCdmContext())); | 1127 encrypted_media.GetCdmContext())); |
| 1128 | 1128 |
| 1129 Play(); | 1129 Play(); |
| 1130 | 1130 |
| 1131 ASSERT_TRUE(WaitUntilOnEnded()); | 1131 ASSERT_TRUE(WaitUntilOnEnded()); |
| 1132 Stop(); | 1132 Stop(); |
| 1133 } | 1133 } |
| 1134 | 1134 |
| 1135 TEST_F(PipelineIntegrationTest, FlacPlaybackHashed) { |
| 1136 ASSERT_EQ(PIPELINE_OK, Start("sfx.flac", kHashed)); |
| 1137 Play(); |
| 1138 ASSERT_TRUE(WaitUntilOnEnded()); |
| 1139 EXPECT_HASH_EQ(std::string(kNullVideoHash), GetVideoHash()); |
| 1140 EXPECT_HASH_EQ("3.03,2.86,2.99,3.31,3.57,4.06,", GetAudioHash()); |
| 1141 } |
| 1142 |
| 1135 TEST_F(PipelineIntegrationTest, BasicPlayback_MediaSource) { | 1143 TEST_F(PipelineIntegrationTest, BasicPlayback_MediaSource) { |
| 1136 MockMediaSource source("bear-320x240.webm", kWebM, 219229); | 1144 MockMediaSource source("bear-320x240.webm", kWebM, 219229); |
| 1137 EXPECT_EQ(PIPELINE_OK, StartPipelineWithMediaSource(&source)); | 1145 EXPECT_EQ(PIPELINE_OK, StartPipelineWithMediaSource(&source)); |
| 1138 source.EndOfStream(); | 1146 source.EndOfStream(); |
| 1139 | 1147 |
| 1140 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size()); | 1148 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size()); |
| 1141 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds()); | 1149 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds()); |
| 1142 EXPECT_EQ(k320WebMFileDurationMs, | 1150 EXPECT_EQ(k320WebMFileDurationMs, |
| 1143 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds()); | 1151 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds()); |
| 1144 | 1152 |
| (...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2375 | 2383 |
| 2376 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { | 2384 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { |
| 2377 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); | 2385 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); |
| 2378 Play(); | 2386 Play(); |
| 2379 ASSERT_TRUE(WaitUntilOnEnded()); | 2387 ASSERT_TRUE(WaitUntilOnEnded()); |
| 2380 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), | 2388 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), |
| 2381 demuxer_->GetStartTime()); | 2389 demuxer_->GetStartTime()); |
| 2382 } | 2390 } |
| 2383 | 2391 |
| 2384 } // namespace media | 2392 } // namespace media |
| OLD | NEW |