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