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

Unified Diff: media/test/pipeline_integration_test_base.h

Issue 2808583002: RELAND: Media Remoting end to end integration tests. (Closed)
Patch Set: Rebased. 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 a39eb3ffe447318ba17792f5ec5b53639cd1b4a5..87f3c277770d899453fa42e6f588b42f1e2eea91 100644
--- a/media/test/pipeline_integration_test_base.h
+++ b/media/test/pipeline_integration_test_base.h
@@ -25,7 +25,8 @@
namespace media {
-class CdmContext;
+class FakeEncryptedMedia;
+class MockMediaSource;
// Empty MD5 hash string. Used to verify empty video tracks.
extern const char kNullVideoHash[];
@@ -45,6 +46,15 @@ class DummyTickClock : public base::TickClock {
base::TimeTicks now_;
};
+class PipelineTestRendererFactory {
+ public:
+ virtual ~PipelineTestRendererFactory() {}
+ // Creates and returns a Renderer.
+ virtual std::unique_ptr<Renderer> CreateRenderer(
+ CreateVideoDecodersCB prepend_video_decoders_cb,
+ CreateAudioDecodersCB prepend_audio_decoders_cb) = 0;
+};
+
// 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 &
@@ -126,6 +136,10 @@ class PipelineIntegrationTestBase : public Pipeline::Client {
encrypted_media_init_data_cb_ = encrypted_media_init_data_cb;
}
+ std::unique_ptr<Renderer> CreateRenderer(
+ CreateVideoDecodersCB prepend_video_decoders_cb,
+ CreateAudioDecodersCB prepend_audio_decoders_cb);
+
protected:
MediaLog media_log_;
base::MessageLoop message_loop_;
@@ -150,6 +164,7 @@ class PipelineIntegrationTestBase : public Pipeline::Client {
PipelineMetadata metadata_;
scoped_refptr<VideoFrame> last_frame_;
base::TimeDelta current_duration_;
+ std::unique_ptr<PipelineTestRendererFactory> renderer_factory_;
PipelineStatus StartInternal(
std::unique_ptr<DataSource> data_source,
@@ -167,6 +182,15 @@ class PipelineIntegrationTestBase : public Pipeline::Client {
CreateAudioDecodersCB prepend_audio_decoders_cb =
CreateAudioDecodersCB());
+ PipelineStatus StartPipelineWithMediaSource(MockMediaSource* source);
+ PipelineStatus StartPipelineWithEncryptedMedia(
+ MockMediaSource* source,
+ FakeEncryptedMedia* encrypted_media);
+ PipelineStatus StartPipelineWithMediaSource(
+ MockMediaSource* source,
+ uint8_t test_type,
+ FakeEncryptedMedia* encrypted_media);
+
void OnSeeked(base::TimeDelta seek_time, PipelineStatus status);
void OnStatusCallback(PipelineStatus status);
void DemuxerEncryptedMediaInitDataCB(EmeInitDataType type,
@@ -179,12 +203,6 @@ class PipelineIntegrationTestBase : public Pipeline::Client {
// Creates Demuxer and sets |demuxer_|.
void CreateDemuxer(std::unique_ptr<DataSource> data_source);
- // Creates and returns a Renderer.
- virtual std::unique_ptr<Renderer> CreateRenderer(
- CreateVideoDecodersCB prepend_video_decoders_cb = CreateVideoDecodersCB(),
- CreateAudioDecodersCB prepend_audio_decoders_cb =
- CreateAudioDecodersCB());
-
void OnVideoFramePaint(const scoped_refptr<VideoFrame>& frame);
void CheckDuration();
@@ -206,6 +224,9 @@ class PipelineIntegrationTestBase : public Pipeline::Client {
MOCK_METHOD1(OnVideoNaturalSizeChange, void(const gfx::Size&));
MOCK_METHOD1(OnVideoOpacityChange, void(bool));
MOCK_METHOD0(OnVideoAverageKeyframeDistanceUpdate, void());
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(PipelineIntegrationTestBase);
};
} // 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