| 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/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
| 12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
| 13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
| 14 #include "media/base/cdm_context.h" | 14 #include "media/base/cdm_context.h" |
| 15 #include "media/base/media_log.h" | 15 #include "media/base/media_log.h" |
| 16 #include "media/base/media_tracks.h" | 16 #include "media/base/media_tracks.h" |
| 17 #include "media/base/test_data_util.h" | 17 #include "media/base/test_data_util.h" |
| 18 #include "media/filters/chunk_demuxer.h" | 18 #include "media/filters/chunk_demuxer.h" |
| 19 #if !defined(MEDIA_DISABLE_FFMPEG) | 19 #if !defined(MEDIA_DISABLE_FFMPEG) |
| 20 #include "media/filters/ffmpeg_audio_decoder.h" | 20 #include "media/filters/ffmpeg_audio_decoder.h" |
| 21 #include "media/filters/ffmpeg_demuxer.h" | 21 #include "media/filters/ffmpeg_demuxer.h" |
| 22 #include "media/filters/ffmpeg_video_decoder.h" | 22 #include "media/filters/ffmpeg_video_decoder.h" |
| 23 #endif | 23 #endif |
| 24 #include "media/filters/file_data_source.h" | 24 #include "media/filters/file_data_source.h" |
| 25 #include "media/filters/memory_data_source.h" | 25 #include "media/filters/memory_data_source.h" |
| 26 #include "media/filters/opus_audio_decoder.h" | |
| 27 #include "media/renderers/audio_renderer_impl.h" | 26 #include "media/renderers/audio_renderer_impl.h" |
| 28 #include "media/renderers/renderer_impl.h" | 27 #include "media/renderers/renderer_impl.h" |
| 29 #if !defined(MEDIA_DISABLE_LIBVPX) | 28 #if !defined(MEDIA_DISABLE_LIBVPX) |
| 30 #include "media/filters/vpx_video_decoder.h" | 29 #include "media/filters/vpx_video_decoder.h" |
| 31 #endif | 30 #endif |
| 32 | 31 |
| 33 using ::testing::_; | 32 using ::testing::_; |
| 34 using ::testing::AnyNumber; | 33 using ::testing::AnyNumber; |
| 35 using ::testing::AtLeast; | 34 using ::testing::AtLeast; |
| 36 using ::testing::AtMost; | 35 using ::testing::AtMost; |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 video_sink_.get(), std::move(video_decoders), false, nullptr, | 336 video_sink_.get(), std::move(video_decoders), false, nullptr, |
| 338 new MediaLog())); | 337 new MediaLog())); |
| 339 | 338 |
| 340 ScopedVector<AudioDecoder> audio_decoders = std::move(prepend_audio_decoders); | 339 ScopedVector<AudioDecoder> audio_decoders = std::move(prepend_audio_decoders); |
| 341 | 340 |
| 342 #if !defined(MEDIA_DISABLE_FFMPEG) | 341 #if !defined(MEDIA_DISABLE_FFMPEG) |
| 343 audio_decoders.push_back( | 342 audio_decoders.push_back( |
| 344 new FFmpegAudioDecoder(message_loop_.task_runner(), new MediaLog())); | 343 new FFmpegAudioDecoder(message_loop_.task_runner(), new MediaLog())); |
| 345 #endif | 344 #endif |
| 346 | 345 |
| 347 audio_decoders.push_back(new OpusAudioDecoder(message_loop_.task_runner())); | |
| 348 | |
| 349 if (!clockless_playback_) { | 346 if (!clockless_playback_) { |
| 350 audio_sink_ = new NullAudioSink(message_loop_.task_runner()); | 347 audio_sink_ = new NullAudioSink(message_loop_.task_runner()); |
| 351 } else { | 348 } else { |
| 352 clockless_audio_sink_ = new ClocklessAudioSink(OutputDeviceInfo( | 349 clockless_audio_sink_ = new ClocklessAudioSink(OutputDeviceInfo( |
| 353 "", OUTPUT_DEVICE_STATUS_OK, | 350 "", OUTPUT_DEVICE_STATUS_OK, |
| 354 // Don't allow the audio renderer to resample buffers if hashing is | 351 // Don't allow the audio renderer to resample buffers if hashing is |
| 355 // enabled: | 352 // enabled: |
| 356 hashing_enabled_ | 353 hashing_enabled_ |
| 357 ? AudioParameters() | 354 ? AudioParameters() |
| 358 : AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, | 355 : AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 DCHECK(clockless_playback_); | 432 DCHECK(clockless_playback_); |
| 436 return clockless_audio_sink_->render_time(); | 433 return clockless_audio_sink_->render_time(); |
| 437 } | 434 } |
| 438 | 435 |
| 439 base::TimeTicks DummyTickClock::NowTicks() { | 436 base::TimeTicks DummyTickClock::NowTicks() { |
| 440 now_ += base::TimeDelta::FromSeconds(60); | 437 now_ += base::TimeDelta::FromSeconds(60); |
| 441 return now_; | 438 return now_; |
| 442 } | 439 } |
| 443 | 440 |
| 444 } // namespace media | 441 } // namespace media |
| OLD | NEW |