OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 | 260 |
261 RemoteBitrateEstimator* CongestionController::GetRemoteBitrateEstimator( | 261 RemoteBitrateEstimator* CongestionController::GetRemoteBitrateEstimator( |
262 bool send_side_bwe) { | 262 bool send_side_bwe) { |
263 if (send_side_bwe) { | 263 if (send_side_bwe) { |
264 return &remote_estimator_proxy_; | 264 return &remote_estimator_proxy_; |
265 } else { | 265 } else { |
266 return &remote_bitrate_estimator_; | 266 return &remote_bitrate_estimator_; |
267 } | 267 } |
268 } | 268 } |
269 | 269 |
| 270 void CongestionController::RegisterTransportFeedbackAdapterObserver( |
| 271 TransportFeedbackAdapterObserver* observer) { |
| 272 transport_feedback_adapter_.RegisterTransportFeedbackAdapterObserver( |
| 273 observer); |
| 274 } |
| 275 |
| 276 void CongestionController::DeRegisterTransportFeedbackAdapterObserver( |
| 277 TransportFeedbackAdapterObserver* observer) { |
| 278 transport_feedback_adapter_.DeRegisterTransportFeedbackAdapterObserver( |
| 279 observer); |
| 280 } |
| 281 |
270 RateLimiter* CongestionController::GetRetransmissionRateLimiter() { | 282 RateLimiter* CongestionController::GetRetransmissionRateLimiter() { |
271 return retransmission_rate_limiter_.get(); | 283 return retransmission_rate_limiter_.get(); |
272 } | 284 } |
273 | 285 |
274 void CongestionController::EnablePeriodicAlrProbing(bool enable) { | 286 void CongestionController::EnablePeriodicAlrProbing(bool enable) { |
275 probe_controller_->EnablePeriodicAlrProbing(enable); | 287 probe_controller_->EnablePeriodicAlrProbing(enable); |
276 } | 288 } |
277 | 289 |
278 void CongestionController::SetAllocatedSendBitrateLimits( | 290 void CongestionController::SetAllocatedSendBitrateLimits( |
279 int min_send_bitrate_bps, | 291 int min_send_bitrate_bps, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 remote_bitrate_estimator_.TimeUntilNextProcess()); | 341 remote_bitrate_estimator_.TimeUntilNextProcess()); |
330 } | 342 } |
331 | 343 |
332 void CongestionController::Process() { | 344 void CongestionController::Process() { |
333 bitrate_controller_->Process(); | 345 bitrate_controller_->Process(); |
334 remote_bitrate_estimator_.Process(); | 346 remote_bitrate_estimator_.Process(); |
335 probe_controller_->Process(); | 347 probe_controller_->Process(); |
336 MaybeTriggerOnNetworkChanged(); | 348 MaybeTriggerOnNetworkChanged(); |
337 } | 349 } |
338 | 350 |
339 void CongestionController::AddPacket(uint16_t sequence_number, | 351 void CongestionController::AddPacket(uint32_t ssrc, |
| 352 uint16_t sequence_number, |
340 size_t length, | 353 size_t length, |
341 const PacedPacketInfo& pacing_info) { | 354 const PacedPacketInfo& pacing_info) { |
342 transport_feedback_adapter_.AddPacket(sequence_number, length, pacing_info); | 355 transport_feedback_adapter_.AddPacket(ssrc, sequence_number, length, |
| 356 pacing_info); |
343 } | 357 } |
344 | 358 |
345 void CongestionController::OnTransportFeedback( | 359 void CongestionController::OnTransportFeedback( |
346 const rtcp::TransportFeedback& feedback) { | 360 const rtcp::TransportFeedback& feedback) { |
347 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 361 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
348 transport_feedback_adapter_.OnTransportFeedback(feedback); | 362 transport_feedback_adapter_.OnTransportFeedback(feedback); |
349 DelayBasedBwe::Result result; | 363 DelayBasedBwe::Result result; |
350 { | 364 { |
351 rtc::CritScope cs(&bwe_lock_); | 365 rtc::CritScope cs(&bwe_lock_); |
352 result = delay_based_bwe_->IncomingPacketFeedbackVector( | 366 result = delay_based_bwe_->IncomingPacketFeedbackVector( |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 bool CongestionController::IsSendQueueFull() const { | 429 bool CongestionController::IsSendQueueFull() const { |
416 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; | 430 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; |
417 } | 431 } |
418 | 432 |
419 bool CongestionController::IsNetworkDown() const { | 433 bool CongestionController::IsNetworkDown() const { |
420 rtc::CritScope cs(&network_state_lock_); | 434 rtc::CritScope cs(&network_state_lock_); |
421 return network_state_ == kNetworkDown; | 435 return network_state_ == kNetworkDown; |
422 } | 436 } |
423 | 437 |
424 } // namespace webrtc | 438 } // namespace webrtc |
OLD | NEW |