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/filters/audio_renderer_impl.h" | 10 #include "media/filters/audio_renderer_impl.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 expected_status); | 60 expected_status); |
61 } | 61 } |
62 | 62 |
63 void PipelineIntegrationTestBase::DemuxerNeedKeyCB( | 63 void PipelineIntegrationTestBase::DemuxerNeedKeyCB( |
64 const std::string& type, | 64 const std::string& type, |
65 scoped_ptr<uint8[]> init_data, | 65 scoped_ptr<uint8[]> init_data, |
66 int init_data_size) { | 66 int init_data_size) { |
67 DCHECK(init_data.get()); | 67 DCHECK(init_data.get()); |
68 DCHECK_GT(init_data_size, 0); | 68 DCHECK_GT(init_data_size, 0); |
69 CHECK(!need_key_cb_.is_null()); | 69 CHECK(!need_key_cb_.is_null()); |
70 need_key_cb_.Run("", "", type, init_data.Pass(), init_data_size); | 70 need_key_cb_.Run( |
| 71 std::string(), std::string(), type, init_data.Pass(), init_data_size); |
71 } | 72 } |
72 | 73 |
73 void PipelineIntegrationTestBase::OnEnded() { | 74 void PipelineIntegrationTestBase::OnEnded() { |
74 DCHECK(!ended_); | 75 DCHECK(!ended_); |
75 ended_ = true; | 76 ended_ = true; |
76 pipeline_status_ = PIPELINE_OK; | 77 pipeline_status_ = PIPELINE_OK; |
77 message_loop_.PostTask(FROM_HERE, MessageLoop::QuitClosure()); | 78 message_loop_.PostTask(FROM_HERE, MessageLoop::QuitClosure()); |
78 } | 79 } |
79 | 80 |
80 bool PipelineIntegrationTestBase::WaitUntilOnEnded() { | 81 bool PipelineIntegrationTestBase::WaitUntilOnEnded() { |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 base::MD5Final(&digest, &md5_context_); | 286 base::MD5Final(&digest, &md5_context_); |
286 return base::MD5DigestToBase16(digest); | 287 return base::MD5DigestToBase16(digest); |
287 } | 288 } |
288 | 289 |
289 std::string PipelineIntegrationTestBase::GetAudioHash() { | 290 std::string PipelineIntegrationTestBase::GetAudioHash() { |
290 DCHECK(hashing_enabled_); | 291 DCHECK(hashing_enabled_); |
291 return audio_sink_->GetAudioHashForTesting(); | 292 return audio_sink_->GetAudioHashForTesting(); |
292 } | 293 } |
293 | 294 |
294 } // namespace media | 295 } // namespace media |
OLD | NEW |