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 | 9 |
10 #include "base/md5.h" | 10 #include "base/md5.h" |
11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "media/audio/clockless_audio_sink.h" | 12 #include "media/audio/clockless_audio_sink.h" |
13 #include "media/audio/null_audio_sink.h" | 13 #include "media/audio/null_audio_sink.h" |
14 #include "media/base/audio_hardware_config.h" | 14 #include "media/base/audio_hardware_config.h" |
15 #include "media/base/demuxer.h" | 15 #include "media/base/demuxer.h" |
16 #include "media/base/media_keys.h" | 16 #include "media/base/media_keys.h" |
17 #include "media/base/null_video_sink.h" | 17 #include "media/base/null_video_sink.h" |
| 18 #include "media/base/pipeline_client.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" |
24 #include "testing/gmock/include/gmock/gmock.h" | 25 #include "testing/gmock/include/gmock/gmock.h" |
25 | 26 |
26 namespace base { | 27 namespace base { |
27 class FilePath; | 28 class FilePath; |
(...skipping 23 matching lines...) Expand all Loading... |
51 | 52 |
52 // Integration tests for Pipeline. Real demuxers, real decoders, and | 53 // Integration tests for Pipeline. Real demuxers, real decoders, and |
53 // base renderer implementations are used to verify pipeline functionality. The | 54 // base renderer implementations are used to verify pipeline functionality. The |
54 // renderers used in these tests rely heavily on the AudioRendererBase & | 55 // renderers used in these tests rely heavily on the AudioRendererBase & |
55 // VideoRendererImpl implementations which contain a majority of the code used | 56 // VideoRendererImpl implementations which contain a majority of the code used |
56 // in the real AudioRendererImpl & SkCanvasVideoRenderer implementations used in | 57 // in the real AudioRendererImpl & SkCanvasVideoRenderer implementations used in |
57 // the browser. The renderers in this test don't actually write data to a | 58 // the browser. The renderers in this test don't actually write data to a |
58 // display or audio device. Both of these devices are simulated since they have | 59 // display or audio device. Both of these devices are simulated since they have |
59 // little effect on verifying pipeline behavior and allow tests to run faster | 60 // little effect on verifying pipeline behavior and allow tests to run faster |
60 // than real-time. | 61 // than real-time. |
61 class PipelineIntegrationTestBase { | 62 class PipelineIntegrationTestBase : public PipelineClient { |
62 public: | 63 public: |
63 PipelineIntegrationTestBase(); | 64 PipelineIntegrationTestBase(); |
64 virtual ~PipelineIntegrationTestBase(); | 65 virtual ~PipelineIntegrationTestBase(); |
65 | 66 |
66 // Test types for advanced testing and benchmarking (e.g., underflow is | 67 // Test types for advanced testing and benchmarking (e.g., underflow is |
67 // disabled to ensure consistent hashes). May be combined using the bitwise | 68 // disabled to ensure consistent hashes). May be combined using the bitwise |
68 // or operator (and as such must have values that are powers of two). | 69 // or operator (and as such must have values that are powers of two). |
69 enum TestTypeFlags { kNormal = 0, kHashed = 1, kClockless = 2 }; | 70 enum TestTypeFlags { kNormal = 0, kHashed = 1, kClockless = 2 }; |
70 | 71 |
71 // Starts the pipeline with a file specified by |filename|, optionally with a | 72 // Starts the pipeline with a file specified by |filename|, optionally with a |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 MOCK_METHOD1(DecryptorAttached, void(bool)); | 168 MOCK_METHOD1(DecryptorAttached, void(bool)); |
168 MOCK_METHOD2(OnAddTextTrack, | 169 MOCK_METHOD2(OnAddTextTrack, |
169 void(const TextTrackConfig& config, | 170 void(const TextTrackConfig& config, |
170 const AddTextTrackDoneCB& done_cb)); | 171 const AddTextTrackDoneCB& done_cb)); |
171 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void)); | 172 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void)); |
172 }; | 173 }; |
173 | 174 |
174 } // namespace media | 175 } // namespace media |
175 | 176 |
176 #endif // MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_ | 177 #endif // MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_ |
OLD | NEW |