Chromium Code Reviews| 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 { | |
| 132 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | |
| 133 uint32_t level = 0; | |
|
kwiberg-webrtc
2017/02/28 13:59:18
Why initialize?
the sun
2017/03/02 00:36:25
Variables should always be initialized, unless the
kwiberg-webrtc
2017/03/02 02:37:37
On the contrary, I'd argue that the call below is
| |
| 134 int error = channel()->GetSpeechOutputLevel(level); | |
|
kwiberg-webrtc
2017/02/28 13:59:18
const?
the sun
2017/03/02 00:36:25
For error? No.
| |
| 135 RTC_DCHECK_EQ(0, error); | |
| 136 return static_cast<int32_t>(level); | |
| 137 } | |
| 138 | |
| 131 int32_t ChannelProxy::GetSpeechOutputLevelFullRange() const { | 139 int32_t ChannelProxy::GetSpeechOutputLevelFullRange() const { |
| 132 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 140 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
| 133 uint32_t level = 0; | 141 uint32_t level = 0; |
| 134 int error = channel()->GetSpeechOutputLevelFullRange(level); | 142 int error = channel()->GetSpeechOutputLevelFullRange(level); |
| 135 RTC_DCHECK_EQ(0, error); | 143 RTC_DCHECK_EQ(0, error); |
| 136 return static_cast<int32_t>(level); | 144 return static_cast<int32_t>(level); |
| 137 } | 145 } |
| 138 | 146 |
| 139 uint32_t ChannelProxy::GetDelayEstimate() const { | 147 uint32_t ChannelProxy::GetDelayEstimate() const { |
| 140 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread() || | 148 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread() || |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 367 return channel()->SetSendCNPayloadType(type, frequency) == 0; | 375 return channel()->SetSendCNPayloadType(type, frequency) == 0; |
| 368 } | 376 } |
| 369 | 377 |
| 370 Channel* ChannelProxy::channel() const { | 378 Channel* ChannelProxy::channel() const { |
| 371 RTC_DCHECK(channel_owner_.channel()); | 379 RTC_DCHECK(channel_owner_.channel()); |
| 372 return channel_owner_.channel(); | 380 return channel_owner_.channel(); |
| 373 } | 381 } |
| 374 | 382 |
| 375 } // namespace voe | 383 } // namespace voe |
| 376 } // namespace webrtc | 384 } // namespace webrtc |
| OLD | NEW |