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 064fd17f8391ec3fd31255ea5d604d5ff5775af5..dc1a7c502613c0981058aa166157e9ec4eef1e87 100644 |
--- a/media/test/pipeline_integration_test_base.h |
+++ b/media/test/pipeline_integration_test_base.h |
@@ -47,6 +47,17 @@ class DummyTickClock : public base::TickClock { |
base::TimeTicks now_; |
}; |
+class PipelineTestRendererFactory { |
+ public: |
+ virtual ~PipelineTestRendererFactory() {} |
+ // Creates and returns a Renderer. |
+ virtual std::unique_ptr<Renderer> CreateRenderer( |
+ ScopedVector<VideoDecoder> prepend_video_decoders = |
miu
2017/03/29 01:39:15
ScopedVector is deprecated. Please use std::unique
xjz
2017/03/30 23:21:31
This involves the refactor of VideoRendererImpl an
|
+ ScopedVector<VideoDecoder>(), |
+ ScopedVector<AudioDecoder> prepend_audio_decoders = |
+ ScopedVector<AudioDecoder>()) = 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 & |
@@ -59,7 +70,7 @@ class DummyTickClock : public base::TickClock { |
class PipelineIntegrationTestBase : public Pipeline::Client { |
public: |
PipelineIntegrationTestBase(); |
- virtual ~PipelineIntegrationTestBase(); |
+ ~PipelineIntegrationTestBase(); |
miu
2017/03/29 01:39:15
Just to make sure the right dtor gets called, let'
xjz
2017/03/30 23:21:31
Done.
|
// Test types for advanced testing and benchmarking (e.g., underflow is |
// disabled to ensure consistent hashes). May be combined using the bitwise |
@@ -128,27 +139,11 @@ class PipelineIntegrationTestBase : public Pipeline::Client { |
encrypted_media_init_data_cb_ = encrypted_media_init_data_cb; |
} |
- protected: |
- base::MessageLoop message_loop_; |
- base::MD5Context md5_context_; |
- bool hashing_enabled_; |
- bool clockless_playback_; |
- std::unique_ptr<Demuxer> demuxer_; |
- std::unique_ptr<DataSource> data_source_; |
- std::unique_ptr<PipelineImpl> pipeline_; |
- scoped_refptr<NullAudioSink> audio_sink_; |
- scoped_refptr<ClocklessAudioSink> clockless_audio_sink_; |
- std::unique_ptr<NullVideoSink> video_sink_; |
- bool ended_; |
- PipelineStatus pipeline_status_; |
- Demuxer::EncryptedMediaInitDataCB encrypted_media_init_data_cb_; |
- VideoPixelFormat last_video_frame_format_; |
- ColorSpace last_video_frame_color_space_; |
- DummyTickClock dummy_clock_; |
- PipelineMetadata metadata_; |
- scoped_refptr<VideoFrame> last_frame_; |
- base::TimeDelta current_duration_; |
+ 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, |
@@ -179,13 +174,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( |
- ScopedVector<VideoDecoder> prepend_video_decoders = |
- ScopedVector<VideoDecoder>(), |
- ScopedVector<AudioDecoder> prepend_audio_decoders = |
- ScopedVector<AudioDecoder>()); |
- |
void OnVideoFramePaint(const scoped_refptr<VideoFrame>& frame); |
void CheckDuration(); |
@@ -206,6 +194,30 @@ class PipelineIntegrationTestBase : public Pipeline::Client { |
MOCK_METHOD0(OnWaitingForDecryptionKey, void(void)); |
MOCK_METHOD1(OnVideoNaturalSizeChange, void(const gfx::Size&)); |
MOCK_METHOD1(OnVideoOpacityChange, void(bool)); |
+ |
+ base::MessageLoop message_loop_; |
+ base::MD5Context md5_context_; |
+ bool hashing_enabled_; |
+ bool clockless_playback_; |
+ std::unique_ptr<Demuxer> demuxer_; |
+ std::unique_ptr<DataSource> data_source_; |
+ std::unique_ptr<PipelineImpl> pipeline_; |
+ scoped_refptr<NullAudioSink> audio_sink_; |
+ scoped_refptr<ClocklessAudioSink> clockless_audio_sink_; |
+ std::unique_ptr<NullVideoSink> video_sink_; |
+ bool ended_; |
+ PipelineStatus pipeline_status_; |
+ Demuxer::EncryptedMediaInitDataCB encrypted_media_init_data_cb_; |
+ VideoPixelFormat last_video_frame_format_; |
+ ColorSpace last_video_frame_color_space_; |
+ DummyTickClock dummy_clock_; |
+ PipelineMetadata metadata_; |
+ scoped_refptr<VideoFrame> last_frame_; |
+ base::TimeDelta current_duration_; |
+ std::unique_ptr<PipelineTestRendererFactory> renderer_factory_; |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(PipelineIntegrationTestBase); |
}; |
} // namespace media |