| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_ | 5 #ifndef MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_ |
| 6 #define MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_ | 6 #define MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 scoped_refptr<ClocklessAudioSink> clockless_audio_sink_; | 144 scoped_refptr<ClocklessAudioSink> clockless_audio_sink_; |
| 145 std::unique_ptr<NullVideoSink> video_sink_; | 145 std::unique_ptr<NullVideoSink> video_sink_; |
| 146 bool ended_; | 146 bool ended_; |
| 147 PipelineStatus pipeline_status_; | 147 PipelineStatus pipeline_status_; |
| 148 Demuxer::EncryptedMediaInitDataCB encrypted_media_init_data_cb_; | 148 Demuxer::EncryptedMediaInitDataCB encrypted_media_init_data_cb_; |
| 149 VideoPixelFormat last_video_frame_format_; | 149 VideoPixelFormat last_video_frame_format_; |
| 150 ColorSpace last_video_frame_color_space_; | 150 ColorSpace last_video_frame_color_space_; |
| 151 DummyTickClock dummy_clock_; | 151 DummyTickClock dummy_clock_; |
| 152 PipelineMetadata metadata_; | 152 PipelineMetadata metadata_; |
| 153 scoped_refptr<VideoFrame> last_frame_; | 153 scoped_refptr<VideoFrame> last_frame_; |
| 154 base::TimeDelta current_duration_; |
| 154 | 155 |
| 155 PipelineStatus StartInternal( | 156 PipelineStatus StartInternal( |
| 156 std::unique_ptr<DataSource> data_source, | 157 std::unique_ptr<DataSource> data_source, |
| 157 CdmContext* cdm_context, | 158 CdmContext* cdm_context, |
| 158 uint8_t test_type, | 159 uint8_t test_type, |
| 159 ScopedVector<VideoDecoder> prepend_video_decoders = | 160 ScopedVector<VideoDecoder> prepend_video_decoders = |
| 160 ScopedVector<VideoDecoder>(), | 161 ScopedVector<VideoDecoder>(), |
| 161 ScopedVector<AudioDecoder> prepend_audio_decoders = | 162 ScopedVector<AudioDecoder> prepend_audio_decoders = |
| 162 ScopedVector<AudioDecoder>()); | 163 ScopedVector<AudioDecoder>()); |
| 163 | 164 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 184 | 185 |
| 185 // Creates and returns a Renderer. | 186 // Creates and returns a Renderer. |
| 186 virtual std::unique_ptr<Renderer> CreateRenderer( | 187 virtual std::unique_ptr<Renderer> CreateRenderer( |
| 187 ScopedVector<VideoDecoder> prepend_video_decoders = | 188 ScopedVector<VideoDecoder> prepend_video_decoders = |
| 188 ScopedVector<VideoDecoder>(), | 189 ScopedVector<VideoDecoder>(), |
| 189 ScopedVector<AudioDecoder> prepend_audio_decoders = | 190 ScopedVector<AudioDecoder> prepend_audio_decoders = |
| 190 ScopedVector<AudioDecoder>()); | 191 ScopedVector<AudioDecoder>()); |
| 191 | 192 |
| 192 void OnVideoFramePaint(const scoped_refptr<VideoFrame>& frame); | 193 void OnVideoFramePaint(const scoped_refptr<VideoFrame>& frame); |
| 193 | 194 |
| 195 void CheckDuration(); |
| 196 |
| 197 // Return the media start time from |demuxer_|. |
| 198 base::TimeDelta GetStartTime(); |
| 199 |
| 194 MOCK_METHOD1(DecryptorAttached, void(bool)); | 200 MOCK_METHOD1(DecryptorAttached, void(bool)); |
| 195 // Pipeline::Client overrides. | 201 // Pipeline::Client overrides. |
| 196 void OnError(PipelineStatus status) override; | 202 void OnError(PipelineStatus status) override; |
| 197 void OnEnded() override; | 203 void OnEnded() override; |
| 198 MOCK_METHOD1(OnMetadata, void(PipelineMetadata)); | 204 MOCK_METHOD1(OnMetadata, void(PipelineMetadata)); |
| 199 MOCK_METHOD1(OnBufferingStateChange, void(BufferingState)); | 205 MOCK_METHOD1(OnBufferingStateChange, void(BufferingState)); |
| 200 MOCK_METHOD0(OnDurationChange, void()); | 206 MOCK_METHOD0(OnDurationChange, void()); |
| 201 MOCK_METHOD2(OnAddTextTrack, | 207 MOCK_METHOD2(OnAddTextTrack, |
| 202 void(const TextTrackConfig& config, | 208 void(const TextTrackConfig& config, |
| 203 const AddTextTrackDoneCB& done_cb)); | 209 const AddTextTrackDoneCB& done_cb)); |
| 204 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void)); | 210 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void)); |
| 205 MOCK_METHOD1(OnVideoNaturalSizeChange, void(const gfx::Size&)); | 211 MOCK_METHOD1(OnVideoNaturalSizeChange, void(const gfx::Size&)); |
| 206 MOCK_METHOD1(OnVideoOpacityChange, void(bool)); | 212 MOCK_METHOD1(OnVideoOpacityChange, void(bool)); |
| 207 }; | 213 }; |
| 208 | 214 |
| 209 } // namespace media | 215 } // namespace media |
| 210 | 216 |
| 211 #endif // MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_ | 217 #endif // MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_ |
| OLD | NEW |