OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2014 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 rtc::CritScope lock(&sink_lock_); | 141 rtc::CritScope lock(&sink_lock_); |
142 for (auto* sink : sinks_) { | 142 for (auto* sink : sinks_) { |
143 sink->OnData(audio.data, 16, audio.sample_rate, audio.channels, | 143 sink->OnData(audio.data, 16, audio.sample_rate, audio.channels, |
144 audio.samples_per_channel); | 144 audio.samples_per_channel); |
145 } | 145 } |
146 } | 146 } |
147 | 147 |
148 void RemoteAudioSource::OnAudioProviderGone() { | 148 void RemoteAudioSource::OnAudioProviderGone() { |
149 // Called when the data provider is deleted. It may be the worker thread | 149 // Called when the data provider is deleted. It may be the worker thread |
150 // in libjingle or may be a different worker thread. | 150 // in libjingle or may be a different worker thread. |
151 main_thread_->Post(new MessageHandler(this)); | 151 main_thread_->Post(RTC_FROM_HERE, new MessageHandler(this)); |
152 } | 152 } |
153 | 153 |
154 void RemoteAudioSource::OnMessage(rtc::Message* msg) { | 154 void RemoteAudioSource::OnMessage(rtc::Message* msg) { |
155 RTC_DCHECK(main_thread_->IsCurrent()); | 155 RTC_DCHECK(main_thread_->IsCurrent()); |
156 sinks_.clear(); | 156 sinks_.clear(); |
157 state_ = MediaSourceInterface::kEnded; | 157 state_ = MediaSourceInterface::kEnded; |
158 FireOnChanged(); | 158 FireOnChanged(); |
159 } | 159 } |
160 | 160 |
161 } // namespace webrtc | 161 } // namespace webrtc |
OLD | NEW |