Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(882)

Side by Side Diff: media/test/pipeline_integration_test_base.h

Issue 1083683003: Speculative revert by sheriff (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed an unrelated commit that had accidentally slipped in. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/test/pipeline_integration_test.cc ('k') | media/test/pipeline_integration_test_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 27 matching lines...) Expand all
38 class DummyTickClock : public base::TickClock { 38 class DummyTickClock : public base::TickClock {
39 public: 39 public:
40 DummyTickClock() : now_() {} 40 DummyTickClock() : now_() {}
41 ~DummyTickClock() override {} 41 ~DummyTickClock() override {}
42 base::TimeTicks NowTicks() override; 42 base::TimeTicks NowTicks() override;
43 43
44 private: 44 private:
45 base::TimeTicks now_; 45 base::TimeTicks now_;
46 }; 46 };
47 47
48 // TODO(dalecurtis): Mocks won't be useful for the new rendering path, we'll
49 // need fake callback generators like we have for the audio path.
50 // http://crbug.com/473424
51 class MockVideoRendererSink : public VideoRendererSink {
52 public:
53 MockVideoRendererSink();
54 ~MockVideoRendererSink() override;
55
56 MOCK_METHOD1(Start, void(VideoRendererSink::RenderCallback*));
57 MOCK_METHOD0(Stop, void());
58 MOCK_METHOD1(PaintFrameUsingOldRenderingPath,
59 void(const scoped_refptr<VideoFrame>&));
60 };
61
62 // Integration tests for Pipeline. Real demuxers, real decoders, and 48 // Integration tests for Pipeline. Real demuxers, real decoders, and
63 // base renderer implementations are used to verify pipeline functionality. The 49 // base renderer implementations are used to verify pipeline functionality. The
64 // renderers used in these tests rely heavily on the AudioRendererBase & 50 // renderers used in these tests rely heavily on the AudioRendererBase &
65 // VideoRendererImpl implementations which contain a majority of the code used 51 // VideoRendererImpl implementations which contain a majority of the code used
66 // in the real AudioRendererImpl & SkCanvasVideoRenderer implementations used in 52 // in the real AudioRendererImpl & SkCanvasVideoRenderer implementations used in
67 // the browser. The renderers in this test don't actually write data to a 53 // the browser. The renderers in this test don't actually write data to a
68 // display or audio device. Both of these devices are simulated since they have 54 // display or audio device. Both of these devices are simulated since they have
69 // little effect on verifying pipeline behavior and allow tests to run faster 55 // little effect on verifying pipeline behavior and allow tests to run faster
70 // than real-time. 56 // than real-time.
71 class PipelineIntegrationTestBase { 57 class PipelineIntegrationTestBase {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 protected: 98 protected:
113 base::MessageLoop message_loop_; 99 base::MessageLoop message_loop_;
114 base::MD5Context md5_context_; 100 base::MD5Context md5_context_;
115 bool hashing_enabled_; 101 bool hashing_enabled_;
116 bool clockless_playback_; 102 bool clockless_playback_;
117 scoped_ptr<Demuxer> demuxer_; 103 scoped_ptr<Demuxer> demuxer_;
118 scoped_ptr<DataSource> data_source_; 104 scoped_ptr<DataSource> data_source_;
119 scoped_ptr<Pipeline> pipeline_; 105 scoped_ptr<Pipeline> pipeline_;
120 scoped_refptr<NullAudioSink> audio_sink_; 106 scoped_refptr<NullAudioSink> audio_sink_;
121 scoped_refptr<ClocklessAudioSink> clockless_audio_sink_; 107 scoped_refptr<ClocklessAudioSink> clockless_audio_sink_;
122 testing::NiceMock<MockVideoRendererSink> video_sink_;
123 bool ended_; 108 bool ended_;
124 PipelineStatus pipeline_status_; 109 PipelineStatus pipeline_status_;
125 Demuxer::EncryptedMediaInitDataCB encrypted_media_init_data_cb_; 110 Demuxer::EncryptedMediaInitDataCB encrypted_media_init_data_cb_;
126 VideoFrame::Format last_video_frame_format_; 111 VideoFrame::Format last_video_frame_format_;
127 DummyTickClock dummy_clock_; 112 DummyTickClock dummy_clock_;
128 AudioHardwareConfig hardware_config_; 113 AudioHardwareConfig hardware_config_;
129 PipelineMetadata metadata_; 114 PipelineMetadata metadata_;
130 115
131 void OnSeeked(base::TimeDelta seek_time, PipelineStatus status); 116 void OnSeeked(base::TimeDelta seek_time, PipelineStatus status);
132 void OnStatusCallback(PipelineStatus status); 117 void OnStatusCallback(PipelineStatus status);
(...skipping 21 matching lines...) Expand all
154 MOCK_METHOD1(DecryptorAttached, void(bool)); 139 MOCK_METHOD1(DecryptorAttached, void(bool));
155 MOCK_METHOD2(OnAddTextTrack, 140 MOCK_METHOD2(OnAddTextTrack,
156 void(const TextTrackConfig& config, 141 void(const TextTrackConfig& config,
157 const AddTextTrackDoneCB& done_cb)); 142 const AddTextTrackDoneCB& done_cb));
158 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void)); 143 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void));
159 }; 144 };
160 145
161 } // namespace media 146 } // namespace media
162 147
163 #endif // MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_ 148 #endif // MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_
OLDNEW
« no previous file with comments | « media/test/pipeline_integration_test.cc ('k') | media/test/pipeline_integration_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698