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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 // refactoring) passing an indication of such an event. | 270 // refactoring) passing an indication of such an event. |
271 packet_loss_tracker_.OnPacketAdded(seq_num, rtc::TimeMillis()); | 271 packet_loss_tracker_.OnPacketAdded(seq_num, rtc::TimeMillis()); |
272 } | 272 } |
273 } | 273 } |
274 | 274 |
275 void AudioSendStream::OnPacketFeedbackVector( | 275 void AudioSendStream::OnPacketFeedbackVector( |
276 const std::vector<PacketFeedback>& packet_feedback_vector) { | 276 const std::vector<PacketFeedback>& packet_feedback_vector) { |
277 // TODO(elad.alon): This fails in UT; fix and uncomment. | 277 // TODO(elad.alon): This fails in UT; fix and uncomment. |
278 // RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 278 // RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
279 rtc::Optional<float> plr; | 279 rtc::Optional<float> plr; |
| 280 rtc::Optional<float> rplr; |
280 { | 281 { |
281 rtc::CritScope lock(&packet_loss_tracker_cs_); | 282 rtc::CritScope lock(&packet_loss_tracker_cs_); |
282 packet_loss_tracker_.OnPacketFeedbackVector(packet_feedback_vector); | 283 packet_loss_tracker_.OnPacketFeedbackVector(packet_feedback_vector); |
283 plr = packet_loss_tracker_.GetPacketLossRate(); | 284 plr = packet_loss_tracker_.GetPacketLossRate(); |
| 285 rplr = packet_loss_tracker_.GetRecoverablePacketLossRate(); |
284 } | 286 } |
285 // TODO(elad.alon): If PLR goes back to unknown, no indication is given that | 287 // TODO(elad.alon): If R/PLR go back to unknown, no indication is given that |
286 // the previously sent value is no longer relevant. This will be taken care | 288 // the previously sent value is no longer relevant. This will be taken care |
287 // of with some refactoring which is now being done. | 289 // of with some refactoring which is now being done. |
288 if (plr) { | 290 if (plr) { |
289 channel_proxy_->OnTwccBasedUplinkPacketLossRate(*plr); | 291 channel_proxy_->OnTwccBasedUplinkPacketLossRate(*plr); |
290 } | 292 } |
| 293 if (rplr) { |
| 294 channel_proxy_->OnRecoverableUplinkPacketLossRate(*rplr); |
| 295 } |
291 } | 296 } |
292 | 297 |
293 const webrtc::AudioSendStream::Config& AudioSendStream::config() const { | 298 const webrtc::AudioSendStream::Config& AudioSendStream::config() const { |
294 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 299 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
295 return config_; | 300 return config_; |
296 } | 301 } |
297 | 302 |
298 void AudioSendStream::SetTransportOverhead(int transport_overhead_per_packet) { | 303 void AudioSendStream::SetTransportOverhead(int transport_overhead_per_packet) { |
299 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 304 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
300 send_side_cc_->SetTransportOverhead(transport_overhead_per_packet); | 305 send_side_cc_->SetTransportOverhead(transport_overhead_per_packet); |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 LOG(LS_WARNING) << "SetVADStatus() failed."; | 421 LOG(LS_WARNING) << "SetVADStatus() failed."; |
417 return false; | 422 return false; |
418 } | 423 } |
419 } | 424 } |
420 } | 425 } |
421 return true; | 426 return true; |
422 } | 427 } |
423 | 428 |
424 } // namespace internal | 429 } // namespace internal |
425 } // namespace webrtc | 430 } // namespace webrtc |
OLD | NEW |