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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 | 255 |
256 RemoteBitrateEstimator* CongestionController::GetRemoteBitrateEstimator( | 256 RemoteBitrateEstimator* CongestionController::GetRemoteBitrateEstimator( |
257 bool send_side_bwe) { | 257 bool send_side_bwe) { |
258 if (send_side_bwe) { | 258 if (send_side_bwe) { |
259 return &remote_estimator_proxy_; | 259 return &remote_estimator_proxy_; |
260 } else { | 260 } else { |
261 return &remote_bitrate_estimator_; | 261 return &remote_bitrate_estimator_; |
262 } | 262 } |
263 } | 263 } |
264 | 264 |
| 265 void CongestionController::RegisterTransportFeedbackAdapterObserver( |
| 266 TransportFeedbackAdapterObserver* observer) { |
| 267 transport_feedback_adapter_.RegisterTransportFeedbackAdapterObserver( |
| 268 observer); |
| 269 } |
| 270 |
| 271 void CongestionController::DeRegisterTransportFeedbackAdapterObserver( |
| 272 TransportFeedbackAdapterObserver* observer) { |
| 273 transport_feedback_adapter_.DeRegisterTransportFeedbackAdapterObserver( |
| 274 observer); |
| 275 } |
| 276 |
265 RateLimiter* CongestionController::GetRetransmissionRateLimiter() { | 277 RateLimiter* CongestionController::GetRetransmissionRateLimiter() { |
266 return retransmission_rate_limiter_.get(); | 278 return retransmission_rate_limiter_.get(); |
267 } | 279 } |
268 | 280 |
269 void CongestionController::EnablePeriodicAlrProbing(bool enable) { | 281 void CongestionController::EnablePeriodicAlrProbing(bool enable) { |
270 probe_controller_->EnablePeriodicAlrProbing(enable); | 282 probe_controller_->EnablePeriodicAlrProbing(enable); |
271 } | 283 } |
272 | 284 |
273 void CongestionController::SetAllocatedSendBitrateLimits( | 285 void CongestionController::SetAllocatedSendBitrateLimits( |
274 int min_send_bitrate_bps, | 286 int min_send_bitrate_bps, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 remote_bitrate_estimator_.TimeUntilNextProcess()); | 336 remote_bitrate_estimator_.TimeUntilNextProcess()); |
325 } | 337 } |
326 | 338 |
327 void CongestionController::Process() { | 339 void CongestionController::Process() { |
328 bitrate_controller_->Process(); | 340 bitrate_controller_->Process(); |
329 remote_bitrate_estimator_.Process(); | 341 remote_bitrate_estimator_.Process(); |
330 probe_controller_->Process(); | 342 probe_controller_->Process(); |
331 MaybeTriggerOnNetworkChanged(); | 343 MaybeTriggerOnNetworkChanged(); |
332 } | 344 } |
333 | 345 |
334 void CongestionController::AddPacket(uint16_t sequence_number, | 346 void CongestionController::AddPacket(uint32_t ssrc, |
| 347 uint16_t sequence_number, |
335 size_t length, | 348 size_t length, |
336 const PacedPacketInfo& pacing_info) { | 349 const PacedPacketInfo& pacing_info) { |
337 transport_feedback_adapter_.AddPacket(sequence_number, length, pacing_info); | 350 transport_feedback_adapter_.AddPacket(ssrc, sequence_number, length, |
| 351 pacing_info); |
338 } | 352 } |
339 | 353 |
340 void CongestionController::OnTransportFeedback( | 354 void CongestionController::OnTransportFeedback( |
341 const rtcp::TransportFeedback& feedback) { | 355 const rtcp::TransportFeedback& feedback) { |
342 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 356 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
343 transport_feedback_adapter_.OnTransportFeedback(feedback); | 357 transport_feedback_adapter_.OnTransportFeedback(feedback); |
344 DelayBasedBwe::Result result; | 358 DelayBasedBwe::Result result; |
345 { | 359 { |
346 rtc::CritScope cs(&bwe_lock_); | 360 rtc::CritScope cs(&bwe_lock_); |
347 result = delay_based_bwe_->IncomingPacketFeedbackVector( | 361 result = delay_based_bwe_->IncomingPacketFeedbackVector( |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 bool CongestionController::IsSendQueueFull() const { | 424 bool CongestionController::IsSendQueueFull() const { |
411 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; | 425 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; |
412 } | 426 } |
413 | 427 |
414 bool CongestionController::IsNetworkDown() const { | 428 bool CongestionController::IsNetworkDown() const { |
415 rtc::CritScope cs(&network_state_lock_); | 429 rtc::CritScope cs(&network_state_lock_); |
416 return network_state_ == kNetworkDown; | 430 return network_state_ == kNetworkDown; |
417 } | 431 } |
418 | 432 |
419 } // namespace webrtc | 433 } // namespace webrtc |
OLD | NEW |