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 "media/base/decoder_buffer.h" | 8 #include "media/base/decoder_buffer.h" |
9 #include "media/base/decryptor_client.h" | 9 #include "media/base/decryptor_client.h" |
10 #include "media/base/test_data_util.h" | 10 #include "media/base/test_data_util.h" |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
179 AesDecryptor decryptor_; | 179 AesDecryptor decryptor_; |
180 std::string current_key_system_; | 180 std::string current_key_system_; |
181 std::string current_session_id_; | 181 std::string current_session_id_; |
182 }; | 182 }; |
183 | 183 |
184 class PipelineIntegrationTest | 184 class PipelineIntegrationTest |
185 : public testing::Test, | 185 : public testing::Test, |
186 public PipelineIntegrationTestBase { | 186 public PipelineIntegrationTestBase { |
187 public: | 187 public: |
188 void StartPipelineWithMediaSource(MockMediaSource* source) { | 188 void StartPipelineWithMediaSource(MockMediaSource* source) { |
189 base::Closure null_cb; | |
189 pipeline_->Start( | 190 pipeline_->Start( |
190 CreateFilterCollection(source), | 191 CreateFilterCollection(source), |
191 base::Bind(&PipelineIntegrationTest::OnEnded, base::Unretained(this)), | 192 base::Bind(&PipelineIntegrationTest::OnEnded, base::Unretained(this)), |
192 base::Bind(&PipelineIntegrationTest::OnError, base::Unretained(this)), | 193 base::Bind(&PipelineIntegrationTest::OnError, base::Unretained(this)), |
193 QuitOnStatusCB(PIPELINE_OK)); | 194 QuitOnStatusCB(PIPELINE_OK), |
195 null_cb); | |
vrk (LEFT CHROMIUM)
2012/07/26 22:27:27
Added these as null cbs because PipelineIntegratio
| |
194 | 196 |
195 ASSERT_TRUE(decoder_.get()); | 197 ASSERT_TRUE(decoder_.get()); |
196 | 198 |
197 message_loop_.Run(); | 199 message_loop_.Run(); |
198 } | 200 } |
199 | 201 |
200 void StartPipelineWithEncryptedMedia( | 202 void StartPipelineWithEncryptedMedia( |
201 MockMediaSource* source, | 203 MockMediaSource* source, |
202 FakeDecryptorClient* encrypted_media) { | 204 FakeDecryptorClient* encrypted_media) { |
205 base::Closure null_cb; | |
203 pipeline_->Start( | 206 pipeline_->Start( |
204 CreateFilterCollection(source), | 207 CreateFilterCollection(source), |
205 base::Bind(&PipelineIntegrationTest::OnEnded, base::Unretained(this)), | 208 base::Bind(&PipelineIntegrationTest::OnEnded, base::Unretained(this)), |
206 base::Bind(&PipelineIntegrationTest::OnError, base::Unretained(this)), | 209 base::Bind(&PipelineIntegrationTest::OnError, base::Unretained(this)), |
207 QuitOnStatusCB(PIPELINE_OK)); | 210 QuitOnStatusCB(PIPELINE_OK), |
211 null_cb); | |
208 | 212 |
209 ASSERT_TRUE(decoder_.get()); | 213 ASSERT_TRUE(decoder_.get()); |
210 decoder_->set_decryptor(encrypted_media->decryptor()); | 214 decoder_->set_decryptor(encrypted_media->decryptor()); |
211 source->set_decryptor_client(encrypted_media); | 215 source->set_decryptor_client(encrypted_media); |
212 | 216 |
213 message_loop_.Run(); | 217 message_loop_.Run(); |
214 } | 218 } |
215 | 219 |
216 // Verifies that seeking works properly for ChunkDemuxer when the | 220 // Verifies that seeking works properly for ChunkDemuxer when the |
217 // seek happens while there is a pending read on the ChunkDemuxer | 221 // seek happens while there is a pending read on the ChunkDemuxer |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
354 | 358 |
355 // Verify video decoder & renderer can handle aborted demuxer reads. | 359 // Verify video decoder & renderer can handle aborted demuxer reads. |
356 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_VideoOnly) { | 360 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_VideoOnly) { |
357 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-video-only.webm", 32768, | 361 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-video-only.webm", 32768, |
358 base::TimeDelta::FromMilliseconds(200), | 362 base::TimeDelta::FromMilliseconds(200), |
359 base::TimeDelta::FromMilliseconds(1668), | 363 base::TimeDelta::FromMilliseconds(1668), |
360 0x1C896, 65536, false, true)); | 364 0x1C896, 65536, false, true)); |
361 } | 365 } |
362 | 366 |
363 } // namespace media | 367 } // namespace media |
OLD | NEW |