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 26 matching lines...) Expand all Loading... |
37 MOCK_METHOD0(OnAudioRendererDisabled, void()); | 37 MOCK_METHOD0(OnAudioRendererDisabled, void()); |
38 MOCK_METHOD1(GetStream, DemuxerStream*(DemuxerStream::Type)); | 38 MOCK_METHOD1(GetStream, DemuxerStream*(DemuxerStream::Type)); |
39 MOCK_CONST_METHOD0(GetStartTime, base::TimeDelta()); | 39 MOCK_CONST_METHOD0(GetStartTime, base::TimeDelta()); |
40 | 40 |
41 private: | 41 private: |
42 DISALLOW_COPY_AND_ASSIGN(MockDemuxer); | 42 DISALLOW_COPY_AND_ASSIGN(MockDemuxer); |
43 }; | 43 }; |
44 | 44 |
45 class MockDemuxerStream : public DemuxerStream { | 45 class MockDemuxerStream : public DemuxerStream { |
46 public: | 46 public: |
47 MockDemuxerStream(DemuxerStream::Type type); | 47 explicit MockDemuxerStream(DemuxerStream::Type type); |
48 virtual ~MockDemuxerStream(); | 48 virtual ~MockDemuxerStream(); |
49 | 49 |
50 // DemuxerStream implementation. | 50 // DemuxerStream implementation. |
51 virtual Type type() OVERRIDE; | 51 virtual Type type() OVERRIDE; |
52 MOCK_METHOD1(Read, void(const ReadCB& read_cb)); | 52 MOCK_METHOD1(Read, void(const ReadCB& read_cb)); |
53 virtual AudioDecoderConfig audio_decoder_config() OVERRIDE; | 53 virtual AudioDecoderConfig audio_decoder_config() OVERRIDE; |
54 virtual VideoDecoderConfig video_decoder_config() OVERRIDE; | 54 virtual VideoDecoderConfig video_decoder_config() OVERRIDE; |
55 MOCK_METHOD0(EnableBitstreamConverter, void()); | 55 MOCK_METHOD0(EnableBitstreamConverter, void()); |
56 | 56 |
57 void set_audio_decoder_config(const AudioDecoderConfig& config); | 57 void set_audio_decoder_config(const AudioDecoderConfig& config); |
58 void set_video_decoder_config(const VideoDecoderConfig& config); | 58 void set_video_decoder_config(const VideoDecoderConfig& config); |
59 | 59 |
60 private: | 60 private: |
61 DemuxerStream::Type type_; | 61 DemuxerStream::Type type_; |
62 AudioDecoderConfig audio_decoder_config_; | 62 AudioDecoderConfig audio_decoder_config_; |
63 VideoDecoderConfig video_decoder_config_; | 63 VideoDecoderConfig video_decoder_config_; |
64 | 64 |
65 DISALLOW_COPY_AND_ASSIGN(MockDemuxerStream); | 65 DISALLOW_COPY_AND_ASSIGN(MockDemuxerStream); |
66 }; | 66 }; |
67 | 67 |
68 class MockVideoDecoder : public VideoDecoder { | 68 class MockVideoDecoder : public VideoDecoder { |
69 public: | 69 public: |
70 MockVideoDecoder(); | 70 MockVideoDecoder(); |
71 virtual ~MockVideoDecoder(); | 71 virtual ~MockVideoDecoder(); |
72 | 72 |
73 // VideoDecoder implementation. | 73 // VideoDecoder implementation. |
74 MOCK_METHOD3(Initialize, void(DemuxerStream*, | 74 MOCK_METHOD3(Initialize, void(const VideoDecoderConfig& config, |
75 const PipelineStatusCB&, | 75 const PipelineStatusCB&, |
76 const StatisticsCB&)); | 76 const StatisticsCB&)); |
77 MOCK_METHOD1(Read, void(const ReadCB&)); | 77 MOCK_METHOD2(Decode, void(const scoped_refptr<DecoderBuffer>& buffer, |
| 78 const ReadCB&)); |
78 MOCK_METHOD1(Reset, void(const base::Closure&)); | 79 MOCK_METHOD1(Reset, void(const base::Closure&)); |
79 MOCK_METHOD1(Stop, void(const base::Closure&)); | 80 MOCK_METHOD1(Stop, void(const base::Closure&)); |
80 MOCK_CONST_METHOD0(HasAlpha, bool()); | 81 MOCK_CONST_METHOD0(HasAlpha, bool()); |
81 | 82 |
82 private: | 83 private: |
83 DISALLOW_COPY_AND_ASSIGN(MockVideoDecoder); | 84 DISALLOW_COPY_AND_ASSIGN(MockVideoDecoder); |
84 }; | 85 }; |
85 | 86 |
86 class MockAudioDecoder : public AudioDecoder { | 87 class MockAudioDecoder : public AudioDecoder { |
87 public: | 88 public: |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 public: | 191 public: |
191 MockStatisticsCB(); | 192 MockStatisticsCB(); |
192 ~MockStatisticsCB(); | 193 ~MockStatisticsCB(); |
193 | 194 |
194 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); | 195 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); |
195 }; | 196 }; |
196 | 197 |
197 } // namespace media | 198 } // namespace media |
198 | 199 |
199 #endif // MEDIA_BASE_MOCK_FILTERS_H_ | 200 #endif // MEDIA_BASE_MOCK_FILTERS_H_ |
OLD | NEW |