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 | 10 |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 } | 443 } |
444 | 444 |
445 for (size_t i = 0; i < config_.rtp.rtx.ssrcs.size(); ++i) { | 445 for (size_t i = 0; i < config_.rtp.rtx.ssrcs.size(); ++i) { |
446 uint32_t ssrc = config_.rtp.rtx.ssrcs[i]; | 446 uint32_t ssrc = config_.rtp.rtx.ssrcs[i]; |
447 rtp_states[ssrc] = vie_channel_->GetRtpStateForSsrc(ssrc); | 447 rtp_states[ssrc] = vie_channel_->GetRtpStateForSsrc(ssrc); |
448 } | 448 } |
449 | 449 |
450 return rtp_states; | 450 return rtp_states; |
451 } | 451 } |
452 | 452 |
453 void VideoSendStream::SignalNetworkState(Call::NetworkState state) { | 453 void VideoSendStream::SignalNetworkState(NetworkState state) { |
454 // When network goes up, enable RTCP status before setting transmission state. | 454 // When network goes up, enable RTCP status before setting transmission state. |
455 // When it goes down, disable RTCP afterwards. This ensures that any packets | 455 // When it goes down, disable RTCP afterwards. This ensures that any packets |
456 // sent due to the network state changed will not be dropped. | 456 // sent due to the network state changed will not be dropped. |
457 if (state == Call::kNetworkUp) | 457 if (state == kNetworkUp) |
458 vie_channel_->SetRTCPMode(kRtcpCompound); | 458 vie_channel_->SetRTCPMode(kRtcpCompound); |
459 vie_encoder_->SetNetworkTransmissionState(state == Call::kNetworkUp); | 459 vie_encoder_->SetNetworkTransmissionState(state == kNetworkUp); |
460 if (state == Call::kNetworkDown) | 460 if (state == kNetworkDown) |
461 vie_channel_->SetRTCPMode(kRtcpOff); | 461 vie_channel_->SetRTCPMode(kRtcpOff); |
462 } | 462 } |
463 | 463 |
464 int64_t VideoSendStream::GetRtt() const { | 464 int64_t VideoSendStream::GetRtt() const { |
465 webrtc::RtcpStatistics rtcp_stats; | 465 webrtc::RtcpStatistics rtcp_stats; |
466 uint16_t frac_lost; | 466 uint16_t frac_lost; |
467 uint32_t cumulative_lost; | 467 uint32_t cumulative_lost; |
468 uint32_t extended_max_sequence_number; | 468 uint32_t extended_max_sequence_number; |
469 uint32_t jitter; | 469 uint32_t jitter; |
470 int64_t rtt_ms; | 470 int64_t rtt_ms; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 vie_channel_->IsSendingFecEnabled()); | 518 vie_channel_->IsSendingFecEnabled()); |
519 | 519 |
520 // Restart the media flow | 520 // Restart the media flow |
521 vie_encoder_->Restart(); | 521 vie_encoder_->Restart(); |
522 | 522 |
523 return true; | 523 return true; |
524 } | 524 } |
525 | 525 |
526 } // namespace internal | 526 } // namespace internal |
527 } // namespace webrtc | 527 } // namespace webrtc |
OLD | NEW |