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

Side by Side Diff: media/test/pipeline_integration_test_base.h

Issue 2479633002: Fix pipeline integration tests for seek / duration changes. (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « media/ffmpeg/ffmpeg_regression_tests.cc ('k') | media/test/pipeline_integration_test_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « media/ffmpeg/ffmpeg_regression_tests.cc ('k') | media/test/pipeline_integration_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698