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

Unified Diff: media/test/pipeline_integration_test_base.cc

Issue 2804183002: Revert of Media Remoting: End to end integration tests. (Closed)
Patch Set: Created 3 years, 8 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/test/pipeline_integration_test_base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/test/pipeline_integration_test_base.cc
diff --git a/media/test/pipeline_integration_test_base.cc b/media/test/pipeline_integration_test_base.cc
index e455b1035ae3b4a3c07833e7ac8d8599c123d5e1..6a8b8f7283a9fb085a7b4e0f3c34950ac44720fb 100644
--- a/media/test/pipeline_integration_test_base.cc
+++ b/media/test/pipeline_integration_test_base.cc
@@ -30,10 +30,6 @@
#include "media/filters/vpx_video_decoder.h"
#endif
-#if BUILDFLAG(ENABLE_MEDIA_REMOTING)
-#include "media/remoting/end2end_test_renderer.h" // nogncheck
-#endif // BUILDFLAG(ENABLE_MEDIA_REMOTING)
-
using ::testing::_;
using ::testing::AnyNumber;
using ::testing::AtLeast;
@@ -48,61 +44,6 @@
const char kNullVideoHash[] = "d41d8cd98f00b204e9800998ecf8427e";
const char kNullAudioHash[] = "0.00,0.00,0.00,0.00,0.00,0.00,";
-namespace {
-
-class RendererFactoryImpl final : public PipelineTestRendererFactory {
- public:
- explicit RendererFactoryImpl(PipelineIntegrationTestBase* integration_test)
- : integration_test_(integration_test) {}
- ~RendererFactoryImpl() override {}
-
- // PipelineTestRendererFactory implementation.
- std::unique_ptr<Renderer> CreateRenderer(
- ScopedVector<VideoDecoder> prepend_video_decoders =
- ScopedVector<VideoDecoder>(),
- ScopedVector<AudioDecoder> prepend_audio_decoders =
- ScopedVector<AudioDecoder>()) override {
- return integration_test_->CreateRenderer(std::move(prepend_video_decoders),
- std::move(prepend_audio_decoders));
- }
-
- private:
- PipelineIntegrationTestBase* integration_test_;
-
- DISALLOW_COPY_AND_ASSIGN(RendererFactoryImpl);
-};
-
-#if BUILDFLAG(ENABLE_MEDIA_REMOTING)
-class RemotingTestRendererFactory final : public PipelineTestRendererFactory {
- public:
- explicit RemotingTestRendererFactory(
- std::unique_ptr<PipelineTestRendererFactory> renderer_factory)
- : default_renderer_factory_(std::move(renderer_factory)) {}
- ~RemotingTestRendererFactory() override {}
-
- // PipelineTestRendererFactory implementation.
- std::unique_ptr<Renderer> CreateRenderer(
- ScopedVector<VideoDecoder> prepend_video_decoders =
- ScopedVector<VideoDecoder>(),
- ScopedVector<AudioDecoder> prepend_audio_decoders =
- ScopedVector<AudioDecoder>()) override {
- std::unique_ptr<Renderer> renderer_impl =
- default_renderer_factory_->CreateRenderer(
- std::move(prepend_video_decoders),
- std::move(prepend_audio_decoders));
- return base::MakeUnique<remoting::End2EndTestRenderer>(
- std::move(renderer_impl));
- }
-
- private:
- std::unique_ptr<PipelineTestRendererFactory> default_renderer_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(RemotingTestRendererFactory);
-};
-#endif // BUILDFLAG(ENABLE_MEDIA_REMOTING)
-
-} // namespace
-
PipelineIntegrationTestBase::PipelineIntegrationTestBase()
: hashing_enabled_(false),
clockless_playback_(false),
@@ -111,8 +52,7 @@
pipeline_status_(PIPELINE_OK),
last_video_frame_format_(PIXEL_FORMAT_UNKNOWN),
last_video_frame_color_space_(COLOR_SPACE_UNSPECIFIED),
- current_duration_(kInfiniteDuration),
- renderer_factory_(new RendererFactoryImpl(this)) {
+ current_duration_(kInfiniteDuration) {
ResetVideoHash();
EXPECT_CALL(*this, OnVideoAverageKeyframeDistanceUpdate()).Times(AnyNumber());
}
@@ -239,12 +179,10 @@
EXPECT_CALL(*this, OnWaitingForDecryptionKey()).Times(0);
pipeline_->Start(
- demuxer_.get(),
- renderer_factory_->CreateRenderer(std::move(prepend_video_decoders),
- std::move(prepend_audio_decoders)),
- this,
- base::Bind(&PipelineIntegrationTestBase::OnStatusCallback,
- base::Unretained(this)));
+ demuxer_.get(), CreateRenderer(std::move(prepend_video_decoders),
+ std::move(prepend_audio_decoders)),
+ this, base::Bind(&PipelineIntegrationTestBase::OnStatusCallback,
+ base::Unretained(this)));
base::RunLoop().Run();
return pipeline_status_;
}
@@ -322,7 +260,7 @@
EXPECT_CALL(*this, OnBufferingStateChange(BUFFERING_HAVE_ENOUGH))
.WillOnce(InvokeWithoutArgs(&message_loop_, &base::MessageLoop::QuitNow));
- pipeline_->Resume(renderer_factory_->CreateRenderer(), seek_time,
+ pipeline_->Resume(CreateRenderer(), seek_time,
base::Bind(&PipelineIntegrationTestBase::OnSeeked,
base::Unretained(this), seek_time));
base::RunLoop().Run();
@@ -515,12 +453,4 @@
return now_;
}
-#if BUILDFLAG(ENABLE_MEDIA_REMOTING)
-void PipelineIntegrationTestBase::SetUpRemotingPipeline() {
- std::unique_ptr<PipelineTestRendererFactory> factory =
- std::move(renderer_factory_);
- renderer_factory_.reset(new RemotingTestRendererFactory(std::move(factory)));
-}
-#endif // BUILDFLAG(ENABLE_MEDIA_REMOTING)
-
} // namespace media
« no previous file with comments | « media/test/pipeline_integration_test_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698