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/media_log.h" | 9 #include "media/base/media_log.h" |
10 #include "media/base/time_delta_interpolator.h" | 10 #include "media/base/time_delta_interpolator.h" |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 audio_sink_->StartAudioHashForTesting(); | 300 audio_sink_->StartAudioHashForTesting(); |
301 scoped_ptr<AudioRenderer> audio_renderer(audio_renderer_impl); | 301 scoped_ptr<AudioRenderer> audio_renderer(audio_renderer_impl); |
302 collection->SetAudioRenderer(audio_renderer.Pass()); | 302 collection->SetAudioRenderer(audio_renderer.Pass()); |
303 | 303 |
304 return collection.Pass(); | 304 return collection.Pass(); |
305 } | 305 } |
306 | 306 |
307 void PipelineIntegrationTestBase::SetDecryptor( | 307 void PipelineIntegrationTestBase::SetDecryptor( |
308 Decryptor* decryptor, | 308 Decryptor* decryptor, |
309 const DecryptorReadyCB& decryptor_ready_cb) { | 309 const DecryptorReadyCB& decryptor_ready_cb) { |
310 decryptor_ready_cb.Run(decryptor); | 310 decryptor_ready_cb.Run( |
| 311 decryptor, |
| 312 base::Bind(&PipelineIntegrationTestBase::DecryptorAttached, |
| 313 base::Unretained(this))); |
| 314 EXPECT_CALL(*this, DecryptorAttached(true)); |
311 } | 315 } |
312 | 316 |
313 void PipelineIntegrationTestBase::OnVideoRendererPaint( | 317 void PipelineIntegrationTestBase::OnVideoRendererPaint( |
314 const scoped_refptr<VideoFrame>& frame) { | 318 const scoped_refptr<VideoFrame>& frame) { |
315 last_video_frame_format_ = frame->format(); | 319 last_video_frame_format_ = frame->format(); |
316 if (!hashing_enabled_) | 320 if (!hashing_enabled_) |
317 return; | 321 return; |
318 frame->HashFrameForTesting(&md5_context_); | 322 frame->HashFrameForTesting(&md5_context_); |
319 } | 323 } |
320 | 324 |
(...skipping 13 matching lines...) Expand all Loading... |
334 DCHECK(clockless_playback_); | 338 DCHECK(clockless_playback_); |
335 return clockless_audio_sink_->render_time(); | 339 return clockless_audio_sink_->render_time(); |
336 } | 340 } |
337 | 341 |
338 base::TimeTicks DummyTickClock::NowTicks() { | 342 base::TimeTicks DummyTickClock::NowTicks() { |
339 now_ += base::TimeDelta::FromSeconds(60); | 343 now_ += base::TimeDelta::FromSeconds(60); |
340 return now_; | 344 return now_; |
341 } | 345 } |
342 | 346 |
343 } // namespace media | 347 } // namespace media |
OLD | NEW |