| 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 |
| 11 #include "base/md5.h" | 11 #include "base/md5.h" |
| 12 #include "base/memory/scoped_vector.h" | 12 #include "base/memory/scoped_vector.h" |
| 13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
| 14 #include "base/test/scoped_task_scheduler.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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 void set_encrypted_media_init_data_cb( | 127 void set_encrypted_media_init_data_cb( |
| 127 const Demuxer::EncryptedMediaInitDataCB& encrypted_media_init_data_cb) { | 128 const Demuxer::EncryptedMediaInitDataCB& encrypted_media_init_data_cb) { |
| 128 encrypted_media_init_data_cb_ = encrypted_media_init_data_cb; | 129 encrypted_media_init_data_cb_ = encrypted_media_init_data_cb; |
| 129 } | 130 } |
| 130 | 131 |
| 131 protected: | 132 protected: |
| 132 base::MessageLoop message_loop_; | 133 base::MessageLoop message_loop_; |
| 133 base::MD5Context md5_context_; | 134 base::MD5Context md5_context_; |
| 134 bool hashing_enabled_; | 135 bool hashing_enabled_; |
| 135 bool clockless_playback_; | 136 bool clockless_playback_; |
| 137 |
| 138 // TaskScheduler is used only for FFmpegDemuxer. |
| 139 std::unique_ptr<base::test::ScopedTaskScheduler> task_scheduler_; |
| 136 std::unique_ptr<Demuxer> demuxer_; | 140 std::unique_ptr<Demuxer> demuxer_; |
| 137 std::unique_ptr<DataSource> data_source_; | 141 std::unique_ptr<DataSource> data_source_; |
| 138 std::unique_ptr<PipelineImpl> pipeline_; | 142 std::unique_ptr<PipelineImpl> pipeline_; |
| 139 scoped_refptr<NullAudioSink> audio_sink_; | 143 scoped_refptr<NullAudioSink> audio_sink_; |
| 140 scoped_refptr<ClocklessAudioSink> clockless_audio_sink_; | 144 scoped_refptr<ClocklessAudioSink> clockless_audio_sink_; |
| 141 std::unique_ptr<NullVideoSink> video_sink_; | 145 std::unique_ptr<NullVideoSink> video_sink_; |
| 142 bool ended_; | 146 bool ended_; |
| 143 PipelineStatus pipeline_status_; | 147 PipelineStatus pipeline_status_; |
| 144 Demuxer::EncryptedMediaInitDataCB encrypted_media_init_data_cb_; | 148 Demuxer::EncryptedMediaInitDataCB encrypted_media_init_data_cb_; |
| 145 VideoPixelFormat last_video_frame_format_; | 149 VideoPixelFormat last_video_frame_format_; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 const AddTextTrackDoneCB& done_cb)); | 209 const AddTextTrackDoneCB& done_cb)); |
| 206 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void)); | 210 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void)); |
| 207 MOCK_METHOD1(OnVideoNaturalSizeChange, void(const gfx::Size&)); | 211 MOCK_METHOD1(OnVideoNaturalSizeChange, void(const gfx::Size&)); |
| 208 MOCK_METHOD1(OnVideoOpacityChange, void(bool)); | 212 MOCK_METHOD1(OnVideoOpacityChange, void(bool)); |
| 209 MOCK_METHOD0(OnVideoAverageKeyframeDistanceUpdate, void()); | 213 MOCK_METHOD0(OnVideoAverageKeyframeDistanceUpdate, void()); |
| 210 }; | 214 }; |
| 211 | 215 |
| 212 } // namespace media | 216 } // namespace media |
| 213 | 217 |
| 214 #endif // MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_ | 218 #endif // MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_ |
| OLD | NEW |