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

Unified Diff: media/test/pipeline_integration_test_base.h

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.cc ('k') | media/test/pipeline_integration_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/test/pipeline_integration_test_base.h
diff --git a/media/test/pipeline_integration_test_base.h b/media/test/pipeline_integration_test_base.h
index 9ab7ab5891d9027a90daa5037a40a9e1f09ddea9..580e963c658f7b0261a6b2e6c7e2b392a352a88f 100644
--- a/media/test/pipeline_integration_test_base.h
+++ b/media/test/pipeline_integration_test_base.h
@@ -48,22 +48,6 @@
base::TimeTicks now_;
};
-class PipelineTestRendererFactory {
- public:
- virtual ~PipelineTestRendererFactory() {}
- // Creates and returns a Renderer.
- virtual std::unique_ptr<Renderer> CreateRenderer(
- ScopedVector<VideoDecoder> prepend_video_decoders =
- ScopedVector<VideoDecoder>(),
- ScopedVector<AudioDecoder> prepend_audio_decoders =
- ScopedVector<AudioDecoder>()) = 0;
-};
-
-enum PipelineType {
- Media, // Test the general media pipeline.
- MediaRemoting, // Test Media Remoting pipeline.
-};
-
// Integration tests for Pipeline. Real demuxers, real decoders, and
// base renderer implementations are used to verify pipeline functionality. The
// renderers used in these tests rely heavily on the AudioRendererBase &
@@ -145,70 +129,7 @@
encrypted_media_init_data_cb_ = encrypted_media_init_data_cb;
}
- std::unique_ptr<Renderer> CreateRenderer(
- ScopedVector<VideoDecoder> prepend_video_decoders,
- ScopedVector<AudioDecoder> prepend_audio_decoders);
-
protected:
- PipelineStatus StartInternal(
- std::unique_ptr<DataSource> data_source,
- CdmContext* cdm_context,
- uint8_t test_type,
- ScopedVector<VideoDecoder> prepend_video_decoders =
- ScopedVector<VideoDecoder>(),
- ScopedVector<AudioDecoder> prepend_audio_decoders =
- ScopedVector<AudioDecoder>());
-
- PipelineStatus StartWithFile(
- const std::string& filename,
- CdmContext* cdm_context,
- uint8_t test_type,
- ScopedVector<VideoDecoder> prepend_video_decoders =
- ScopedVector<VideoDecoder>(),
- ScopedVector<AudioDecoder> prepend_audio_decoders =
- ScopedVector<AudioDecoder>());
-
- void OnSeeked(base::TimeDelta seek_time, PipelineStatus status);
- void OnStatusCallback(PipelineStatus status);
- void DemuxerEncryptedMediaInitDataCB(EmeInitDataType type,
- const std::vector<uint8_t>& init_data);
-
- void DemuxerMediaTracksUpdatedCB(std::unique_ptr<MediaTracks> tracks);
-
- void QuitAfterCurrentTimeTask(const base::TimeDelta& quit_time);
-
- // Creates Demuxer and sets |demuxer_|.
- void CreateDemuxer(std::unique_ptr<DataSource> data_source);
-
- void OnVideoFramePaint(const scoped_refptr<VideoFrame>& frame);
-
- void CheckDuration();
-
- // Return the media start time from |demuxer_|.
- base::TimeDelta GetStartTime();
-
-#if BUILDFLAG(ENABLE_MEDIA_REMOTING)
- // Proxy all control and data flows through a media remoting RPC pipeline, to
- // test that an end-to-end media remoting pipeline works the same as a normal,
- // local pipeline.
- void SetUpRemotingPipeline();
-#endif // BUILDFLAG(ENABLE_MEDIA_REMOTING)
-
- MOCK_METHOD1(DecryptorAttached, void(bool));
- // Pipeline::Client overrides.
- void OnError(PipelineStatus status) override;
- void OnEnded() override;
- MOCK_METHOD1(OnMetadata, void(PipelineMetadata));
- MOCK_METHOD1(OnBufferingStateChange, void(BufferingState));
- MOCK_METHOD0(OnDurationChange, void());
- MOCK_METHOD2(OnAddTextTrack,
- void(const TextTrackConfig& config,
- const AddTextTrackDoneCB& done_cb));
- MOCK_METHOD0(OnWaitingForDecryptionKey, void(void));
- MOCK_METHOD1(OnVideoNaturalSizeChange, void(const gfx::Size&));
- MOCK_METHOD1(OnVideoOpacityChange, void(bool));
- MOCK_METHOD0(OnVideoAverageKeyframeDistanceUpdate, void());
-
base::MessageLoop message_loop_;
base::MD5Context md5_context_;
bool hashing_enabled_;
@@ -231,10 +152,65 @@
PipelineMetadata metadata_;
scoped_refptr<VideoFrame> last_frame_;
base::TimeDelta current_duration_;
- std::unique_ptr<PipelineTestRendererFactory> renderer_factory_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PipelineIntegrationTestBase);
+
+ PipelineStatus StartInternal(
+ std::unique_ptr<DataSource> data_source,
+ CdmContext* cdm_context,
+ uint8_t test_type,
+ ScopedVector<VideoDecoder> prepend_video_decoders =
+ ScopedVector<VideoDecoder>(),
+ ScopedVector<AudioDecoder> prepend_audio_decoders =
+ ScopedVector<AudioDecoder>());
+
+ PipelineStatus StartWithFile(
+ const std::string& filename,
+ CdmContext* cdm_context,
+ uint8_t test_type,
+ ScopedVector<VideoDecoder> prepend_video_decoders =
+ ScopedVector<VideoDecoder>(),
+ ScopedVector<AudioDecoder> prepend_audio_decoders =
+ ScopedVector<AudioDecoder>());
+
+ void OnSeeked(base::TimeDelta seek_time, PipelineStatus status);
+ void OnStatusCallback(PipelineStatus status);
+ void DemuxerEncryptedMediaInitDataCB(EmeInitDataType type,
+ const std::vector<uint8_t>& init_data);
+
+ void DemuxerMediaTracksUpdatedCB(std::unique_ptr<MediaTracks> tracks);
+
+ void QuitAfterCurrentTimeTask(const base::TimeDelta& quit_time);
+
+ // Creates Demuxer and sets |demuxer_|.
+ void CreateDemuxer(std::unique_ptr<DataSource> data_source);
+
+ // Creates and returns a Renderer.
+ virtual std::unique_ptr<Renderer> CreateRenderer(
+ ScopedVector<VideoDecoder> prepend_video_decoders =
+ ScopedVector<VideoDecoder>(),
+ ScopedVector<AudioDecoder> prepend_audio_decoders =
+ ScopedVector<AudioDecoder>());
+
+ void OnVideoFramePaint(const scoped_refptr<VideoFrame>& frame);
+
+ void CheckDuration();
+
+ // Return the media start time from |demuxer_|.
+ base::TimeDelta GetStartTime();
+
+ MOCK_METHOD1(DecryptorAttached, void(bool));
+ // Pipeline::Client overrides.
+ void OnError(PipelineStatus status) override;
+ void OnEnded() override;
+ MOCK_METHOD1(OnMetadata, void(PipelineMetadata));
+ MOCK_METHOD1(OnBufferingStateChange, void(BufferingState));
+ MOCK_METHOD0(OnDurationChange, void());
+ MOCK_METHOD2(OnAddTextTrack,
+ void(const TextTrackConfig& config,
+ const AddTextTrackDoneCB& done_cb));
+ MOCK_METHOD0(OnWaitingForDecryptionKey, void(void));
+ MOCK_METHOD1(OnVideoNaturalSizeChange, void(const gfx::Size&));
+ MOCK_METHOD1(OnVideoOpacityChange, void(bool));
+ MOCK_METHOD0(OnVideoAverageKeyframeDistanceUpdate, void());
};
} // namespace media
« no previous file with comments | « media/test/pipeline_integration_test.cc ('k') | media/test/pipeline_integration_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698