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

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

Issue 149356: Wrote gmock-based mock filters and a mock filter factory. (Closed)
Patch Set: Created 11 years, 5 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
« no previous file with comments | « no previous file | media/base/mock_filters.h » ('j') | media/base/mock_filters.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 // Filters are connected in a strongly typed manner, with downstream filters 5 // Filters are connected in a strongly typed manner, with downstream filters
6 // always reading data from upstream filters. Upstream filters have no clue 6 // always reading data from upstream filters. Upstream filters have no clue
7 // who is actually reading from them, and return the results via callbacks. 7 // who is actually reading from them, and return the results via callbacks.
8 // 8 //
9 // DemuxerStream(Video) <- VideoDecoder <- VideoRenderer 9 // DemuxerStream(Video) <- VideoDecoder <- VideoRenderer
10 // DataSource <- Demuxer < 10 // DataSource <- Demuxer <
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 238
239 // Initializes this filter, returns true if successful, false otherwise. 239 // Initializes this filter, returns true if successful, false otherwise.
240 virtual bool Initialize(DemuxerStream* demuxer_stream) = 0; 240 virtual bool Initialize(DemuxerStream* demuxer_stream) = 0;
241 241
242 // Returns the MediaFormat for this filter. 242 // Returns the MediaFormat for this filter.
243 virtual const MediaFormat& media_format() = 0; 243 virtual const MediaFormat& media_format() = 0;
244 244
245 // Schedules a read. Decoder takes ownership of the callback. 245 // Schedules a read. Decoder takes ownership of the callback.
246 // 246 //
247 // TODO(scherkus): switch Read() callback to scoped_refptr<>. 247 // TODO(scherkus): switch Read() callback to scoped_refptr<>.
248 virtual void Read(Callback1<Buffer*>::Type* read_callbasck) = 0; 248 virtual void Read(Callback1<Buffer*>::Type* read_callback) = 0;
249 }; 249 };
250 250
251 251
252 class VideoRenderer : public MediaFilter { 252 class VideoRenderer : public MediaFilter {
253 public: 253 public:
254 static const FilterType filter_type() { 254 static const FilterType filter_type() {
255 return FILTER_VIDEO_RENDERER; 255 return FILTER_VIDEO_RENDERER;
256 } 256 }
257 257
258 static const char* major_mime_type() { 258 static const char* major_mime_type() {
(...skipping 18 matching lines...) Expand all
277 // Initializes this filter, returns true if successful, false otherwise. 277 // Initializes this filter, returns true if successful, false otherwise.
278 virtual bool Initialize(AudioDecoder* decoder) = 0; 278 virtual bool Initialize(AudioDecoder* decoder) = 0;
279 279
280 // Sets the output volume. 280 // Sets the output volume.
281 virtual void SetVolume(float volume) = 0; 281 virtual void SetVolume(float volume) = 0;
282 }; 282 };
283 283
284 } // namespace media 284 } // namespace media
285 285
286 #endif // MEDIA_BASE_FILTERS_H_ 286 #endif // MEDIA_BASE_FILTERS_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/mock_filters.h » ('j') | media/base/mock_filters.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698