OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef CHROMECAST_MEDIA_CMA_BACKEND_ALSA_STREAM_MIXER_ALSA_INPUT_IMPL_H_ | 5 #ifndef CHROMECAST_MEDIA_CMA_BACKEND_ALSA_STREAM_MIXER_ALSA_INPUT_IMPL_H_ |
6 #define CHROMECAST_MEDIA_CMA_BACKEND_ALSA_STREAM_MIXER_ALSA_INPUT_IMPL_H_ | 6 #define CHROMECAST_MEDIA_CMA_BACKEND_ALSA_STREAM_MIXER_ALSA_INPUT_IMPL_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 void FadeOut(::media::AudioBus* dest, int frames); | 139 void FadeOut(::media::AudioBus* dest, int frames); |
140 void PostError(StreamMixerAlsaInput::MixerError error); | 140 void PostError(StreamMixerAlsaInput::MixerError error); |
141 | 141 |
142 StreamMixerAlsaInput::Delegate* const delegate_; | 142 StreamMixerAlsaInput::Delegate* const delegate_; |
143 const int input_samples_per_second_; | 143 const int input_samples_per_second_; |
144 const bool primary_; | 144 const bool primary_; |
145 StreamMixerAlsa* const mixer_; | 145 StreamMixerAlsa* const mixer_; |
146 const scoped_refptr<base::SingleThreadTaskRunner> mixer_task_runner_; | 146 const scoped_refptr<base::SingleThreadTaskRunner> mixer_task_runner_; |
147 const scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_; | 147 const scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_; |
148 | 148 |
| 149 double resample_ratio_; |
| 150 |
149 State state_; | 151 State state_; |
150 float volume_multiplier_; | 152 float volume_multiplier_; |
151 | 153 |
152 base::Lock queue_lock_; // Lock for the following queue-related members. | 154 base::Lock queue_lock_; // Lock for the following queue-related members. |
153 scoped_refptr<DecoderBufferBase> pending_data_; | 155 scoped_refptr<DecoderBufferBase> pending_data_; |
154 std::deque<scoped_refptr<DecoderBufferBase>> queue_; | 156 std::deque<scoped_refptr<DecoderBufferBase>> queue_; |
155 int queued_frames_; | 157 int queued_frames_; |
156 double queued_frames_including_resampler_; | 158 double queued_frames_including_resampler_; |
157 MediaPipelineBackendAlsa::RenderingDelay mixer_rendering_delay_; | 159 MediaPipelineBackendAlsa::RenderingDelay mixer_rendering_delay_; |
158 // End of members that queue_lock_ controls access for. | 160 // End of members that queue_lock_ controls access for. |
(...skipping 11 matching lines...) Expand all Loading... |
170 base::WeakPtr<StreamMixerAlsaInputImpl> weak_this_; | 172 base::WeakPtr<StreamMixerAlsaInputImpl> weak_this_; |
171 base::WeakPtrFactory<StreamMixerAlsaInputImpl> weak_factory_; | 173 base::WeakPtrFactory<StreamMixerAlsaInputImpl> weak_factory_; |
172 | 174 |
173 DISALLOW_COPY_AND_ASSIGN(StreamMixerAlsaInputImpl); | 175 DISALLOW_COPY_AND_ASSIGN(StreamMixerAlsaInputImpl); |
174 }; | 176 }; |
175 | 177 |
176 } // namespace media | 178 } // namespace media |
177 } // namespace chromecast | 179 } // namespace chromecast |
178 | 180 |
179 #endif // CHROMECAST_MEDIA_CMA_BACKEND_ALSA_STREAM_MIXER_ALSA_INPUT_IMPL_H_ | 181 #endif // CHROMECAST_MEDIA_CMA_BACKEND_ALSA_STREAM_MIXER_ALSA_INPUT_IMPL_H_ |
OLD | NEW |