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 |
| 11 #include "webrtc/audio/audio_send_stream.h" | 11 #include "webrtc/audio/audio_send_stream.h" |
| 12 | 12 |
| 13 #include <string> | 13 #include <string> |
| 14 #include <vector> | |
| 14 | 15 |
| 15 #include "webrtc/audio/audio_state.h" | 16 #include "webrtc/audio/audio_state.h" |
| 16 #include "webrtc/audio/conversion.h" | 17 #include "webrtc/audio/conversion.h" |
| 17 #include "webrtc/audio/scoped_voe_interface.h" | 18 #include "webrtc/audio/scoped_voe_interface.h" |
| 18 #include "webrtc/base/checks.h" | 19 #include "webrtc/base/checks.h" |
| 19 #include "webrtc/base/event.h" | 20 #include "webrtc/base/event.h" |
| 20 #include "webrtc/base/logging.h" | 21 #include "webrtc/base/logging.h" |
| 21 #include "webrtc/base/task_queue.h" | 22 #include "webrtc/base/task_queue.h" |
| 22 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" | 23 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" |
| 23 #include "webrtc/modules/congestion_controller/include/send_side_congestion_cont roller.h" | 24 #include "webrtc/modules/congestion_controller/include/send_side_congestion_cont roller.h" |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 267 // potentially reset the window, setting both PLR and RPLR to unknown. | 268 // potentially reset the window, setting both PLR and RPLR to unknown. |
| 268 } | 269 } |
| 269 } | 270 } |
| 270 | 271 |
| 271 void AudioSendStream::OnNewTransportFeedbackVector( | 272 void AudioSendStream::OnNewTransportFeedbackVector( |
| 272 const std::vector<PacketFeedback>& packet_feedback_vector) { | 273 const std::vector<PacketFeedback>& packet_feedback_vector) { |
| 273 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 274 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
| 274 rtc::CritScope lock(&packet_loss_tracker_cs_); | 275 rtc::CritScope lock(&packet_loss_tracker_cs_); |
| 275 packet_loss_tracker_.OnNewTransportFeedbackVector(packet_feedback_vector); | 276 packet_loss_tracker_.OnNewTransportFeedbackVector(packet_feedback_vector); |
| 276 const auto plr = packet_loss_tracker_.GetPacketLossRate(); | 277 const auto plr = packet_loss_tracker_.GetPacketLossRate(); |
| 278 const auto rplr = packet_loss_tracker_.GetRecoverablePacketLossRate(); | |
| 277 // TODO(elad.alon): Resolve the following known issue - if PLR goes back | 279 // TODO(elad.alon): Resolve the following known issue - if PLR goes back |
|
ossu
2017/03/22 13:41:18
I guess you've considered this: it looks like at l
elad.alon_webrtc.org
2017/03/22 15:15:55
I did consider it - even had a CL for it (https://
| |
| 278 // to unknown, no indication is given that the previously sent value is no | 280 // to unknown, no indication is given that the previously sent value is no |
| 279 // longer relevant. This will be taken care of with some refactoring which is | 281 // longer relevant. This will be taken care of with some refactoring which is |
| 280 // now being done. | 282 // now being done. |
| 281 if (plr) { | 283 if (plr) { |
| 282 channel_proxy_->OnTwccBasedUplinkPacketLossRate(*plr); | 284 channel_proxy_->OnTwccBasedUplinkPacketLossRate(*plr); |
| 283 } | 285 } |
| 286 if (rplr) { | |
|
stefan-webrtc
2017/03/22 12:15:46
Can plr and rplr be active simultaneously? Should
minyue-webrtc
2017/03/22 12:17:36
Yes, plr will be used for frame length adaptation
elad.alon_webrtc.org
2017/03/22 15:15:55
I'm not sure what comment would make things cleare
| |
| 287 channel_proxy_->OnRecoverableUplinkPacketLossRate(*rplr); | |
| 288 } | |
| 284 } | 289 } |
| 285 | 290 |
| 286 const webrtc::AudioSendStream::Config& AudioSendStream::config() const { | 291 const webrtc::AudioSendStream::Config& AudioSendStream::config() const { |
| 287 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 292 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
| 288 return config_; | 293 return config_; |
| 289 } | 294 } |
| 290 | 295 |
| 291 void AudioSendStream::SetTransportOverhead(int transport_overhead_per_packet) { | 296 void AudioSendStream::SetTransportOverhead(int transport_overhead_per_packet) { |
| 292 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 297 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
| 293 send_side_cc_->SetTransportOverhead(transport_overhead_per_packet); | 298 send_side_cc_->SetTransportOverhead(transport_overhead_per_packet); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 409 LOG(LS_WARNING) << "SetVADStatus() failed."; | 414 LOG(LS_WARNING) << "SetVADStatus() failed."; |
| 410 return false; | 415 return false; |
| 411 } | 416 } |
| 412 } | 417 } |
| 413 } | 418 } |
| 414 return true; | 419 return true; |
| 415 } | 420 } |
| 416 | 421 |
| 417 } // namespace internal | 422 } // namespace internal |
| 418 } // namespace webrtc | 423 } // namespace webrtc |
| OLD | NEW |