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

Side by Side Diff: media/base/mock_filters.h

Issue 297553002: Add callback in VideoDecoder and AudioDecoder to return decoded frames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « media/base/audio_decoder.cc ('k') | media/base/video_decoder.h » ('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_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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 DISALLOW_COPY_AND_ASSIGN(MockDemuxerStream); 70 DISALLOW_COPY_AND_ASSIGN(MockDemuxerStream);
71 }; 71 };
72 72
73 class MockVideoDecoder : public VideoDecoder { 73 class MockVideoDecoder : public VideoDecoder {
74 public: 74 public:
75 MockVideoDecoder(); 75 MockVideoDecoder();
76 virtual ~MockVideoDecoder(); 76 virtual ~MockVideoDecoder();
77 77
78 // VideoDecoder implementation. 78 // VideoDecoder implementation.
79 MOCK_METHOD3(Initialize, void(const VideoDecoderConfig& config, 79 MOCK_METHOD4(Initialize, void(const VideoDecoderConfig& config,
80 bool low_delay, 80 bool low_delay,
81 const PipelineStatusCB&)); 81 const PipelineStatusCB& status_cb,
82 const OutputCB& output_cb));
82 MOCK_METHOD2(Decode, void(const scoped_refptr<DecoderBuffer>& buffer, 83 MOCK_METHOD2(Decode, void(const scoped_refptr<DecoderBuffer>& buffer,
83 const DecodeCB&)); 84 const DecodeCB&));
84 MOCK_METHOD1(Reset, void(const base::Closure&)); 85 MOCK_METHOD1(Reset, void(const base::Closure&));
85 MOCK_METHOD0(Stop, void()); 86 MOCK_METHOD0(Stop, void());
86 MOCK_CONST_METHOD0(HasAlpha, bool()); 87 MOCK_CONST_METHOD0(HasAlpha, bool());
87 88
88 private: 89 private:
89 DISALLOW_COPY_AND_ASSIGN(MockVideoDecoder); 90 DISALLOW_COPY_AND_ASSIGN(MockVideoDecoder);
90 }; 91 };
91 92
92 class MockAudioDecoder : public AudioDecoder { 93 class MockAudioDecoder : public AudioDecoder {
93 public: 94 public:
94 MockAudioDecoder(); 95 MockAudioDecoder();
95 virtual ~MockAudioDecoder(); 96 virtual ~MockAudioDecoder();
96 97
97 // AudioDecoder implementation. 98 // AudioDecoder implementation.
98 MOCK_METHOD2(Initialize, void(const AudioDecoderConfig& config, 99 MOCK_METHOD3(Initialize,
99 const PipelineStatusCB&)); 100 void(const AudioDecoderConfig& config,
101 const PipelineStatusCB& status_cb,
102 const OutputCB& output_cb));
100 MOCK_METHOD2(Decode, 103 MOCK_METHOD2(Decode,
101 void(const scoped_refptr<DecoderBuffer>& buffer, 104 void(const scoped_refptr<DecoderBuffer>& buffer,
102 const DecodeCB&)); 105 const DecodeCB&));
103 MOCK_METHOD1(Reset, void(const base::Closure&)); 106 MOCK_METHOD1(Reset, void(const base::Closure&));
104 MOCK_METHOD0(Stop, void()); 107 MOCK_METHOD0(Stop, void());
105 108
106 private: 109 private:
107 DISALLOW_COPY_AND_ASSIGN(MockAudioDecoder); 110 DISALLOW_COPY_AND_ASSIGN(MockAudioDecoder);
108 }; 111 };
109 112
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 public: 211 public:
209 MockStatisticsCB(); 212 MockStatisticsCB();
210 ~MockStatisticsCB(); 213 ~MockStatisticsCB();
211 214
212 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); 215 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics));
213 }; 216 };
214 217
215 } // namespace media 218 } // namespace media
216 219
217 #endif // MEDIA_BASE_MOCK_FILTERS_H_ 220 #endif // MEDIA_BASE_MOCK_FILTERS_H_
OLDNEW
« no previous file with comments | « media/base/audio_decoder.cc ('k') | media/base/video_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698