Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Side by Side Diff: media/filters/pipeline_integration_test_base.cc

Issue 11492003: Encrypted Media: Support Audio Decrypt-Only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/filters/audio_renderer_impl_unittest.cc ('k') | media/media.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/media_log.h" 8 #include "media/base/media_log.h"
9 #include "media/filters/audio_renderer_impl.h" 9 #include "media/filters/audio_renderer_impl.h"
10 #include "media/filters/chunk_demuxer.h" 10 #include "media/filters/chunk_demuxer.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 base::Bind(&PipelineIntegrationTestBase::OnVideoRendererPaint, 210 base::Bind(&PipelineIntegrationTestBase::OnVideoRendererPaint,
211 base::Unretained(this)), 211 base::Unretained(this)),
212 base::Bind(&PipelineIntegrationTestBase::OnSetOpaque, 212 base::Bind(&PipelineIntegrationTestBase::OnSetOpaque,
213 base::Unretained(this)), 213 base::Unretained(this)),
214 !hashing_enabled_); 214 !hashing_enabled_);
215 collection->AddVideoRenderer(renderer_); 215 collection->AddVideoRenderer(renderer_);
216 audio_sink_ = new NullAudioSink(); 216 audio_sink_ = new NullAudioSink();
217 if (hashing_enabled_) 217 if (hashing_enabled_)
218 audio_sink_->StartAudioHashForTesting(); 218 audio_sink_->StartAudioHashForTesting();
219 scoped_refptr<AudioRendererImpl> audio_renderer(new AudioRendererImpl( 219 scoped_refptr<AudioRendererImpl> audio_renderer(new AudioRendererImpl(
220 audio_sink_)); 220 audio_sink_, SetDecryptorReadyCB()));
221 // Disable underflow if hashing is enabled. 221 // Disable underflow if hashing is enabled.
222 if (hashing_enabled_) 222 if (hashing_enabled_)
223 audio_renderer->DisableUnderflowForTesting(); 223 audio_renderer->DisableUnderflowForTesting();
224 collection->AddAudioRenderer(audio_renderer); 224 collection->AddAudioRenderer(audio_renderer);
225 return collection.Pass(); 225 return collection.Pass();
226 } 226 }
227 227
228 void PipelineIntegrationTestBase::OnVideoRendererPaint() { 228 void PipelineIntegrationTestBase::OnVideoRendererPaint() {
229 if (!hashing_enabled_) 229 if (!hashing_enabled_)
230 return; 230 return;
(...skipping 10 matching lines...) Expand all
241 base::MD5Final(&digest, &md5_context_); 241 base::MD5Final(&digest, &md5_context_);
242 return base::MD5DigestToBase16(digest); 242 return base::MD5DigestToBase16(digest);
243 } 243 }
244 244
245 std::string PipelineIntegrationTestBase::GetAudioHash() { 245 std::string PipelineIntegrationTestBase::GetAudioHash() {
246 DCHECK(hashing_enabled_); 246 DCHECK(hashing_enabled_);
247 return audio_sink_->GetAudioHashForTesting(); 247 return audio_sink_->GetAudioHashForTesting();
248 } 248 }
249 249
250 } // namespace media 250 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/audio_renderer_impl_unittest.cc ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698