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

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

Issue 2840593002: Remove usage of ScopedTaskScheduler. (Closed)
Patch Set: rebase Created 3 years, 7 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 unified diff | Download patch
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
11 #include "base/md5.h" 11 #include "base/md5.h"
12 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
13 #include "base/test/scoped_task_scheduler.h" 13 #include "base/test/scoped_task_environment.h"
14 #include "base/threading/thread_task_runner_handle.h"
14 #include "media/audio/clockless_audio_sink.h" 15 #include "media/audio/clockless_audio_sink.h"
15 #include "media/audio/null_audio_sink.h" 16 #include "media/audio/null_audio_sink.h"
16 #include "media/base/demuxer.h" 17 #include "media/base/demuxer.h"
17 #include "media/base/null_video_sink.h" 18 #include "media/base/null_video_sink.h"
18 #include "media/base/pipeline_impl.h" 19 #include "media/base/pipeline_impl.h"
19 #include "media/base/pipeline_status.h" 20 #include "media/base/pipeline_status.h"
20 #include "media/base/text_track.h" 21 #include "media/base/text_track.h"
21 #include "media/base/text_track_config.h" 22 #include "media/base/text_track_config.h"
22 #include "media/base/video_frame.h" 23 #include "media/base/video_frame.h"
23 #include "media/renderers/video_renderer_impl.h" 24 #include "media/renderers/video_renderer_impl.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 const Demuxer::EncryptedMediaInitDataCB& encrypted_media_init_data_cb) { 136 const Demuxer::EncryptedMediaInitDataCB& encrypted_media_init_data_cb) {
136 encrypted_media_init_data_cb_ = encrypted_media_init_data_cb; 137 encrypted_media_init_data_cb_ = encrypted_media_init_data_cb;
137 } 138 }
138 139
139 std::unique_ptr<Renderer> CreateRenderer( 140 std::unique_ptr<Renderer> CreateRenderer(
140 CreateVideoDecodersCB prepend_video_decoders_cb, 141 CreateVideoDecodersCB prepend_video_decoders_cb,
141 CreateAudioDecodersCB prepend_audio_decoders_cb); 142 CreateAudioDecodersCB prepend_audio_decoders_cb);
142 143
143 protected: 144 protected:
144 MediaLog media_log_; 145 MediaLog media_log_;
145 base::MessageLoop message_loop_;
146 base::MD5Context md5_context_; 146 base::MD5Context md5_context_;
147 bool hashing_enabled_; 147 bool hashing_enabled_;
148 bool clockless_playback_; 148 bool clockless_playback_;
149 149
150 // TaskScheduler is used only for FFmpegDemuxer. 150 base::test::ScopedTaskEnvironment scoped_task_environment_;
151 std::unique_ptr<base::test::ScopedTaskScheduler> task_scheduler_; 151 const scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_ =
152 base::ThreadTaskRunnerHandle::Get();
153
152 std::unique_ptr<Demuxer> demuxer_; 154 std::unique_ptr<Demuxer> demuxer_;
153 std::unique_ptr<DataSource> data_source_; 155 std::unique_ptr<DataSource> data_source_;
154 std::unique_ptr<PipelineImpl> pipeline_; 156 std::unique_ptr<PipelineImpl> pipeline_;
155 scoped_refptr<NullAudioSink> audio_sink_; 157 scoped_refptr<NullAudioSink> audio_sink_;
156 scoped_refptr<ClocklessAudioSink> clockless_audio_sink_; 158 scoped_refptr<ClocklessAudioSink> clockless_audio_sink_;
157 std::unique_ptr<NullVideoSink> video_sink_; 159 std::unique_ptr<NullVideoSink> video_sink_;
158 bool ended_; 160 bool ended_;
159 PipelineStatus pipeline_status_; 161 PipelineStatus pipeline_status_;
160 Demuxer::EncryptedMediaInitDataCB encrypted_media_init_data_cb_; 162 Demuxer::EncryptedMediaInitDataCB encrypted_media_init_data_cb_;
161 VideoPixelFormat last_video_frame_format_; 163 VideoPixelFormat last_video_frame_format_;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 MOCK_METHOD1(OnVideoOpacityChange, void(bool)); 227 MOCK_METHOD1(OnVideoOpacityChange, void(bool));
226 MOCK_METHOD0(OnVideoAverageKeyframeDistanceUpdate, void()); 228 MOCK_METHOD0(OnVideoAverageKeyframeDistanceUpdate, void());
227 229
228 private: 230 private:
229 DISALLOW_COPY_AND_ASSIGN(PipelineIntegrationTestBase); 231 DISALLOW_COPY_AND_ASSIGN(PipelineIntegrationTestBase);
230 }; 232 };
231 233
232 } // namespace media 234 } // namespace media
233 235
234 #endif // MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_ 236 #endif // MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698