| 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 #include "chromecast/media/cma/backend/alsa/stream_mixer_alsa.h" | 5 #include "chromecast/media/cma/backend/alsa/stream_mixer_alsa.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <unordered_set> | 10 #include <unordered_set> |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 178 |
| 179 class StreamMixerAlsaInstance : public StreamMixerAlsa { | 179 class StreamMixerAlsaInstance : public StreamMixerAlsa { |
| 180 public: | 180 public: |
| 181 StreamMixerAlsaInstance() {} | 181 StreamMixerAlsaInstance() {} |
| 182 ~StreamMixerAlsaInstance() override {} | 182 ~StreamMixerAlsaInstance() override {} |
| 183 | 183 |
| 184 private: | 184 private: |
| 185 DISALLOW_COPY_AND_ASSIGN(StreamMixerAlsaInstance); | 185 DISALLOW_COPY_AND_ASSIGN(StreamMixerAlsaInstance); |
| 186 }; | 186 }; |
| 187 | 187 |
| 188 base::LazyInstance<StreamMixerAlsaInstance> g_mixer_instance = | 188 base::LazyInstance<StreamMixerAlsaInstance>::DestructorAtExit g_mixer_instance = |
| 189 LAZY_INSTANCE_INITIALIZER; | 189 LAZY_INSTANCE_INITIALIZER; |
| 190 | 190 |
| 191 } // namespace | 191 } // namespace |
| 192 | 192 |
| 193 // static | 193 // static |
| 194 bool StreamMixerAlsa::single_threaded_for_test_ = false; | 194 bool StreamMixerAlsa::single_threaded_for_test_ = false; |
| 195 | 195 |
| 196 // static | 196 // static |
| 197 StreamMixerAlsa* StreamMixerAlsa::Get() { | 197 StreamMixerAlsa* StreamMixerAlsa::Get() { |
| 198 return g_mixer_instance.Pointer(); | 198 return g_mixer_instance.Pointer(); |
| (...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 962 DCHECK(std::find(loopback_observers_.begin(), loopback_observers_.end(), | 962 DCHECK(std::find(loopback_observers_.begin(), loopback_observers_.end(), |
| 963 observer) != loopback_observers_.end()); | 963 observer) != loopback_observers_.end()); |
| 964 loopback_observers_.erase(std::remove(loopback_observers_.begin(), | 964 loopback_observers_.erase(std::remove(loopback_observers_.begin(), |
| 965 loopback_observers_.end(), observer), | 965 loopback_observers_.end(), observer), |
| 966 loopback_observers_.end()); | 966 loopback_observers_.end()); |
| 967 observer->OnRemoved(); | 967 observer->OnRemoved(); |
| 968 } | 968 } |
| 969 | 969 |
| 970 } // namespace media | 970 } // namespace media |
| 971 } // namespace chromecast | 971 } // namespace chromecast |
| OLD | NEW |