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

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

Issue 7867051: Introduce AudioDecoderConfig to migrate away from GetAVStream(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: samples_per_second Created 9 years, 3 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/demuxer_stream.h ('k') | media/base/media_log.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 // Installs a permanent callback for passing decoded audio output. 224 // Installs a permanent callback for passing decoded audio output.
225 typedef base::Callback<void(scoped_refptr<Buffer>)> ConsumeAudioSamplesCB; 225 typedef base::Callback<void(scoped_refptr<Buffer>)> ConsumeAudioSamplesCB;
226 void set_consume_audio_samples_callback( 226 void set_consume_audio_samples_callback(
227 const ConsumeAudioSamplesCB& callback) { 227 const ConsumeAudioSamplesCB& callback) {
228 consume_audio_samples_callback_ = callback; 228 consume_audio_samples_callback_ = callback;
229 } 229 }
230 230
231 // Returns various information about the decoded audio format. 231 // Returns various information about the decoded audio format.
232 virtual int bits_per_channel() = 0; 232 virtual int bits_per_channel() = 0;
233 virtual ChannelLayout channel_layout() = 0; 233 virtual ChannelLayout channel_layout() = 0;
234 virtual int sample_rate() = 0; 234 virtual int samples_per_second() = 0;
235 235
236 protected: 236 protected:
237 AudioDecoder(); 237 AudioDecoder();
238 virtual ~AudioDecoder(); 238 virtual ~AudioDecoder();
239 239
240 // Executes the permanent callback to pass off decoded audio. 240 // Executes the permanent callback to pass off decoded audio.
241 void ConsumeAudioSamples(scoped_refptr<Buffer> buffer); 241 void ConsumeAudioSamples(scoped_refptr<Buffer> buffer);
242 242
243 private: 243 private:
244 ConsumeAudioSamplesCB consume_audio_samples_callback_; 244 ConsumeAudioSamplesCB consume_audio_samples_callback_;
(...skipping 23 matching lines...) Expand all
268 // buffer. 268 // buffer.
269 virtual bool HasEnded() = 0; 269 virtual bool HasEnded() = 0;
270 270
271 // Sets the output volume. 271 // Sets the output volume.
272 virtual void SetVolume(float volume) = 0; 272 virtual void SetVolume(float volume) = 0;
273 }; 273 };
274 274
275 } // namespace media 275 } // namespace media
276 276
277 #endif // MEDIA_BASE_FILTERS_H_ 277 #endif // MEDIA_BASE_FILTERS_H_
OLDNEW
« no previous file with comments | « media/base/demuxer_stream.h ('k') | media/base/media_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698