Chromium Code Reviews| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 PipelineStatus WaitUntilEndedOrError(); | 64 PipelineStatus WaitUntilEndedOrError(); |
| 65 | 65 |
| 66 // Starts the pipeline (optionally with a CdmContext), returning the final | 66 // Starts the pipeline (optionally with a CdmContext), returning the final |
| 67 // status code after it has started. |filename| points at a test file located | 67 // status code after it has started. |filename| points at a test file located |
| 68 // under media/test/data/. | 68 // under media/test/data/. |
| 69 PipelineStatus Start(const std::string& filename); | 69 PipelineStatus Start(const std::string& filename); |
| 70 PipelineStatus Start(const std::string& filename, CdmContext* cdm_context); | 70 PipelineStatus Start(const std::string& filename, CdmContext* cdm_context); |
| 71 | 71 |
| 72 // Starts the pipeline in a particular mode for advanced testing and | 72 // Starts the pipeline in a particular mode for advanced testing and |
| 73 // benchmarking purposes (e.g., underflow is disabled to ensure consistent | 73 // benchmarking purposes (e.g., underflow is disabled to ensure consistent |
| 74 // hashes). | 74 // hashes). May be combined using the bitwise or operator. |
|
chcunningham
2015/07/31 19:48:45
Might mention that it must be powers of 2.
DaleCurtis
2015/08/03 22:49:53
Done.
| |
| 75 enum kTestType { kHashed, kClockless }; | 75 enum TestTypeFlags { kHashed = 1, kClockless = 2}; |
| 76 PipelineStatus Start(const std::string& filename, kTestType test_type); | 76 PipelineStatus Start(const std::string& filename, uint8_t test_type); |
| 77 | 77 |
| 78 void Play(); | 78 void Play(); |
| 79 void Pause(); | 79 void Pause(); |
| 80 bool Seek(base::TimeDelta seek_time); | 80 bool Seek(base::TimeDelta seek_time); |
| 81 void Stop(); | 81 void Stop(); |
| 82 bool WaitUntilCurrentTimeIsAfter(const base::TimeDelta& wait_time); | 82 bool WaitUntilCurrentTimeIsAfter(const base::TimeDelta& wait_time); |
| 83 | 83 |
| 84 // Returns the MD5 hash of all video frames seen. Should only be called once | 84 // Returns the MD5 hash of all video frames seen. Should only be called once |
| 85 // after playback completes. First time hashes should be generated with | 85 // after playback completes. First time hashes should be generated with |
| 86 // --video-threads=1 to ensure correctness. Pipeline must have been started | 86 // --video-threads=1 to ensure correctness. Pipeline must have been started |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 142 MOCK_METHOD1(DecryptorAttached, void(bool)); | 142 MOCK_METHOD1(DecryptorAttached, void(bool)); |
| 143 MOCK_METHOD2(OnAddTextTrack, | 143 MOCK_METHOD2(OnAddTextTrack, |
| 144 void(const TextTrackConfig& config, | 144 void(const TextTrackConfig& config, |
| 145 const AddTextTrackDoneCB& done_cb)); | 145 const AddTextTrackDoneCB& done_cb)); |
| 146 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void)); | 146 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void)); |
| 147 }; | 147 }; |
| 148 | 148 |
| 149 } // namespace media | 149 } // namespace media |
| 150 | 150 |
| 151 #endif // MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_ | 151 #endif // MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_ |
| OLD | NEW |