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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 DISALLOW_COPY_AND_ASSIGN(MockDemuxerStream); | 72 DISALLOW_COPY_AND_ASSIGN(MockDemuxerStream); |
73 }; | 73 }; |
74 | 74 |
75 class MockVideoDecoder : public VideoDecoder { | 75 class MockVideoDecoder : public VideoDecoder { |
76 public: | 76 public: |
77 MockVideoDecoder(); | 77 MockVideoDecoder(); |
78 virtual ~MockVideoDecoder(); | 78 virtual ~MockVideoDecoder(); |
79 | 79 |
80 // VideoDecoder implementation. | 80 // VideoDecoder implementation. |
| 81 virtual std::string GetDisplayName() const; |
81 MOCK_METHOD4(Initialize, void(const VideoDecoderConfig& config, | 82 MOCK_METHOD4(Initialize, void(const VideoDecoderConfig& config, |
82 bool low_delay, | 83 bool low_delay, |
83 const PipelineStatusCB& status_cb, | 84 const PipelineStatusCB& status_cb, |
84 const OutputCB& output_cb)); | 85 const OutputCB& output_cb)); |
85 MOCK_METHOD2(Decode, void(const scoped_refptr<DecoderBuffer>& buffer, | 86 MOCK_METHOD2(Decode, void(const scoped_refptr<DecoderBuffer>& buffer, |
86 const DecodeCB&)); | 87 const DecodeCB&)); |
87 MOCK_METHOD1(Reset, void(const base::Closure&)); | 88 MOCK_METHOD1(Reset, void(const base::Closure&)); |
88 MOCK_CONST_METHOD0(HasAlpha, bool()); | 89 MOCK_CONST_METHOD0(HasAlpha, bool()); |
89 | 90 |
90 private: | 91 private: |
91 DISALLOW_COPY_AND_ASSIGN(MockVideoDecoder); | 92 DISALLOW_COPY_AND_ASSIGN(MockVideoDecoder); |
92 }; | 93 }; |
93 | 94 |
94 class MockAudioDecoder : public AudioDecoder { | 95 class MockAudioDecoder : public AudioDecoder { |
95 public: | 96 public: |
96 MockAudioDecoder(); | 97 MockAudioDecoder(); |
97 virtual ~MockAudioDecoder(); | 98 virtual ~MockAudioDecoder(); |
98 | 99 |
99 // AudioDecoder implementation. | 100 // AudioDecoder implementation. |
| 101 virtual std::string GetDisplayName() const; |
100 MOCK_METHOD3(Initialize, | 102 MOCK_METHOD3(Initialize, |
101 void(const AudioDecoderConfig& config, | 103 void(const AudioDecoderConfig& config, |
102 const PipelineStatusCB& status_cb, | 104 const PipelineStatusCB& status_cb, |
103 const OutputCB& output_cb)); | 105 const OutputCB& output_cb)); |
104 MOCK_METHOD2(Decode, | 106 MOCK_METHOD2(Decode, |
105 void(const scoped_refptr<DecoderBuffer>& buffer, | 107 void(const scoped_refptr<DecoderBuffer>& buffer, |
106 const DecodeCB&)); | 108 const DecodeCB&)); |
107 MOCK_METHOD1(Reset, void(const base::Closure&)); | 109 MOCK_METHOD1(Reset, void(const base::Closure&)); |
108 | 110 |
109 private: | 111 private: |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 public: | 248 public: |
247 MockStatisticsCB(); | 249 MockStatisticsCB(); |
248 ~MockStatisticsCB(); | 250 ~MockStatisticsCB(); |
249 | 251 |
250 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); | 252 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); |
251 }; | 253 }; |
252 | 254 |
253 } // namespace media | 255 } // namespace media |
254 | 256 |
255 #endif // MEDIA_BASE_MOCK_FILTERS_H_ | 257 #endif // MEDIA_BASE_MOCK_FILTERS_H_ |
OLD | NEW |