| 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/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "media/base/decoder_buffer.h" | 9 #include "media/base/decoder_buffer.h" |
| 10 #include "media/base/decryptor_client.h" | 10 #include "media/base/decryptor_client.h" |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 | 286 |
| 287 TEST_F(PipelineIntegrationTest, BasicPlaybackHashed) { | 287 TEST_F(PipelineIntegrationTest, BasicPlaybackHashed) { |
| 288 ASSERT_TRUE(Start(GetTestDataFilePath("bear-320x240.webm"), | 288 ASSERT_TRUE(Start(GetTestDataFilePath("bear-320x240.webm"), |
| 289 PIPELINE_OK, true)); | 289 PIPELINE_OK, true)); |
| 290 | 290 |
| 291 Play(); | 291 Play(); |
| 292 | 292 |
| 293 ASSERT_TRUE(WaitUntilOnEnded()); | 293 ASSERT_TRUE(WaitUntilOnEnded()); |
| 294 | 294 |
| 295 EXPECT_EQ(GetVideoHash(), "f0be120a90a811506777c99a2cdf7cc1"); | 295 EXPECT_EQ(GetVideoHash(), "f0be120a90a811506777c99a2cdf7cc1"); |
| 296 EXPECT_EQ(GetAudioHash(), "5699a4415b620e45b9d0aae531c9df76"); | 296 EXPECT_EQ(GetAudioHash(), "8d66c511a726827b2572e247bf6c02da"); |
| 297 } | 297 } |
| 298 | 298 |
| 299 TEST_F(PipelineIntegrationTest, BasicPlayback_MediaSource) { | 299 TEST_F(PipelineIntegrationTest, BasicPlayback_MediaSource) { |
| 300 MockMediaSource source("bear-320x240.webm", kWebM, 219229); | 300 MockMediaSource source("bear-320x240.webm", kWebM, 219229); |
| 301 StartPipelineWithMediaSource(&source); | 301 StartPipelineWithMediaSource(&source); |
| 302 source.EndOfStream(); | 302 source.EndOfStream(); |
| 303 ASSERT_EQ(pipeline_status_, PIPELINE_OK); | 303 ASSERT_EQ(pipeline_status_, PIPELINE_OK); |
| 304 | 304 |
| 305 EXPECT_EQ(pipeline_->GetBufferedTimeRanges().size(), 1u); | 305 EXPECT_EQ(pipeline_->GetBufferedTimeRanges().size(), 1u); |
| 306 EXPECT_EQ(pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds(), 0); | 306 EXPECT_EQ(pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds(), 0); |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 // Verify video decoder & renderer can handle aborted demuxer reads. | 442 // Verify video decoder & renderer can handle aborted demuxer reads. |
| 443 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_VideoOnly) { | 443 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_VideoOnly) { |
| 444 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-video-only.webm", kVideoOnlyWebM, | 444 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-video-only.webm", kVideoOnlyWebM, |
| 445 32768, | 445 32768, |
| 446 base::TimeDelta::FromMilliseconds(200), | 446 base::TimeDelta::FromMilliseconds(200), |
| 447 base::TimeDelta::FromMilliseconds(1668), | 447 base::TimeDelta::FromMilliseconds(1668), |
| 448 0x1C896, 65536)); | 448 0x1C896, 65536)); |
| 449 } | 449 } |
| 450 | 450 |
| 451 } // namespace media | 451 } // namespace media |
| OLD | NEW |