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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 elapsed_sec / 1000)); | 256 elapsed_sec / 1000)); |
257 if (rtp_rtcp_modules_[0]->RtxSendStatus() != kRtxOff) { | 257 if (rtp_rtcp_modules_[0]->RtxSendStatus() != kRtxOff) { |
258 RTC_HISTOGRAM_COUNTS_10000( | 258 RTC_HISTOGRAM_COUNTS_10000( |
259 "WebRTC.Video.RtxBitrateSentInKbps", | 259 "WebRTC.Video.RtxBitrateSentInKbps", |
260 static_cast<int>(rtx.transmitted.TotalBytes() * 8 / elapsed_sec / | 260 static_cast<int>(rtx.transmitted.TotalBytes() * 8 / elapsed_sec / |
261 1000)); | 261 1000)); |
262 } | 262 } |
263 bool fec_enabled = false; | 263 bool fec_enabled = false; |
264 uint8_t pltype_red; | 264 uint8_t pltype_red; |
265 uint8_t pltype_fec; | 265 uint8_t pltype_fec; |
266 rtp_rtcp_modules_[0]->GenericFECStatus(fec_enabled, pltype_red, | 266 rtp_rtcp_modules_[0]->GenericFECStatus(&fec_enabled, &pltype_red, |
267 pltype_fec); | 267 &pltype_fec); |
268 if (fec_enabled) { | 268 if (fec_enabled) { |
269 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.FecBitrateSentInKbps", | 269 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.FecBitrateSentInKbps", |
270 static_cast<int>(rtp_rtx.fec.TotalBytes() * | 270 static_cast<int>(rtp_rtx.fec.TotalBytes() * |
271 8 / elapsed_sec / 1000)); | 271 8 / elapsed_sec / 1000)); |
272 } | 272 } |
273 } | 273 } |
274 } else if (vie_receiver_.GetRemoteSsrc() > 0) { | 274 } else if (vie_receiver_.GetRemoteSsrc() > 0) { |
275 // Get receive stats if we are receiving packets, i.e. there is a remote | 275 // Get receive stats if we are receiving packets, i.e. there is a remote |
276 // ssrc. | 276 // ssrc. |
277 RtcpPacketTypeCounter rtcp_counter; | 277 RtcpPacketTypeCounter rtcp_counter; |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 vcm_->SetDecodeErrorMode(kWithErrors); | 524 vcm_->SetDecodeErrorMode(kWithErrors); |
525 } | 525 } |
526 } | 526 } |
527 | 527 |
528 bool ViEChannel::IsSendingFecEnabled() { | 528 bool ViEChannel::IsSendingFecEnabled() { |
529 bool fec_enabled = false; | 529 bool fec_enabled = false; |
530 uint8_t pltype_red = 0; | 530 uint8_t pltype_red = 0; |
531 uint8_t pltype_fec = 0; | 531 uint8_t pltype_fec = 0; |
532 | 532 |
533 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { | 533 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { |
534 rtp_rtcp->GenericFECStatus(fec_enabled, pltype_red, pltype_fec); | 534 rtp_rtcp->GenericFECStatus(&fec_enabled, &pltype_red, &pltype_fec); |
535 if (fec_enabled) | 535 if (fec_enabled) |
536 return true; | 536 return true; |
537 } | 537 } |
538 return false; | 538 return false; |
539 } | 539 } |
540 | 540 |
541 int ViEChannel::SetSenderBufferingMode(int target_delay_ms) { | 541 int ViEChannel::SetSenderBufferingMode(int target_delay_ms) { |
542 if ((target_delay_ms < 0) || (target_delay_ms > kMaxTargetDelayMs)) { | 542 if ((target_delay_ms < 0) || (target_delay_ms > kMaxTargetDelayMs)) { |
543 LOG(LS_ERROR) << "Invalid send buffer value."; | 543 LOG(LS_ERROR) << "Invalid send buffer value."; |
544 return -1; | 544 return -1; |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1194 CriticalSectionScoped cs(crit_.get()); | 1194 CriticalSectionScoped cs(crit_.get()); |
1195 receive_stats_callback_ = receive_statistics_proxy; | 1195 receive_stats_callback_ = receive_statistics_proxy; |
1196 } | 1196 } |
1197 | 1197 |
1198 void ViEChannel::SetIncomingVideoStream( | 1198 void ViEChannel::SetIncomingVideoStream( |
1199 IncomingVideoStream* incoming_video_stream) { | 1199 IncomingVideoStream* incoming_video_stream) { |
1200 CriticalSectionScoped cs(crit_.get()); | 1200 CriticalSectionScoped cs(crit_.get()); |
1201 incoming_video_stream_ = incoming_video_stream; | 1201 incoming_video_stream_ = incoming_video_stream; |
1202 } | 1202 } |
1203 } // namespace webrtc | 1203 } // namespace webrtc |
OLD | NEW |