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

Side by Side Diff: content/renderer/media/audio_renderer_impl.h

Issue 7796033: Replace AudioDecoderConfig with simple accessors on AudioDecoder. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebase 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 | « no previous file | content/renderer/media/audio_renderer_impl.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 // Audio rendering unit utilizing audio output stream provided by browser 5 // Audio rendering unit utilizing audio output stream provided by browser
6 // process through IPC. 6 // process through IPC.
7 // 7 //
8 // Relationship of classes. 8 // Relationship of classes.
9 // 9 //
10 // AudioRendererHost AudioRendererImpl 10 // AudioRendererHost AudioRendererImpl
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 virtual void Pause(media::FilterCallback* callback); 78 virtual void Pause(media::FilterCallback* callback);
79 virtual void Seek(base::TimeDelta time, const media::FilterStatusCB& cb); 79 virtual void Seek(base::TimeDelta time, const media::FilterStatusCB& cb);
80 virtual void Play(media::FilterCallback* callback); 80 virtual void Play(media::FilterCallback* callback);
81 81
82 // media::AudioRenderer implementation. 82 // media::AudioRenderer implementation.
83 virtual void SetVolume(float volume); 83 virtual void SetVolume(float volume);
84 84
85 protected: 85 protected:
86 // Methods called on audio renderer thread ---------------------------------- 86 // Methods called on audio renderer thread ----------------------------------
87 // These methods are called from AudioRendererBase. 87 // These methods are called from AudioRendererBase.
88 virtual bool OnInitialize(const media::AudioDecoderConfig& config); 88 virtual bool OnInitialize(int bits_per_channel,
89 ChannelLayout channel_layout,
90 int sample_rate);
89 virtual void OnStop(); 91 virtual void OnStop();
90 92
91 // Called when the decoder completes a Read(). 93 // Called when the decoder completes a Read().
92 virtual void ConsumeAudioSamples(scoped_refptr<media::Buffer> buffer_in); 94 virtual void ConsumeAudioSamples(scoped_refptr<media::Buffer> buffer_in);
93 95
94 private: 96 private:
95 // We are using either low- or high-latency code path. 97 // We are using either low- or high-latency code path.
96 enum LatencyType { 98 enum LatencyType {
97 kUninitializedLatency = 0, 99 kUninitializedLatency = 0,
98 kLowLatency, 100 kLowLatency,
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 // remember when it should stop playing, and do not assume that buffer is 222 // remember when it should stop playing, and do not assume that buffer is
221 // empty till that time. Workaround is not bulletproof, as we don't exactly 223 // empty till that time. Workaround is not bulletproof, as we don't exactly
222 // know when that particular data would start playing, but it is much better 224 // know when that particular data would start playing, but it is much better
223 // than nothing. 225 // than nothing.
224 base::Time earliest_end_time_; 226 base::Time earliest_end_time_;
225 227
226 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); 228 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl);
227 }; 229 };
228 230
229 #endif // CONTENT_RENDERER_MEDIA_AUDIO_RENDERER_IMPL_H_ 231 #endif // CONTENT_RENDERER_MEDIA_AUDIO_RENDERER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/audio_renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698