Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: webrtc/video/video_send_stream.cc

Issue 1932683002: Remove ViEEncoder::SetNetworkStatus (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@move_pacer
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 712
713 for (size_t i = 0; i < config_.rtp.rtx.ssrcs.size(); ++i) { 713 for (size_t i = 0; i < config_.rtp.rtx.ssrcs.size(); ++i) {
714 uint32_t ssrc = config_.rtp.rtx.ssrcs[i]; 714 uint32_t ssrc = config_.rtp.rtx.ssrcs[i];
715 rtp_states[ssrc] = rtp_rtcp_modules_[i]->GetRtxState(); 715 rtp_states[ssrc] = rtp_rtcp_modules_[i]->GetRtxState();
716 } 716 }
717 717
718 return rtp_states; 718 return rtp_states;
719 } 719 }
720 720
721 void VideoSendStream::SignalNetworkState(NetworkState state) { 721 void VideoSendStream::SignalNetworkState(NetworkState state) {
722 // When network goes up, enable RTCP status before setting transmission state. 722 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
stefan-webrtc 2016/05/02 10:56:31 {}
723 // When it goes down, disable RTCP afterwards. This ensures that any packets 723 rtp_rtcp->SetRTCPStatus(state == kNetworkUp ? config_.rtp.rtcp_mode
724 // sent due to the network state changed will not be dropped. 724 : RtcpMode::kOff);
725 if (state == kNetworkUp) {
726 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
727 rtp_rtcp->SetRTCPStatus(config_.rtp.rtcp_mode);
728 }
729 vie_encoder_.SetNetworkTransmissionState(state == kNetworkUp);
730 if (state == kNetworkDown) {
731 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
732 rtp_rtcp->SetRTCPStatus(RtcpMode::kOff);
733 }
734 } 725 }
735 726
736 int VideoSendStream::GetPaddingNeededBps() const { 727 int VideoSendStream::GetPaddingNeededBps() const {
737 return vie_encoder_.GetPaddingNeededBps(); 728 return vie_encoder_.GetPaddingNeededBps();
738 } 729 }
739 730
740 void VideoSendStream::OnBitrateUpdated(uint32_t bitrate_bps, 731 void VideoSendStream::OnBitrateUpdated(uint32_t bitrate_bps,
741 uint8_t fraction_loss, 732 uint8_t fraction_loss,
742 int64_t rtt) { 733 int64_t rtt) {
743 vie_encoder_.OnBitrateUpdated(bitrate_bps, fraction_loss, rtt); 734 vie_encoder_.OnBitrateUpdated(bitrate_bps, fraction_loss, rtt);
(...skipping 17 matching lines...) Expand all
761 &module_nack_rate); 752 &module_nack_rate);
762 *sent_video_rate_bps += module_video_rate; 753 *sent_video_rate_bps += module_video_rate;
763 *sent_nack_rate_bps += module_nack_rate; 754 *sent_nack_rate_bps += module_nack_rate;
764 *sent_fec_rate_bps += module_fec_rate; 755 *sent_fec_rate_bps += module_fec_rate;
765 } 756 }
766 return 0; 757 return 0;
767 } 758 }
768 759
769 } // namespace internal 760 } // namespace internal
770 } // namespace webrtc 761 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698