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/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
9 #include "media/base/clock.h" | 9 #include "media/base/clock.h" |
10 #include "media/base/media_log.h" | 10 #include "media/base/media_log.h" |
11 #include "media/filters/audio_renderer_impl.h" | 11 #include "media/filters/audio_renderer_impl.h" |
12 #include "media/filters/chunk_demuxer.h" | 12 #include "media/filters/chunk_demuxer.h" |
13 #include "media/filters/clockless_video_frame_scheduler.h" | |
13 #include "media/filters/ffmpeg_audio_decoder.h" | 14 #include "media/filters/ffmpeg_audio_decoder.h" |
14 #include "media/filters/ffmpeg_demuxer.h" | 15 #include "media/filters/ffmpeg_demuxer.h" |
15 #include "media/filters/ffmpeg_video_decoder.h" | 16 #include "media/filters/ffmpeg_video_decoder.h" |
16 #include "media/filters/file_data_source.h" | 17 #include "media/filters/file_data_source.h" |
17 #include "media/filters/opus_audio_decoder.h" | 18 #include "media/filters/opus_audio_decoder.h" |
18 #include "media/filters/vpx_video_decoder.h" | 19 #include "media/filters/vpx_video_decoder.h" |
19 | 20 |
20 using ::testing::_; | 21 using ::testing::_; |
21 using ::testing::AnyNumber; | 22 using ::testing::AnyNumber; |
22 using ::testing::AtMost; | 23 using ::testing::AtMost; |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
236 | 237 |
237 scoped_ptr<FilterCollection> collection(new FilterCollection()); | 238 scoped_ptr<FilterCollection> collection(new FilterCollection()); |
238 collection->SetDemuxer(demuxer_.get()); | 239 collection->SetDemuxer(demuxer_.get()); |
239 | 240 |
240 ScopedVector<VideoDecoder> video_decoders; | 241 ScopedVector<VideoDecoder> video_decoders; |
241 video_decoders.push_back( | 242 video_decoders.push_back( |
242 new VpxVideoDecoder(message_loop_.message_loop_proxy())); | 243 new VpxVideoDecoder(message_loop_.message_loop_proxy())); |
243 video_decoders.push_back( | 244 video_decoders.push_back( |
244 new FFmpegVideoDecoder(message_loop_.message_loop_proxy())); | 245 new FFmpegVideoDecoder(message_loop_.message_loop_proxy())); |
245 | 246 |
246 // Disable frame dropping if hashing is enabled. | |
247 scoped_ptr<VideoRenderer> renderer(new VideoRendererImpl( | 247 scoped_ptr<VideoRenderer> renderer(new VideoRendererImpl( |
248 message_loop_.message_loop_proxy(), | 248 message_loop_.message_loop_proxy(), |
249 scoped_ptr<VideoFrameScheduler>(new ClocklessVideoFrameScheduler( | |
acolwell GONE FROM CHROMIUM
2014/04/24 16:43:59
nit: Shouldn't we only be using this scheduler if
scherkus (not reviewing)
2014/04/25 02:04:47
Ah right ... I guess it depends whether we feel th
| |
250 base::Bind(&PipelineIntegrationTestBase::OnVideoRendererPaint, | |
251 base::Unretained(this)))), | |
249 video_decoders.Pass(), | 252 video_decoders.Pass(), |
250 base::Bind(&PipelineIntegrationTestBase::SetDecryptor, | 253 base::Bind(&PipelineIntegrationTestBase::SetDecryptor, |
251 base::Unretained(this), | 254 base::Unretained(this), |
252 decryptor), | 255 decryptor))); |
253 base::Bind(&PipelineIntegrationTestBase::OnVideoRendererPaint, | |
254 base::Unretained(this)), | |
255 false)); | |
256 collection->SetVideoRenderer(renderer.Pass()); | 256 collection->SetVideoRenderer(renderer.Pass()); |
257 | 257 |
258 if (!clockless_playback_) { | 258 if (!clockless_playback_) { |
259 audio_sink_ = new NullAudioSink(message_loop_.message_loop_proxy()); | 259 audio_sink_ = new NullAudioSink(message_loop_.message_loop_proxy()); |
260 } else { | 260 } else { |
261 clockless_audio_sink_ = new ClocklessAudioSink(); | 261 clockless_audio_sink_ = new ClocklessAudioSink(); |
262 } | 262 } |
263 | 263 |
264 ScopedVector<AudioDecoder> audio_decoders; | 264 ScopedVector<AudioDecoder> audio_decoders; |
265 audio_decoders.push_back( | 265 audio_decoders.push_back( |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
325 DCHECK(clockless_playback_); | 325 DCHECK(clockless_playback_); |
326 return clockless_audio_sink_->render_time(); | 326 return clockless_audio_sink_->render_time(); |
327 } | 327 } |
328 | 328 |
329 base::TimeTicks DummyTickClock::NowTicks() { | 329 base::TimeTicks DummyTickClock::NowTicks() { |
330 now_ += base::TimeDelta::FromSeconds(60); | 330 now_ += base::TimeDelta::FromSeconds(60); |
331 return now_; | 331 return now_; |
332 } | 332 } |
333 | 333 |
334 } // namespace media | 334 } // namespace media |
OLD | NEW |