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

Unified Diff: media/filters/pipeline_integration_test_base.cc

Issue 12262058: Revert r180578, r180591, and r180604 from 1410 branch. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1410/src/
Patch Set: Created 7 years, 10 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/pipeline_integration_test_base.h ('k') | media/filters/video_renderer_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/pipeline_integration_test_base.cc
===================================================================
--- media/filters/pipeline_integration_test_base.cc (revision 182591)
+++ media/filters/pipeline_integration_test_base.cc (working copy)
@@ -212,7 +212,7 @@
collection->GetVideoDecoders()->push_back(vpx_decoder);
// Disable frame dropping if hashing is enabled.
- scoped_ptr<VideoRenderer> renderer(new VideoRendererBase(
+ renderer_ = new VideoRendererBase(
message_loop_.message_loop_proxy(),
base::Bind(&PipelineIntegrationTestBase::SetDecryptor,
base::Unretained(this), decryptor),
@@ -220,23 +220,20 @@
base::Unretained(this)),
base::Bind(&PipelineIntegrationTestBase::OnSetOpaque,
base::Unretained(this)),
- !hashing_enabled_));
- collection->SetVideoRenderer(renderer.Pass());
-
+ !hashing_enabled_);
+ collection->AddVideoRenderer(renderer_);
audio_sink_ = new NullAudioSink();
- AudioRendererImpl* audio_renderer_impl = new AudioRendererImpl(
+ if (hashing_enabled_)
+ audio_sink_->StartAudioHashForTesting();
+ scoped_refptr<AudioRendererImpl> audio_renderer(new AudioRendererImpl(
message_loop_.message_loop_proxy(),
audio_sink_,
base::Bind(&PipelineIntegrationTestBase::SetDecryptor,
- base::Unretained(this), decryptor));
+ base::Unretained(this), decryptor)));
// Disable underflow if hashing is enabled.
- if (hashing_enabled_) {
- audio_sink_->StartAudioHashForTesting();
- audio_renderer_impl->DisableUnderflowForTesting();
- }
- scoped_ptr<AudioRenderer> audio_renderer(audio_renderer_impl);
- collection->SetAudioRenderer(audio_renderer.Pass());
-
+ if (hashing_enabled_)
+ audio_renderer->DisableUnderflowForTesting();
+ collection->AddAudioRenderer(audio_renderer);
return collection.Pass();
}
@@ -246,11 +243,14 @@
decryptor_ready_cb.Run(decryptor);
}
-void PipelineIntegrationTestBase::OnVideoRendererPaint(
- const scoped_refptr<VideoFrame>& frame) {
+void PipelineIntegrationTestBase::OnVideoRendererPaint() {
if (!hashing_enabled_)
return;
- frame->HashFrameForTesting(&md5_context_);
+ scoped_refptr<VideoFrame> frame;
+ renderer_->GetCurrentFrame(&frame);
+ if (frame)
+ frame->HashFrameForTesting(&md5_context_);
+ renderer_->PutCurrentFrame(frame);
}
std::string PipelineIntegrationTestBase::GetVideoHash() {
« no previous file with comments | « media/filters/pipeline_integration_test_base.h ('k') | media/filters/video_renderer_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698