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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 // after playback completes. First time hashes should be generated with | 102 // after playback completes. First time hashes should be generated with |
103 // --video-threads=1 to ensure correctness. Pipeline must have been started | 103 // --video-threads=1 to ensure correctness. Pipeline must have been started |
104 // with hashing enabled. | 104 // with hashing enabled. |
105 std::string GetVideoHash(); | 105 std::string GetVideoHash(); |
106 | 106 |
107 // Returns the hash of all audio frames seen. Should only be called once | 107 // Returns the hash of all audio frames seen. Should only be called once |
108 // after playback completes. Pipeline must have been started with hashing | 108 // after playback completes. Pipeline must have been started with hashing |
109 // enabled. | 109 // enabled. |
110 std::string GetAudioHash(); | 110 std::string GetAudioHash(); |
111 | 111 |
| 112 // Reset video hash to restart hashing from scratch (e.g. after a seek or |
| 113 // after disabling a media track). |
| 114 void ResetVideoHash(); |
| 115 |
112 // Returns the time taken to render the complete audio file. | 116 // Returns the time taken to render the complete audio file. |
113 // Pipeline must have been started with clockless playback enabled. | 117 // Pipeline must have been started with clockless playback enabled. |
114 base::TimeDelta GetAudioTime(); | 118 base::TimeDelta GetAudioTime(); |
115 | 119 |
116 // Sets a callback to handle EME "encrypted" event. Must be called to test | 120 // Sets a callback to handle EME "encrypted" event. Must be called to test |
117 // potentially encrypted media. | 121 // potentially encrypted media. |
118 void set_encrypted_media_init_data_cb( | 122 void set_encrypted_media_init_data_cb( |
119 const Demuxer::EncryptedMediaInitDataCB& encrypted_media_init_data_cb) { | 123 const Demuxer::EncryptedMediaInitDataCB& encrypted_media_init_data_cb) { |
120 encrypted_media_init_data_cb_ = encrypted_media_init_data_cb; | 124 encrypted_media_init_data_cb_ = encrypted_media_init_data_cb; |
121 } | 125 } |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 void(const TextTrackConfig& config, | 180 void(const TextTrackConfig& config, |
177 const AddTextTrackDoneCB& done_cb)); | 181 const AddTextTrackDoneCB& done_cb)); |
178 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void)); | 182 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void)); |
179 MOCK_METHOD1(OnVideoNaturalSizeChange, void(const gfx::Size&)); | 183 MOCK_METHOD1(OnVideoNaturalSizeChange, void(const gfx::Size&)); |
180 MOCK_METHOD1(OnVideoOpacityChange, void(bool)); | 184 MOCK_METHOD1(OnVideoOpacityChange, void(bool)); |
181 }; | 185 }; |
182 | 186 |
183 } // namespace media | 187 } // namespace media |
184 | 188 |
185 #endif // MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_ | 189 #endif // MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_ |
OLD | NEW |