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" |
| 11 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_vector.h" | 12 #include "base/memory/scoped_vector.h" |
12 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
13 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
14 #include "media/base/cdm_context.h" | 15 #include "media/base/cdm_context.h" |
15 #include "media/base/media_log.h" | 16 #include "media/base/media_log.h" |
16 #include "media/base/media_tracks.h" | 17 #include "media/base/media_tracks.h" |
17 #include "media/base/test_data_util.h" | 18 #include "media/base/test_data_util.h" |
18 #include "media/filters/chunk_demuxer.h" | 19 #include "media/filters/chunk_demuxer.h" |
19 #if !defined(MEDIA_DISABLE_FFMPEG) | 20 #if !defined(MEDIA_DISABLE_FFMPEG) |
20 #include "media/filters/ffmpeg_audio_decoder.h" | 21 #include "media/filters/ffmpeg_audio_decoder.h" |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 std::unique_ptr<Renderer> PipelineIntegrationTestBase::CreateRenderer( | 327 std::unique_ptr<Renderer> PipelineIntegrationTestBase::CreateRenderer( |
327 ScopedVector<VideoDecoder> prepend_video_decoders, | 328 ScopedVector<VideoDecoder> prepend_video_decoders, |
328 ScopedVector<AudioDecoder> prepend_audio_decoders) { | 329 ScopedVector<AudioDecoder> prepend_audio_decoders) { |
329 ScopedVector<VideoDecoder> video_decoders = std::move(prepend_video_decoders); | 330 ScopedVector<VideoDecoder> video_decoders = std::move(prepend_video_decoders); |
330 #if !defined(MEDIA_DISABLE_LIBVPX) | 331 #if !defined(MEDIA_DISABLE_LIBVPX) |
331 video_decoders.push_back(new VpxVideoDecoder()); | 332 video_decoders.push_back(new VpxVideoDecoder()); |
332 #endif // !defined(MEDIA_DISABLE_LIBVPX) | 333 #endif // !defined(MEDIA_DISABLE_LIBVPX) |
333 | 334 |
334 // Android does not have an ffmpeg video decoder. | 335 // Android does not have an ffmpeg video decoder. |
335 #if !defined(MEDIA_DISABLE_FFMPEG) && !defined(OS_ANDROID) | 336 #if !defined(MEDIA_DISABLE_FFMPEG) && !defined(OS_ANDROID) |
336 video_decoders.push_back(new FFmpegVideoDecoder()); | 337 video_decoders.push_back( |
| 338 new FFmpegVideoDecoder(make_scoped_refptr(new MediaLog()))); |
337 #endif | 339 #endif |
338 | 340 |
339 // Simulate a 60Hz rendering sink. | 341 // Simulate a 60Hz rendering sink. |
340 video_sink_.reset(new NullVideoSink( | 342 video_sink_.reset(new NullVideoSink( |
341 clockless_playback_, base::TimeDelta::FromSecondsD(1.0 / 60), | 343 clockless_playback_, base::TimeDelta::FromSecondsD(1.0 / 60), |
342 base::Bind(&PipelineIntegrationTestBase::OnVideoFramePaint, | 344 base::Bind(&PipelineIntegrationTestBase::OnVideoFramePaint, |
343 base::Unretained(this)), | 345 base::Unretained(this)), |
344 message_loop_.task_runner())); | 346 message_loop_.task_runner())); |
345 | 347 |
346 // Disable frame dropping if hashing is enabled. | 348 // Disable frame dropping if hashing is enabled. |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 DCHECK(clockless_playback_); | 447 DCHECK(clockless_playback_); |
446 return clockless_audio_sink_->render_time(); | 448 return clockless_audio_sink_->render_time(); |
447 } | 449 } |
448 | 450 |
449 base::TimeTicks DummyTickClock::NowTicks() { | 451 base::TimeTicks DummyTickClock::NowTicks() { |
450 now_ += base::TimeDelta::FromSeconds(60); | 452 now_ += base::TimeDelta::FromSeconds(60); |
451 return now_; | 453 return now_; |
452 } | 454 } |
453 | 455 |
454 } // namespace media | 456 } // namespace media |
OLD | NEW |