| 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
|
|
|