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

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

Issue 10173012: Fix VideoRendererBase to allow the decoder to be flushed with a pending read. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor fixes based on comments. Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | media/filters/video_renderer_base.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 // A new breed of mock media filters, this time using gmock! Feel free to add 5 // A new breed of mock media filters, this time using gmock! Feel free to add
6 // actions if you need interesting side-effects (i.e., copying data to the 6 // actions if you need interesting side-effects (i.e., copying data to the
7 // buffer passed into MockDataSource::Read()). 7 // buffer passed into MockDataSource::Read()).
8 // 8 //
9 // Don't forget you can use StrictMock<> and NiceMock<> if you want the mock 9 // Don't forget you can use StrictMock<> and NiceMock<> if you want the mock
10 // filters to fail the test or do nothing when an unexpected method is called. 10 // filters to fail the test or do nothing when an unexpected method is called.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 private: 141 private:
142 DISALLOW_COPY_AND_ASSIGN(MockDemuxerStream); 142 DISALLOW_COPY_AND_ASSIGN(MockDemuxerStream);
143 }; 143 };
144 144
145 class MockVideoDecoder : public VideoDecoder { 145 class MockVideoDecoder : public VideoDecoder {
146 public: 146 public:
147 MockVideoDecoder(); 147 MockVideoDecoder();
148 148
149 // Filter implementation. 149 // Filter implementation.
150 MOCK_METHOD1(Flush, void(const base::Closure& callback));
150 MOCK_METHOD1(Stop, void(const base::Closure& callback)); 151 MOCK_METHOD1(Stop, void(const base::Closure& callback));
151 MOCK_METHOD1(SetPlaybackRate, void(float playback_rate)); 152 MOCK_METHOD1(SetPlaybackRate, void(float playback_rate));
152 MOCK_METHOD2(Seek, void(base::TimeDelta time, const PipelineStatusCB& cb)); 153 MOCK_METHOD2(Seek, void(base::TimeDelta time, const PipelineStatusCB& cb));
153 MOCK_METHOD0(OnAudioRendererDisabled, void()); 154 MOCK_METHOD0(OnAudioRendererDisabled, void());
154 155
155 // VideoDecoder implementation. 156 // VideoDecoder implementation.
156 MOCK_METHOD3(Initialize, void(DemuxerStream* stream, 157 MOCK_METHOD3(Initialize, void(DemuxerStream* stream,
157 const PipelineStatusCB& status_cb, 158 const PipelineStatusCB& status_cb,
158 const StatisticsCB& statistics_cb)); 159 const StatisticsCB& statistics_cb));
159 MOCK_METHOD1(Read, void(const ReadCB& read_cb)); 160 MOCK_METHOD1(Read, void(const ReadCB& read_cb));
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 public: 309 public:
309 MockStatisticsCB(); 310 MockStatisticsCB();
310 ~MockStatisticsCB(); 311 ~MockStatisticsCB();
311 312
312 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); 313 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics));
313 }; 314 };
314 315
315 } // namespace media 316 } // namespace media
316 317
317 #endif // MEDIA_BASE_MOCK_FILTERS_H_ 318 #endif // MEDIA_BASE_MOCK_FILTERS_H_
OLDNEW
« no previous file with comments | « no previous file | media/filters/video_renderer_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698