Chromium Code Reviews| 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/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 68 | 68 |
| 69 void PipelineIntegrationTestBase::OnStatusCallback(PipelineStatus status) { | 69 void PipelineIntegrationTestBase::OnStatusCallback(PipelineStatus status) { |
| 70 pipeline_status_ = status; | 70 pipeline_status_ = status; |
| 71 message_loop_.PostTask(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); | 71 message_loop_.PostTask(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void PipelineIntegrationTestBase::DemuxerEncryptedMediaInitDataCB( | 74 void PipelineIntegrationTestBase::DemuxerEncryptedMediaInitDataCB( |
| 75 EmeInitDataType type, | 75 EmeInitDataType type, |
| 76 const std::vector<uint8_t>& init_data) { | 76 const std::vector<uint8_t>& init_data) { |
| 77 DCHECK(!init_data.empty()); | 77 DCHECK(!init_data.empty()); |
| 78 CHECK(!encrypted_media_init_data_cb_.is_null()); | 78 if (encrypted_media_init_data_cb_.is_null()) { |
|
ddorwin
2016/03/02 21:42:12
Would ASSERT/EXPECT_FALSE() be better? Then the te
xhwang
2016/03/02 23:22:40
PipelineIntegrationTestBase is used by PipelineInt
| |
| 79 // TODO(xhwang): Support encrypted media in PipelineIntegrationTestBase. | |
| 80 DLOG(WARNING) << "Encryted media not supported."; | |
|
ddorwin
2016/03/02 21:42:12
Encry*p*ted
Supported by the test? "Test does not
| |
| 81 pipeline_status_ = PIPELINE_ERROR_INITIALIZATION_FAILED; | |
| 82 message_loop_.PostTask(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); | |
|
DaleCurtis
2016/03/03 00:17:59
Oy, I forgot we use this in this file, we should c
xhwang
2016/03/03 00:38:47
sgtm. In a different CL though :)
| |
| 83 return; | |
| 84 } | |
| 79 encrypted_media_init_data_cb_.Run(type, init_data); | 85 encrypted_media_init_data_cb_.Run(type, init_data); |
| 80 } | 86 } |
| 81 | 87 |
| 82 void PipelineIntegrationTestBase::OnEnded() { | 88 void PipelineIntegrationTestBase::OnEnded() { |
| 83 DCHECK(!ended_); | 89 DCHECK(!ended_); |
| 84 ended_ = true; | 90 ended_ = true; |
| 85 pipeline_status_ = PIPELINE_OK; | 91 pipeline_status_ = PIPELINE_OK; |
| 86 message_loop_.PostTask(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); | 92 message_loop_.PostTask(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); |
| 87 } | 93 } |
| 88 | 94 |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 373 DCHECK(clockless_playback_); | 379 DCHECK(clockless_playback_); |
| 374 return clockless_audio_sink_->render_time(); | 380 return clockless_audio_sink_->render_time(); |
| 375 } | 381 } |
| 376 | 382 |
| 377 base::TimeTicks DummyTickClock::NowTicks() { | 383 base::TimeTicks DummyTickClock::NowTicks() { |
| 378 now_ += base::TimeDelta::FromSeconds(60); | 384 now_ += base::TimeDelta::FromSeconds(60); |
| 379 return now_; | 385 return now_; |
| 380 } | 386 } |
| 381 | 387 |
| 382 } // namespace media | 388 } // namespace media |
| OLD | NEW |