| 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/test/pipeline_integration_test_base.h" | 5 #include "media/test/pipeline_integration_test_base.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 base::TimeDelta::FromMilliseconds(10)); | 303 base::TimeDelta::FromMilliseconds(10)); |
| 304 base::RunLoop().Run(); | 304 base::RunLoop().Run(); |
| 305 return (pipeline_status_ == PIPELINE_OK); | 305 return (pipeline_status_ == PIPELINE_OK); |
| 306 } | 306 } |
| 307 | 307 |
| 308 void PipelineIntegrationTestBase::CreateDemuxer( | 308 void PipelineIntegrationTestBase::CreateDemuxer( |
| 309 std::unique_ptr<DataSource> data_source) { | 309 std::unique_ptr<DataSource> data_source) { |
| 310 data_source_ = std::move(data_source); | 310 data_source_ = std::move(data_source); |
| 311 | 311 |
| 312 #if !defined(MEDIA_DISABLE_FFMPEG) | 312 #if !defined(MEDIA_DISABLE_FFMPEG) |
| 313 task_scheduler_.reset(new base::test::ScopedTaskScheduler(&message_loop_)); |
| 313 demuxer_ = std::unique_ptr<Demuxer>(new FFmpegDemuxer( | 314 demuxer_ = std::unique_ptr<Demuxer>(new FFmpegDemuxer( |
| 314 message_loop_.task_runner(), data_source_.get(), | 315 message_loop_.task_runner(), data_source_.get(), |
| 315 base::Bind(&PipelineIntegrationTestBase::DemuxerEncryptedMediaInitDataCB, | 316 base::Bind(&PipelineIntegrationTestBase::DemuxerEncryptedMediaInitDataCB, |
| 316 base::Unretained(this)), | 317 base::Unretained(this)), |
| 317 base::Bind(&PipelineIntegrationTestBase::DemuxerMediaTracksUpdatedCB, | 318 base::Bind(&PipelineIntegrationTestBase::DemuxerMediaTracksUpdatedCB, |
| 318 base::Unretained(this)), | 319 base::Unretained(this)), |
| 319 new MediaLog())); | 320 new MediaLog())); |
| 320 #endif | 321 #endif |
| 321 } | 322 } |
| 322 | 323 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 DCHECK(clockless_playback_); | 443 DCHECK(clockless_playback_); |
| 443 return clockless_audio_sink_->render_time(); | 444 return clockless_audio_sink_->render_time(); |
| 444 } | 445 } |
| 445 | 446 |
| 446 base::TimeTicks DummyTickClock::NowTicks() { | 447 base::TimeTicks DummyTickClock::NowTicks() { |
| 447 now_ += base::TimeDelta::FromSeconds(60); | 448 now_ += base::TimeDelta::FromSeconds(60); |
| 448 return now_; | 449 return now_; |
| 449 } | 450 } |
| 450 | 451 |
| 451 } // namespace media | 452 } // namespace media |
| OLD | NEW |