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_BASE_MOCK_FILTERS_H_ | 5 #ifndef MEDIA_BASE_MOCK_FILTERS_H_ |
6 #define MEDIA_BASE_MOCK_FILTERS_H_ | 6 #define MEDIA_BASE_MOCK_FILTERS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 class MockVideoDecoder : public VideoDecoder { | 84 class MockVideoDecoder : public VideoDecoder { |
85 public: | 85 public: |
86 MockVideoDecoder(); | 86 MockVideoDecoder(); |
87 virtual ~MockVideoDecoder(); | 87 virtual ~MockVideoDecoder(); |
88 | 88 |
89 // VideoDecoder implementation. | 89 // VideoDecoder implementation. |
90 virtual std::string GetDisplayName() const; | 90 virtual std::string GetDisplayName() const; |
91 MOCK_METHOD5(Initialize, | 91 MOCK_METHOD5(Initialize, |
92 void(const VideoDecoderConfig& config, | 92 void(const VideoDecoderConfig& config, |
93 bool low_delay, | 93 bool low_delay, |
94 const SetCdmReadyCB& set_cdm_ready_cb, | 94 CdmContext* cdm_context, |
95 const InitCB& init_cb, | 95 const InitCB& init_cb, |
96 const OutputCB& output_cb)); | 96 const OutputCB& output_cb)); |
97 MOCK_METHOD2(Decode, void(const scoped_refptr<DecoderBuffer>& buffer, | 97 MOCK_METHOD2(Decode, void(const scoped_refptr<DecoderBuffer>& buffer, |
98 const DecodeCB&)); | 98 const DecodeCB&)); |
99 MOCK_METHOD1(Reset, void(const base::Closure&)); | 99 MOCK_METHOD1(Reset, void(const base::Closure&)); |
100 MOCK_CONST_METHOD0(HasAlpha, bool()); | 100 MOCK_CONST_METHOD0(HasAlpha, bool()); |
101 | 101 |
102 private: | 102 private: |
103 DISALLOW_COPY_AND_ASSIGN(MockVideoDecoder); | 103 DISALLOW_COPY_AND_ASSIGN(MockVideoDecoder); |
104 }; | 104 }; |
105 | 105 |
106 class MockAudioDecoder : public AudioDecoder { | 106 class MockAudioDecoder : public AudioDecoder { |
107 public: | 107 public: |
108 MockAudioDecoder(); | 108 MockAudioDecoder(); |
109 virtual ~MockAudioDecoder(); | 109 virtual ~MockAudioDecoder(); |
110 | 110 |
111 // AudioDecoder implementation. | 111 // AudioDecoder implementation. |
112 virtual std::string GetDisplayName() const; | 112 virtual std::string GetDisplayName() const; |
113 MOCK_METHOD4(Initialize, | 113 MOCK_METHOD4(Initialize, |
114 void(const AudioDecoderConfig& config, | 114 void(const AudioDecoderConfig& config, |
115 const SetCdmReadyCB& set_cdm_ready_cb, | 115 CdmContext* cdm_context, |
116 const InitCB& init_cb, | 116 const InitCB& init_cb, |
117 const OutputCB& output_cb)); | 117 const OutputCB& output_cb)); |
118 MOCK_METHOD2(Decode, | 118 MOCK_METHOD2(Decode, |
119 void(const scoped_refptr<DecoderBuffer>& buffer, | 119 void(const scoped_refptr<DecoderBuffer>& buffer, |
120 const DecodeCB&)); | 120 const DecodeCB&)); |
121 MOCK_METHOD1(Reset, void(const base::Closure&)); | 121 MOCK_METHOD1(Reset, void(const base::Closure&)); |
122 | 122 |
123 private: | 123 private: |
124 DISALLOW_COPY_AND_ASSIGN(MockAudioDecoder); | 124 DISALLOW_COPY_AND_ASSIGN(MockAudioDecoder); |
125 }; | 125 }; |
126 | 126 |
127 class MockVideoRenderer : public VideoRenderer { | 127 class MockVideoRenderer : public VideoRenderer { |
128 public: | 128 public: |
129 MockVideoRenderer(); | 129 MockVideoRenderer(); |
130 virtual ~MockVideoRenderer(); | 130 virtual ~MockVideoRenderer(); |
131 | 131 |
132 // VideoRenderer implementation. | 132 // VideoRenderer implementation. |
133 MOCK_METHOD9(Initialize, | 133 MOCK_METHOD9(Initialize, |
134 void(DemuxerStream* stream, | 134 void(DemuxerStream* stream, |
135 const PipelineStatusCB& init_cb, | 135 const PipelineStatusCB& init_cb, |
136 const SetCdmReadyCB& set_cdm_ready_cb, | 136 CdmContext* cdm_context, |
137 const StatisticsCB& statistics_cb, | 137 const StatisticsCB& statistics_cb, |
138 const BufferingStateCB& buffering_state_cb, | 138 const BufferingStateCB& buffering_state_cb, |
139 const base::Closure& ended_cb, | 139 const base::Closure& ended_cb, |
140 const PipelineStatusCB& error_cb, | 140 const PipelineStatusCB& error_cb, |
141 const TimeSource::WallClockTimeCB& wall_clock_time_cb, | 141 const TimeSource::WallClockTimeCB& wall_clock_time_cb, |
142 const base::Closure& waiting_for_decryption_key_cb)); | 142 const base::Closure& waiting_for_decryption_key_cb)); |
143 MOCK_METHOD1(Flush, void(const base::Closure& callback)); | 143 MOCK_METHOD1(Flush, void(const base::Closure& callback)); |
144 MOCK_METHOD1(StartPlayingFrom, void(base::TimeDelta)); | 144 MOCK_METHOD1(StartPlayingFrom, void(base::TimeDelta)); |
145 MOCK_METHOD1(OnTimeStateChanged, void(bool)); | 145 MOCK_METHOD1(OnTimeStateChanged, void(bool)); |
146 | 146 |
147 private: | 147 private: |
148 DISALLOW_COPY_AND_ASSIGN(MockVideoRenderer); | 148 DISALLOW_COPY_AND_ASSIGN(MockVideoRenderer); |
149 }; | 149 }; |
150 | 150 |
151 class MockAudioRenderer : public AudioRenderer { | 151 class MockAudioRenderer : public AudioRenderer { |
152 public: | 152 public: |
153 MockAudioRenderer(); | 153 MockAudioRenderer(); |
154 virtual ~MockAudioRenderer(); | 154 virtual ~MockAudioRenderer(); |
155 | 155 |
156 // AudioRenderer implementation. | 156 // AudioRenderer implementation. |
157 MOCK_METHOD8(Initialize, | 157 MOCK_METHOD8(Initialize, |
158 void(DemuxerStream* stream, | 158 void(DemuxerStream* stream, |
159 const PipelineStatusCB& init_cb, | 159 const PipelineStatusCB& init_cb, |
160 const SetCdmReadyCB& set_cdm_ready_cb, | 160 CdmContext* cdm_context, |
161 const StatisticsCB& statistics_cb, | 161 const StatisticsCB& statistics_cb, |
162 const BufferingStateCB& buffering_state_cb, | 162 const BufferingStateCB& buffering_state_cb, |
163 const base::Closure& ended_cb, | 163 const base::Closure& ended_cb, |
164 const PipelineStatusCB& error_cb, | 164 const PipelineStatusCB& error_cb, |
165 const base::Closure& waiting_for_decryption_key_cb)); | 165 const base::Closure& waiting_for_decryption_key_cb)); |
166 MOCK_METHOD0(GetTimeSource, TimeSource*()); | 166 MOCK_METHOD0(GetTimeSource, TimeSource*()); |
167 MOCK_METHOD1(Flush, void(const base::Closure& callback)); | 167 MOCK_METHOD1(Flush, void(const base::Closure& callback)); |
168 MOCK_METHOD0(StartPlaying, void()); | 168 MOCK_METHOD0(StartPlaying, void()); |
169 MOCK_METHOD1(SetVolume, void(float volume)); | 169 MOCK_METHOD1(SetVolume, void(float volume)); |
170 | 170 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 MOCK_METHOD0(GetDecryptor, Decryptor*()); | 273 MOCK_METHOD0(GetDecryptor, Decryptor*()); |
274 int GetCdmId() const override; | 274 int GetCdmId() const override; |
275 | 275 |
276 private: | 276 private: |
277 DISALLOW_COPY_AND_ASSIGN(MockCdmContext); | 277 DISALLOW_COPY_AND_ASSIGN(MockCdmContext); |
278 }; | 278 }; |
279 | 279 |
280 } // namespace media | 280 } // namespace media |
281 | 281 |
282 #endif // MEDIA_BASE_MOCK_FILTERS_H_ | 282 #endif // MEDIA_BASE_MOCK_FILTERS_H_ |
OLD | NEW |