| OLD | NEW |
| 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 // Audio rendering unit utilizing AudioDevice. | 5 // Audio rendering unit utilizing AudioDevice. |
| 6 // | 6 // |
| 7 // This class lives inside three threads during it's lifetime, namely: | 7 // This class lives inside three threads during it's lifetime, namely: |
| 8 // 1. Render thread. | 8 // 1. Render thread. |
| 9 // This object is created on the render thread. | 9 // This object is created on the render thread. |
| 10 // 2. Pipeline thread | 10 // 2. Pipeline thread |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 // Methods called on Render thread ------------------------------------------ | 37 // Methods called on Render thread ------------------------------------------ |
| 38 // An AudioRendererSink is used as the destination for the rendered audio. | 38 // An AudioRendererSink is used as the destination for the rendered audio. |
| 39 explicit AudioRendererImpl(media::AudioRendererSink* sink); | 39 explicit AudioRendererImpl(media::AudioRendererSink* sink); |
| 40 virtual ~AudioRendererImpl(); | 40 virtual ~AudioRendererImpl(); |
| 41 | 41 |
| 42 // Methods called on pipeline thread ---------------------------------------- | 42 // Methods called on pipeline thread ---------------------------------------- |
| 43 // media::Filter implementation. | 43 // media::Filter implementation. |
| 44 virtual void SetPlaybackRate(float rate) OVERRIDE; | 44 virtual void SetPlaybackRate(float rate) OVERRIDE; |
| 45 virtual void Pause(const base::Closure& callback) OVERRIDE; | 45 virtual void Pause(const base::Closure& callback) OVERRIDE; |
| 46 virtual void Seek(base::TimeDelta time, | 46 virtual void Seek(base::TimeDelta time, |
| 47 const media::FilterStatusCB& cb) OVERRIDE; | 47 const media::PipelineStatusCB& cb) OVERRIDE; |
| 48 virtual void Play(const base::Closure& callback) OVERRIDE; | 48 virtual void Play(const base::Closure& callback) OVERRIDE; |
| 49 | 49 |
| 50 // media::AudioRenderer implementation. | 50 // media::AudioRenderer implementation. |
| 51 virtual void SetVolume(float volume) OVERRIDE; | 51 virtual void SetVolume(float volume) OVERRIDE; |
| 52 | 52 |
| 53 protected: | 53 protected: |
| 54 // Methods called on pipeline thread ---------------------------------------- | 54 // Methods called on pipeline thread ---------------------------------------- |
| 55 // These methods are called from AudioRendererBase. | 55 // These methods are called from AudioRendererBase. |
| 56 virtual bool OnInitialize(int bits_per_channel, | 56 virtual bool OnInitialize(int bits_per_channel, |
| 57 ChannelLayout channel_layout, | 57 ChannelLayout channel_layout, |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 // know when that particular data would start playing, but it is much better | 128 // know when that particular data would start playing, but it is much better |
| 129 // than nothing. | 129 // than nothing. |
| 130 base::Time earliest_end_time_; | 130 base::Time earliest_end_time_; |
| 131 | 131 |
| 132 AudioParameters audio_parameters_; | 132 AudioParameters audio_parameters_; |
| 133 | 133 |
| 134 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); | 134 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); |
| 135 }; | 135 }; |
| 136 | 136 |
| 137 #endif // CONTENT_RENDERER_MEDIA_AUDIO_RENDERER_IMPL_H_ | 137 #endif // CONTENT_RENDERER_MEDIA_AUDIO_RENDERER_IMPL_H_ |
| OLD | NEW |