OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #include "webrtc/video/video_send_stream.h" | 10 #include "webrtc/video/video_send_stream.h" |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 | 321 |
322 void SetTransportOverhead(int transport_overhead_per_packet); | 322 void SetTransportOverhead(int transport_overhead_per_packet); |
323 | 323 |
324 private: | 324 private: |
325 class CheckEncoderActivityTask; | 325 class CheckEncoderActivityTask; |
326 class EncoderReconfiguredTask; | 326 class EncoderReconfiguredTask; |
327 | 327 |
328 // Implements BitrateAllocatorObserver. | 328 // Implements BitrateAllocatorObserver. |
329 uint32_t OnBitrateUpdated(uint32_t bitrate_bps, | 329 uint32_t OnBitrateUpdated(uint32_t bitrate_bps, |
330 uint8_t fraction_loss, | 330 uint8_t fraction_loss, |
331 int64_t rtt) override; | 331 int64_t rtt, |
| 332 int probing_interval_ms) override; |
332 | 333 |
333 // Implements webrtc::VCMProtectionCallback. | 334 // Implements webrtc::VCMProtectionCallback. |
334 int ProtectionRequest(const FecProtectionParams* delta_params, | 335 int ProtectionRequest(const FecProtectionParams* delta_params, |
335 const FecProtectionParams* key_params, | 336 const FecProtectionParams* key_params, |
336 uint32_t* sent_video_rate_bps, | 337 uint32_t* sent_video_rate_bps, |
337 uint32_t* sent_nack_rate_bps, | 338 uint32_t* sent_nack_rate_bps, |
338 uint32_t* sent_fec_rate_bps) override; | 339 uint32_t* sent_fec_rate_bps) override; |
339 | 340 |
340 void OnEncoderConfigurationChanged(std::vector<VideoStream> streams, | 341 void OnEncoderConfigurationChanged(std::vector<VideoStream> streams, |
341 int min_transmit_bitrate_bps) override; | 342 int min_transmit_bitrate_bps) override; |
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1141 void VideoSendStreamImpl::SignalNetworkState(NetworkState state) { | 1142 void VideoSendStreamImpl::SignalNetworkState(NetworkState state) { |
1142 RTC_DCHECK_RUN_ON(worker_queue_); | 1143 RTC_DCHECK_RUN_ON(worker_queue_); |
1143 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { | 1144 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { |
1144 rtp_rtcp->SetRTCPStatus(state == kNetworkUp ? config_->rtp.rtcp_mode | 1145 rtp_rtcp->SetRTCPStatus(state == kNetworkUp ? config_->rtp.rtcp_mode |
1145 : RtcpMode::kOff); | 1146 : RtcpMode::kOff); |
1146 } | 1147 } |
1147 } | 1148 } |
1148 | 1149 |
1149 uint32_t VideoSendStreamImpl::OnBitrateUpdated(uint32_t bitrate_bps, | 1150 uint32_t VideoSendStreamImpl::OnBitrateUpdated(uint32_t bitrate_bps, |
1150 uint8_t fraction_loss, | 1151 uint8_t fraction_loss, |
1151 int64_t rtt) { | 1152 int64_t rtt, |
| 1153 int probing_interval_ms) { |
1152 RTC_DCHECK_RUN_ON(worker_queue_); | 1154 RTC_DCHECK_RUN_ON(worker_queue_); |
1153 RTC_DCHECK(payload_router_.active()) | 1155 RTC_DCHECK(payload_router_.active()) |
1154 << "VideoSendStream::Start has not been called."; | 1156 << "VideoSendStream::Start has not been called."; |
1155 // Get the encoder target rate. It is the estimated network rate - | 1157 // Get the encoder target rate. It is the estimated network rate - |
1156 // protection overhead. | 1158 // protection overhead. |
1157 encoder_target_rate_bps_ = protection_bitrate_calculator_.SetTargetRates( | 1159 encoder_target_rate_bps_ = protection_bitrate_calculator_.SetTargetRates( |
1158 bitrate_bps, stats_proxy_->GetSendFrameRate(), fraction_loss, rtt); | 1160 bitrate_bps, stats_proxy_->GetSendFrameRate(), fraction_loss, rtt); |
1159 uint32_t protection_bitrate = bitrate_bps - encoder_target_rate_bps_; | 1161 uint32_t protection_bitrate = bitrate_bps - encoder_target_rate_bps_; |
1160 | 1162 |
1161 encoder_target_rate_bps_ = | 1163 encoder_target_rate_bps_ = |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1212 } | 1214 } |
1213 | 1215 |
1214 void VideoSendStreamImpl::SetTransportOverhead( | 1216 void VideoSendStreamImpl::SetTransportOverhead( |
1215 int transport_overhead_per_packet) { | 1217 int transport_overhead_per_packet) { |
1216 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) | 1218 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) |
1217 rtp_rtcp->SetTransportOverhead(transport_overhead_per_packet); | 1219 rtp_rtcp->SetTransportOverhead(transport_overhead_per_packet); |
1218 } | 1220 } |
1219 | 1221 |
1220 } // namespace internal | 1222 } // namespace internal |
1221 } // namespace webrtc | 1223 } // namespace webrtc |
OLD | NEW |