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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 } | 509 } |
510 | 510 |
511 return rtp_states; | 511 return rtp_states; |
512 } | 512 } |
513 | 513 |
514 void VideoSendStream::SignalNetworkState(NetworkState state) { | 514 void VideoSendStream::SignalNetworkState(NetworkState state) { |
515 // When network goes up, enable RTCP status before setting transmission state. | 515 // When network goes up, enable RTCP status before setting transmission state. |
516 // When it goes down, disable RTCP afterwards. This ensures that any packets | 516 // When it goes down, disable RTCP afterwards. This ensures that any packets |
517 // sent due to the network state changed will not be dropped. | 517 // sent due to the network state changed will not be dropped. |
518 if (state == kNetworkUp) | 518 if (state == kNetworkUp) |
519 vie_channel_->SetRTCPMode(RtcpMode::kCompound); | 519 vie_channel_->SetRTCPMode(config_.rtp.rtcp_mode); |
520 vie_encoder_->SetNetworkTransmissionState(state == kNetworkUp); | 520 vie_encoder_->SetNetworkTransmissionState(state == kNetworkUp); |
521 if (state == kNetworkDown) | 521 if (state == kNetworkDown) |
522 vie_channel_->SetRTCPMode(RtcpMode::kOff); | 522 vie_channel_->SetRTCPMode(RtcpMode::kOff); |
523 } | 523 } |
524 | 524 |
525 int64_t VideoSendStream::GetRtt() const { | 525 int64_t VideoSendStream::GetRtt() const { |
526 webrtc::RtcpStatistics rtcp_stats; | 526 webrtc::RtcpStatistics rtcp_stats; |
527 uint16_t frac_lost; | 527 uint16_t frac_lost; |
528 uint32_t cumulative_lost; | 528 uint32_t cumulative_lost; |
529 uint32_t extended_max_sequence_number; | 529 uint32_t extended_max_sequence_number; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 vie_encoder_->SetSsrcs(used_ssrcs); | 575 vie_encoder_->SetSsrcs(used_ssrcs); |
576 | 576 |
577 // Restart the media flow | 577 // Restart the media flow |
578 vie_encoder_->Restart(); | 578 vie_encoder_->Restart(); |
579 | 579 |
580 return true; | 580 return true; |
581 } | 581 } |
582 | 582 |
583 } // namespace internal | 583 } // namespace internal |
584 } // namespace webrtc | 584 } // namespace webrtc |
OLD | NEW |