| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 return stats; | 121 return stats; |
| 122 } | 122 } |
| 123 | 123 |
| 124 AudioDecodingCallStats ChannelProxy::GetDecodingCallStatistics() const { | 124 AudioDecodingCallStats ChannelProxy::GetDecodingCallStatistics() const { |
| 125 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 125 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
| 126 AudioDecodingCallStats stats; | 126 AudioDecodingCallStats stats; |
| 127 channel()->GetDecodingCallStatistics(&stats); | 127 channel()->GetDecodingCallStatistics(&stats); |
| 128 return stats; | 128 return stats; |
| 129 } | 129 } |
| 130 | 130 |
| 131 int32_t ChannelProxy::GetSpeechOutputLevel() const { | 131 int ChannelProxy::GetSpeechOutputLevel() const { |
| 132 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 132 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
| 133 uint32_t level = 0; | 133 return channel()->GetSpeechOutputLevel(); |
| 134 int error = channel()->GetSpeechOutputLevel(level); | |
| 135 RTC_DCHECK_EQ(0, error); | |
| 136 return static_cast<int32_t>(level); | |
| 137 } | 134 } |
| 138 | 135 |
| 139 int32_t ChannelProxy::GetSpeechOutputLevelFullRange() const { | 136 int ChannelProxy::GetSpeechOutputLevelFullRange() const { |
| 140 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 137 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
| 141 uint32_t level = 0; | 138 return channel()->GetSpeechOutputLevelFullRange(); |
| 142 int error = channel()->GetSpeechOutputLevelFullRange(level); | |
| 143 RTC_DCHECK_EQ(0, error); | |
| 144 return static_cast<int32_t>(level); | |
| 145 } | 139 } |
| 146 | 140 |
| 147 uint32_t ChannelProxy::GetDelayEstimate() const { | 141 uint32_t ChannelProxy::GetDelayEstimate() const { |
| 148 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread() || | 142 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread() || |
| 149 module_process_thread_checker_.CalledOnValidThread()); | 143 module_process_thread_checker_.CalledOnValidThread()); |
| 150 return channel()->GetDelayEstimate(); | 144 return channel()->GetDelayEstimate(); |
| 151 } | 145 } |
| 152 | 146 |
| 153 bool ChannelProxy::SetSendTelephoneEventPayloadType(int payload_type, | 147 bool ChannelProxy::SetSendTelephoneEventPayloadType(int payload_type, |
| 154 int payload_frequency) { | 148 int payload_frequency) { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 179 RTC_DCHECK_EQ(0, result); | 173 RTC_DCHECK_EQ(0, result); |
| 180 } | 174 } |
| 181 | 175 |
| 182 void ChannelProxy::SetSink(std::unique_ptr<AudioSinkInterface> sink) { | 176 void ChannelProxy::SetSink(std::unique_ptr<AudioSinkInterface> sink) { |
| 183 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 177 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
| 184 channel()->SetSink(std::move(sink)); | 178 channel()->SetSink(std::move(sink)); |
| 185 } | 179 } |
| 186 | 180 |
| 187 void ChannelProxy::SetInputMute(bool muted) { | 181 void ChannelProxy::SetInputMute(bool muted) { |
| 188 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 182 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
| 189 int error = channel()->SetInputMute(muted); | 183 channel()->SetInputMute(muted); |
| 190 RTC_DCHECK_EQ(0, error); | |
| 191 } | 184 } |
| 192 | 185 |
| 193 void ChannelProxy::RegisterExternalTransport(Transport* transport) { | 186 void ChannelProxy::RegisterExternalTransport(Transport* transport) { |
| 194 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 187 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
| 195 int error = channel()->RegisterExternalTransport(transport); | 188 int error = channel()->RegisterExternalTransport(transport); |
| 196 RTC_DCHECK_EQ(0, error); | 189 RTC_DCHECK_EQ(0, error); |
| 197 } | 190 } |
| 198 | 191 |
| 199 void ChannelProxy::DeRegisterExternalTransport() { | 192 void ChannelProxy::DeRegisterExternalTransport() { |
| 200 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 193 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 212 } | 205 } |
| 213 | 206 |
| 214 const rtc::scoped_refptr<AudioDecoderFactory>& | 207 const rtc::scoped_refptr<AudioDecoderFactory>& |
| 215 ChannelProxy::GetAudioDecoderFactory() const { | 208 ChannelProxy::GetAudioDecoderFactory() const { |
| 216 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 209 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
| 217 return channel()->GetAudioDecoderFactory(); | 210 return channel()->GetAudioDecoderFactory(); |
| 218 } | 211 } |
| 219 | 212 |
| 220 void ChannelProxy::SetChannelOutputVolumeScaling(float scaling) { | 213 void ChannelProxy::SetChannelOutputVolumeScaling(float scaling) { |
| 221 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 214 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
| 222 int error = channel()->SetChannelOutputVolumeScaling(scaling); | 215 channel()->SetChannelOutputVolumeScaling(scaling); |
| 223 RTC_DCHECK_EQ(0, error); | |
| 224 } | 216 } |
| 225 | 217 |
| 226 void ChannelProxy::SetRtcEventLog(RtcEventLog* event_log) { | 218 void ChannelProxy::SetRtcEventLog(RtcEventLog* event_log) { |
| 227 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 219 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
| 228 channel()->SetRtcEventLog(event_log); | 220 channel()->SetRtcEventLog(event_log); |
| 229 } | 221 } |
| 230 | 222 |
| 231 void ChannelProxy::EnableAudioNetworkAdaptor(const std::string& config_string) { | 223 void ChannelProxy::EnableAudioNetworkAdaptor(const std::string& config_string) { |
| 232 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 224 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
| 233 bool ret = channel()->EnableAudioNetworkAdaptor(config_string); | 225 bool ret = channel()->EnableAudioNetworkAdaptor(config_string); |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 return channel()->SetSendCNPayloadType(type, frequency) == 0; | 367 return channel()->SetSendCNPayloadType(type, frequency) == 0; |
| 376 } | 368 } |
| 377 | 369 |
| 378 Channel* ChannelProxy::channel() const { | 370 Channel* ChannelProxy::channel() const { |
| 379 RTC_DCHECK(channel_owner_.channel()); | 371 RTC_DCHECK(channel_owner_.channel()); |
| 380 return channel_owner_.channel(); | 372 return channel_owner_.channel(); |
| 381 } | 373 } |
| 382 | 374 |
| 383 } // namespace voe | 375 } // namespace voe |
| 384 } // namespace webrtc | 376 } // namespace webrtc |
| OLD | NEW |