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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
9 #include "media/base/cdm_context.h" | 9 #include "media/base/cdm_context.h" |
10 #include "media/base/media_log.h" | 10 #include "media/base/media_log.h" |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 } | 229 } |
230 | 230 |
231 scoped_ptr<Renderer> PipelineIntegrationTestBase::CreateRenderer() { | 231 scoped_ptr<Renderer> PipelineIntegrationTestBase::CreateRenderer() { |
232 ScopedVector<VideoDecoder> video_decoders; | 232 ScopedVector<VideoDecoder> video_decoders; |
233 #if !defined(MEDIA_DISABLE_LIBVPX) | 233 #if !defined(MEDIA_DISABLE_LIBVPX) |
234 video_decoders.push_back( | 234 video_decoders.push_back( |
235 new VpxVideoDecoder(message_loop_.task_runner())); | 235 new VpxVideoDecoder(message_loop_.task_runner())); |
236 #endif // !defined(MEDIA_DISABLE_LIBVPX) | 236 #endif // !defined(MEDIA_DISABLE_LIBVPX) |
237 | 237 |
238 #if !defined(MEDIA_DISABLE_FFMPEG) | 238 #if !defined(MEDIA_DISABLE_FFMPEG) |
239 video_decoders.push_back( | 239 video_decoders.push_back(new FFmpegVideoDecoder()); |
240 new FFmpegVideoDecoder(message_loop_.task_runner())); | |
241 #endif | 240 #endif |
242 | 241 |
243 // Simulate a 60Hz rendering sink. | 242 // Simulate a 60Hz rendering sink. |
244 video_sink_.reset(new NullVideoSink( | 243 video_sink_.reset(new NullVideoSink( |
245 clockless_playback_, base::TimeDelta::FromSecondsD(1.0 / 60), | 244 clockless_playback_, base::TimeDelta::FromSecondsD(1.0 / 60), |
246 base::Bind(&PipelineIntegrationTestBase::OnVideoFramePaint, | 245 base::Bind(&PipelineIntegrationTestBase::OnVideoFramePaint, |
247 base::Unretained(this)), | 246 base::Unretained(this)), |
248 message_loop_.task_runner())); | 247 message_loop_.task_runner())); |
249 | 248 |
250 // Disable frame dropping if hashing is enabled. | 249 // Disable frame dropping if hashing is enabled. |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 DCHECK(clockless_playback_); | 336 DCHECK(clockless_playback_); |
338 return clockless_audio_sink_->render_time(); | 337 return clockless_audio_sink_->render_time(); |
339 } | 338 } |
340 | 339 |
341 base::TimeTicks DummyTickClock::NowTicks() { | 340 base::TimeTicks DummyTickClock::NowTicks() { |
342 now_ += base::TimeDelta::FromSeconds(60); | 341 now_ += base::TimeDelta::FromSeconds(60); |
343 return now_; | 342 return now_; |
344 } | 343 } |
345 | 344 |
346 } // namespace media | 345 } // namespace media |
OLD | NEW |