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

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

Issue 6648004: DemuxerFactory is born! (Closed)
Patch Set: Responses to scherkus@ CR Created 9 years, 9 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 | « media/base/filter_factories.cc ('k') | media/base/mock_filters.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 virtual bool GetSize(int64* size_out) = 0; 128 virtual bool GetSize(int64* size_out) = 0;
129 129
130 // Returns true if we are performing streaming. In this case seeking is 130 // Returns true if we are performing streaming. In this case seeking is
131 // not possible. 131 // not possible.
132 virtual bool IsStreaming() = 0; 132 virtual bool IsStreaming() = 0;
133 }; 133 };
134 134
135 135
136 class Demuxer : public Filter { 136 class Demuxer : public Filter {
137 public: 137 public:
138 // Initialize a Demuxer with the given DataSource, executing the callback upon
139 // completion.
140 virtual void Initialize(DataSource* data_source,
141 FilterCallback* callback) = 0;
142
143 // Returns the number of streams available 138 // Returns the number of streams available
144 virtual size_t GetNumberOfStreams() = 0; 139 virtual size_t GetNumberOfStreams() = 0;
145 140
146 // Returns the stream for the given index, NULL otherwise 141 // Returns the stream for the given index, NULL otherwise
147 virtual scoped_refptr<DemuxerStream> GetStream(int stream_id) = 0; 142 virtual scoped_refptr<DemuxerStream> GetStream(int stream_id) = 0;
148 }; 143 };
149 144
150 145
151 class DemuxerStream : public base::RefCountedThreadSafe<DemuxerStream> { 146 class DemuxerStream : public base::RefCountedThreadSafe<DemuxerStream> {
152 public: 147 public:
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 // buffer. 291 // buffer.
297 virtual bool HasEnded() = 0; 292 virtual bool HasEnded() = 0;
298 293
299 // Sets the output volume. 294 // Sets the output volume.
300 virtual void SetVolume(float volume) = 0; 295 virtual void SetVolume(float volume) = 0;
301 }; 296 };
302 297
303 } // namespace media 298 } // namespace media
304 299
305 #endif // MEDIA_BASE_FILTERS_H_ 300 #endif // MEDIA_BASE_FILTERS_H_
OLDNEW
« no previous file with comments | « media/base/filter_factories.cc ('k') | media/base/mock_filters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698