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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 need_key_cb), | 216 need_key_cb), |
217 decryptor); | 217 decryptor); |
218 } | 218 } |
219 | 219 |
220 scoped_ptr<FilterCollection> | 220 scoped_ptr<FilterCollection> |
221 PipelineIntegrationTestBase::CreateFilterCollection( | 221 PipelineIntegrationTestBase::CreateFilterCollection( |
222 const scoped_refptr<Demuxer>& demuxer, | 222 const scoped_refptr<Demuxer>& demuxer, |
223 Decryptor* decryptor) { | 223 Decryptor* decryptor) { |
224 scoped_ptr<FilterCollection> collection(new FilterCollection()); | 224 scoped_ptr<FilterCollection> collection(new FilterCollection()); |
225 collection->SetDemuxer(demuxer); | 225 collection->SetDemuxer(demuxer); |
226 scoped_refptr<VideoDecoder> video_decoder = new FFmpegVideoDecoder( | 226 |
227 message_loop_.message_loop_proxy()); | 227 ScopedVector<VideoDecoder> video_decoders; |
228 scoped_refptr<VpxVideoDecoder> vpx_decoder = new VpxVideoDecoder( | 228 video_decoders.push_back( |
229 message_loop_.message_loop_proxy()); | 229 new FFmpegVideoDecoder(message_loop_.message_loop_proxy())); |
230 collection->GetVideoDecoders()->push_back(video_decoder); | 230 video_decoders.push_back( |
231 collection->GetVideoDecoders()->push_back(vpx_decoder); | 231 new VpxVideoDecoder(message_loop_.message_loop_proxy())); |
232 | 232 |
233 // Disable frame dropping if hashing is enabled. | 233 // Disable frame dropping if hashing is enabled. |
234 scoped_ptr<VideoRenderer> renderer(new VideoRendererBase( | 234 scoped_ptr<VideoRenderer> renderer(new VideoRendererBase( |
235 message_loop_.message_loop_proxy(), | 235 message_loop_.message_loop_proxy(), |
| 236 video_decoders.Pass(), |
236 base::Bind(&PipelineIntegrationTestBase::SetDecryptor, | 237 base::Bind(&PipelineIntegrationTestBase::SetDecryptor, |
237 base::Unretained(this), decryptor), | 238 base::Unretained(this), decryptor), |
238 base::Bind(&PipelineIntegrationTestBase::OnVideoRendererPaint, | 239 base::Bind(&PipelineIntegrationTestBase::OnVideoRendererPaint, |
239 base::Unretained(this)), | 240 base::Unretained(this)), |
240 base::Bind(&PipelineIntegrationTestBase::OnSetOpaque, | 241 base::Bind(&PipelineIntegrationTestBase::OnSetOpaque, |
241 base::Unretained(this)), | 242 base::Unretained(this)), |
242 !hashing_enabled_)); | 243 !hashing_enabled_)); |
243 collection->SetVideoRenderer(renderer.Pass()); | 244 collection->SetVideoRenderer(renderer.Pass()); |
244 | 245 |
245 audio_sink_ = new NullAudioSink(message_loop_.message_loop_proxy()); | 246 audio_sink_ = new NullAudioSink(message_loop_.message_loop_proxy()); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 base::MD5Final(&digest, &md5_context_); | 287 base::MD5Final(&digest, &md5_context_); |
287 return base::MD5DigestToBase16(digest); | 288 return base::MD5DigestToBase16(digest); |
288 } | 289 } |
289 | 290 |
290 std::string PipelineIntegrationTestBase::GetAudioHash() { | 291 std::string PipelineIntegrationTestBase::GetAudioHash() { |
291 DCHECK(hashing_enabled_); | 292 DCHECK(hashing_enabled_); |
292 return audio_sink_->GetAudioHashForTesting(); | 293 return audio_sink_->GetAudioHashForTesting(); |
293 } | 294 } |
294 | 295 |
295 } // namespace media | 296 } // namespace media |
OLD | NEW |