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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 127 | 127 |
| 128 int32_t ChannelProxy::GetSpeechOutputLevelFullRange() const { | 128 int32_t ChannelProxy::GetSpeechOutputLevelFullRange() const { |
| 129 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 129 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
| 130 uint32_t level = 0; | 130 uint32_t level = 0; |
| 131 int error = channel()->GetSpeechOutputLevelFullRange(level); | 131 int error = channel()->GetSpeechOutputLevelFullRange(level); |
| 132 RTC_DCHECK_EQ(0, error); | 132 RTC_DCHECK_EQ(0, error); |
| 133 return static_cast<int32_t>(level); | 133 return static_cast<int32_t>(level); |
| 134 } | 134 } |
| 135 | 135 |
| 136 uint32_t ChannelProxy::GetDelayEstimate() const { | 136 uint32_t ChannelProxy::GetDelayEstimate() const { |
| 137 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 137 // Called on worker thread or Call's module_process_thread_. |
|
kwiberg-webrtc
2017/02/09 10:16:40
Umm... First, can you use thread checkers to verif
the sun
2017/02/11 12:05:53
Are you saying an rtc::RaceChecker would be more a
kwiberg-webrtc
2017/02/11 21:25:25
I'm just saying that I don't understand what you'r
the sun
2017/02/11 23:24:53
Ah, well. The underlying code (voe::Channel) is sp
kwiberg-webrtc
2017/02/12 00:58:37
OK. Then it sounds like you want a race checker---
| |
| 138 return channel()->GetDelayEstimate(); | 138 return channel()->GetDelayEstimate(); |
| 139 } | 139 } |
| 140 | 140 |
| 141 bool ChannelProxy::SetSendTelephoneEventPayloadType(int payload_type, | 141 bool ChannelProxy::SetSendTelephoneEventPayloadType(int payload_type, |
| 142 int payload_frequency) { | 142 int payload_frequency) { |
| 143 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 143 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
| 144 return channel()->SetSendTelephoneEventPayloadType(payload_type, | 144 return channel()->SetSendTelephoneEventPayloadType(payload_type, |
| 145 payload_frequency) == 0; | 145 payload_frequency) == 0; |
| 146 } | 146 } |
| 147 | 147 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 260 | 260 |
| 261 void ChannelProxy::GetRtpRtcp(RtpRtcp** rtp_rtcp, | 261 void ChannelProxy::GetRtpRtcp(RtpRtcp** rtp_rtcp, |
| 262 RtpReceiver** rtp_receiver) const { | 262 RtpReceiver** rtp_receiver) const { |
| 263 // Called on Call's module_process_thread_. | 263 // Called on Call's module_process_thread_. |
| 264 RTC_DCHECK(rtp_rtcp); | 264 RTC_DCHECK(rtp_rtcp); |
| 265 RTC_DCHECK(rtp_receiver); | 265 RTC_DCHECK(rtp_receiver); |
| 266 int error = channel()->GetRtpRtcp(rtp_rtcp, rtp_receiver); | 266 int error = channel()->GetRtpRtcp(rtp_rtcp, rtp_receiver); |
| 267 RTC_DCHECK_EQ(0, error); | 267 RTC_DCHECK_EQ(0, error); |
| 268 } | 268 } |
| 269 | 269 |
| 270 void ChannelProxy::GetDelayEstimate(int* jitter_buffer_delay_ms, | |
| 271 int* playout_buffer_delay_ms) const { | |
| 272 // Called on Call's module_process_thread_. | |
| 273 RTC_DCHECK(jitter_buffer_delay_ms); | |
| 274 RTC_DCHECK(playout_buffer_delay_ms); | |
| 275 bool error = channel()->GetDelayEstimate(jitter_buffer_delay_ms, | |
| 276 playout_buffer_delay_ms); | |
| 277 RTC_DCHECK(error); | |
| 278 } | |
| 279 | |
| 280 uint32_t ChannelProxy::GetPlayoutTimestamp() const { | 270 uint32_t ChannelProxy::GetPlayoutTimestamp() const { |
| 281 // Called on video capture thread. | 271 // Called on video capture thread. |
| 282 unsigned int timestamp = 0; | 272 unsigned int timestamp = 0; |
| 283 int error = channel()->GetPlayoutTimestamp(timestamp); | 273 int error = channel()->GetPlayoutTimestamp(timestamp); |
| 284 RTC_DCHECK(!error || timestamp == 0); | 274 RTC_DCHECK(!error || timestamp == 0); |
| 285 return timestamp; | 275 return timestamp; |
| 286 } | 276 } |
| 287 | 277 |
| 288 void ChannelProxy::SetMinimumPlayoutDelay(int delay_ms) { | 278 void ChannelProxy::SetMinimumPlayoutDelay(int delay_ms) { |
| 289 // Called on Call's module_process_thread_. | 279 // Called on Call's module_process_thread_. |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 367 return channel()->SetSendCNPayloadType(type, frequency) == 0; | 357 return channel()->SetSendCNPayloadType(type, frequency) == 0; |
| 368 } | 358 } |
| 369 | 359 |
| 370 Channel* ChannelProxy::channel() const { | 360 Channel* ChannelProxy::channel() const { |
| 371 RTC_DCHECK(channel_owner_.channel()); | 361 RTC_DCHECK(channel_owner_.channel()); |
| 372 return channel_owner_.channel(); | 362 return channel_owner_.channel(); |
| 373 } | 363 } |
| 374 | 364 |
| 375 } // namespace voe | 365 } // namespace voe |
| 376 } // namespace webrtc | 366 } // namespace webrtc |
| OLD | NEW |