| 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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 } | 429 } |
| 430 | 430 |
| 431 for (size_t i = 0; i < config_.rtp.rtx.ssrcs.size(); ++i) { | 431 for (size_t i = 0; i < config_.rtp.rtx.ssrcs.size(); ++i) { |
| 432 uint32_t ssrc = config_.rtp.rtx.ssrcs[i]; | 432 uint32_t ssrc = config_.rtp.rtx.ssrcs[i]; |
| 433 rtp_states[ssrc] = vie_channel_->GetRtpStateForSsrc(ssrc); | 433 rtp_states[ssrc] = vie_channel_->GetRtpStateForSsrc(ssrc); |
| 434 } | 434 } |
| 435 | 435 |
| 436 return rtp_states; | 436 return rtp_states; |
| 437 } | 437 } |
| 438 | 438 |
| 439 void VideoSendStream::SignalNetworkState(Call::NetworkState state) { | 439 void VideoSendStream::SignalNetworkState(NetworkState state) { |
| 440 // When network goes up, enable RTCP status before setting transmission state. | 440 // When network goes up, enable RTCP status before setting transmission state. |
| 441 // When it goes down, disable RTCP afterwards. This ensures that any packets | 441 // When it goes down, disable RTCP afterwards. This ensures that any packets |
| 442 // sent due to the network state changed will not be dropped. | 442 // sent due to the network state changed will not be dropped. |
| 443 if (state == Call::kNetworkUp) | 443 if (state == kNetworkUp) |
| 444 vie_channel_->SetRTCPMode(kRtcpCompound); | 444 vie_channel_->SetRTCPMode(kRtcpCompound); |
| 445 vie_encoder_->SetNetworkTransmissionState(state == Call::kNetworkUp); | 445 vie_encoder_->SetNetworkTransmissionState(state == kNetworkUp); |
| 446 if (state == Call::kNetworkDown) | 446 if (state == kNetworkDown) |
| 447 vie_channel_->SetRTCPMode(kRtcpOff); | 447 vie_channel_->SetRTCPMode(kRtcpOff); |
| 448 } | 448 } |
| 449 | 449 |
| 450 int64_t VideoSendStream::GetRtt() const { | 450 int64_t VideoSendStream::GetRtt() const { |
| 451 webrtc::RtcpStatistics rtcp_stats; | 451 webrtc::RtcpStatistics rtcp_stats; |
| 452 uint16_t frac_lost; | 452 uint16_t frac_lost; |
| 453 uint32_t cumulative_lost; | 453 uint32_t cumulative_lost; |
| 454 uint32_t extended_max_sequence_number; | 454 uint32_t extended_max_sequence_number; |
| 455 uint32_t jitter; | 455 uint32_t jitter; |
| 456 int64_t rtt_ms; | 456 int64_t rtt_ms; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 vie_channel_->IsSendingFecEnabled()); | 504 vie_channel_->IsSendingFecEnabled()); |
| 505 | 505 |
| 506 // Restart the media flow | 506 // Restart the media flow |
| 507 vie_encoder_->Restart(); | 507 vie_encoder_->Restart(); |
| 508 | 508 |
| 509 return true; | 509 return true; |
| 510 } | 510 } |
| 511 | 511 |
| 512 } // namespace internal | 512 } // namespace internal |
| 513 } // namespace webrtc | 513 } // namespace webrtc |
| OLD | NEW |