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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 const ChannelProxy& send_channel_proxy) { | 249 const ChannelProxy& send_channel_proxy) { |
250 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 250 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
251 channel()->set_associate_send_channel(send_channel_proxy.channel_owner_); | 251 channel()->set_associate_send_channel(send_channel_proxy.channel_owner_); |
252 } | 252 } |
253 | 253 |
254 void ChannelProxy::DisassociateSendChannel() { | 254 void ChannelProxy::DisassociateSendChannel() { |
255 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 255 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
256 channel()->set_associate_send_channel(ChannelOwner(nullptr)); | 256 channel()->set_associate_send_channel(ChannelOwner(nullptr)); |
257 } | 257 } |
258 | 258 |
| 259 void ChannelProxy::GetRtpRtcp(RtpRtcp** rtp_rtcp, |
| 260 RtpReceiver** rtp_receiver) const { |
| 261 // Called on Call's module_process_thread_. |
| 262 RTC_DCHECK(rtp_rtcp); |
| 263 RTC_DCHECK(rtp_receiver); |
| 264 int error = channel()->GetRtpRtcp(rtp_rtcp, rtp_receiver); |
| 265 RTC_DCHECK_EQ(0, error); |
| 266 } |
| 267 |
| 268 void ChannelProxy::GetDelayEstimate(int* jitter_buffer_delay_ms, |
| 269 int* playout_buffer_delay_ms) const { |
| 270 // Called on Call's module_process_thread_. |
| 271 RTC_DCHECK(jitter_buffer_delay_ms); |
| 272 RTC_DCHECK(playout_buffer_delay_ms); |
| 273 bool error = channel()->GetDelayEstimate(jitter_buffer_delay_ms, |
| 274 playout_buffer_delay_ms); |
| 275 RTC_DCHECK(error); |
| 276 } |
| 277 |
| 278 uint32_t ChannelProxy::GetPlayoutTimestamp() const { |
| 279 // Called on video capture thread. |
| 280 unsigned int timestamp = 0; |
| 281 int error = channel()->GetPlayoutTimestamp(timestamp); |
| 282 RTC_DCHECK(!error || timestamp == 0); |
| 283 return timestamp; |
| 284 } |
| 285 |
| 286 void ChannelProxy::SetMinimumPlayoutDelay(int delay_ms) { |
| 287 // Called on Call's module_process_thread_. |
| 288 // Limit to range accepted by both VoE and ACM, so we're at least getting as |
| 289 // close as possible, instead of failing. |
| 290 delay_ms = std::max(0, std::min(delay_ms, 10000)); |
| 291 int error = channel()->SetMinimumPlayoutDelay(delay_ms); |
| 292 RTC_DCHECK_EQ(0, error); |
| 293 } |
| 294 |
259 void ChannelProxy::SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats) { | 295 void ChannelProxy::SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats) { |
260 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 296 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
261 channel()->SetRtcpRttStats(rtcp_rtt_stats); | 297 channel()->SetRtcpRttStats(rtcp_rtt_stats); |
262 } | 298 } |
263 | 299 |
264 Channel* ChannelProxy::channel() const { | 300 Channel* ChannelProxy::channel() const { |
265 RTC_DCHECK(channel_owner_.channel()); | 301 RTC_DCHECK(channel_owner_.channel()); |
266 return channel_owner_.channel(); | 302 return channel_owner_.channel(); |
267 } | 303 } |
268 | 304 |
269 } // namespace voe | 305 } // namespace voe |
270 } // namespace webrtc | 306 } // namespace webrtc |
OLD | NEW |