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 "base/md5.h" | 8 #include "base/md5.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "media/audio/clockless_audio_sink.h" | 10 #include "media/audio/clockless_audio_sink.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 Demuxer::EncryptedMediaInitDataCB encrypted_media_init_data_cb_; | 115 Demuxer::EncryptedMediaInitDataCB encrypted_media_init_data_cb_; |
116 VideoPixelFormat last_video_frame_format_; | 116 VideoPixelFormat last_video_frame_format_; |
117 ColorSpace last_video_frame_color_space_; | 117 ColorSpace last_video_frame_color_space_; |
118 DummyTickClock dummy_clock_; | 118 DummyTickClock dummy_clock_; |
119 AudioHardwareConfig hardware_config_; | 119 AudioHardwareConfig hardware_config_; |
120 PipelineMetadata metadata_; | 120 PipelineMetadata metadata_; |
121 | 121 |
122 void OnSeeked(base::TimeDelta seek_time, PipelineStatus status); | 122 void OnSeeked(base::TimeDelta seek_time, PipelineStatus status); |
123 void OnStatusCallback(PipelineStatus status); | 123 void OnStatusCallback(PipelineStatus status); |
124 void DemuxerEncryptedMediaInitDataCB(EmeInitDataType type, | 124 void DemuxerEncryptedMediaInitDataCB(EmeInitDataType type, |
125 const std::vector<uint8>& init_data); | 125 const std::vector<uint8_t>& init_data); |
126 void set_encrypted_media_init_data_cb( | 126 void set_encrypted_media_init_data_cb( |
127 const Demuxer::EncryptedMediaInitDataCB& encrypted_media_init_data_cb) { | 127 const Demuxer::EncryptedMediaInitDataCB& encrypted_media_init_data_cb) { |
128 encrypted_media_init_data_cb_ = encrypted_media_init_data_cb; | 128 encrypted_media_init_data_cb_ = encrypted_media_init_data_cb; |
129 } | 129 } |
130 | 130 |
131 void OnEnded(); | 131 void OnEnded(); |
132 void OnError(PipelineStatus status); | 132 void OnError(PipelineStatus status); |
133 void QuitAfterCurrentTimeTask(const base::TimeDelta& quit_time); | 133 void QuitAfterCurrentTimeTask(const base::TimeDelta& quit_time); |
134 | 134 |
135 // Creates Demuxer and sets |demuxer_|. | 135 // Creates Demuxer and sets |demuxer_|. |
136 void CreateDemuxer(const std::string& filename); | 136 void CreateDemuxer(const std::string& filename); |
137 | 137 |
138 // Creates and returns a Renderer. | 138 // Creates and returns a Renderer. |
139 virtual scoped_ptr<Renderer> CreateRenderer(); | 139 virtual scoped_ptr<Renderer> CreateRenderer(); |
140 | 140 |
141 void OnVideoFramePaint(const scoped_refptr<VideoFrame>& frame); | 141 void OnVideoFramePaint(const scoped_refptr<VideoFrame>& frame); |
142 | 142 |
143 MOCK_METHOD1(OnMetadata, void(PipelineMetadata)); | 143 MOCK_METHOD1(OnMetadata, void(PipelineMetadata)); |
144 MOCK_METHOD1(OnBufferingStateChanged, void(BufferingState)); | 144 MOCK_METHOD1(OnBufferingStateChanged, void(BufferingState)); |
145 MOCK_METHOD1(DecryptorAttached, void(bool)); | 145 MOCK_METHOD1(DecryptorAttached, void(bool)); |
146 MOCK_METHOD2(OnAddTextTrack, | 146 MOCK_METHOD2(OnAddTextTrack, |
147 void(const TextTrackConfig& config, | 147 void(const TextTrackConfig& config, |
148 const AddTextTrackDoneCB& done_cb)); | 148 const AddTextTrackDoneCB& done_cb)); |
149 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void)); | 149 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void)); |
150 }; | 150 }; |
151 | 151 |
152 } // namespace media | 152 } // namespace media |
153 | 153 |
154 #endif // MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_ | 154 #endif // MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_ |
OLD | NEW |