From 100463e8281e3fc99d84cf00410b45209b069ce5 Mon Sep 17 00:00:00 2001 From: "asapersson@webrtc.org" Date: Thu, 28 Jun 2012 07:21:51 +0000 Subject: [PATCH] Added initial nack configuration for rtp module. Review URL: https://webrtc-codereview.appspot.com/677007 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2453 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/video_engine/vie_channel.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/video_engine/vie_channel.cc b/src/video_engine/vie_channel.cc index 57b15a086e..42101e0a26 100644 --- a/src/video_engine/vie_channel.cc +++ b/src/video_engine/vie_channel.cc @@ -221,6 +221,8 @@ WebRtc_Word32 ViEChannel::SetSendCodec(const VideoCodec& video_codec, restart_rtp = true; rtp_rtcp_->SetSendingStatus(false); } + NACKMethod nack_method = rtp_rtcp_->NACK(); + CriticalSectionScoped cs(rtp_rtcp_cs_.get()); if (video_codec.numberOfSimulcastStreams > 0) { @@ -246,6 +248,10 @@ WebRtc_Word32 ViEChannel::SetSendCodec(const VideoCodec& video_codec, WEBRTC_TRACE(kTraceWarning, kTraceVideo, ViEId(engine_id_, channel_id_), "%s: RTP::SetRTCPStatus failure", __FUNCTION__); } + if (nack_method != kNackOff) { + rtp_rtcp->SetStorePacketsStatus(true, kNackHistorySize); + rtp_rtcp->SetNACKStatus(nack_method); + } simulcast_rtp_rtcp_.push_back(rtp_rtcp); } // Remove last in list if we have too many. @@ -561,6 +567,7 @@ WebRtc_Word32 ViEChannel::ProcessNACKRequest(const bool enable) { it++) { RtpRtcp* rtp_rtcp = *it; rtp_rtcp->SetStorePacketsStatus(true, kNackHistorySize); + rtp_rtcp->SetNACKStatus(nackMethod); } } else { CriticalSectionScoped cs(rtp_rtcp_cs_.get()); @@ -569,6 +576,7 @@ WebRtc_Word32 ViEChannel::ProcessNACKRequest(const bool enable) { it++) { RtpRtcp* rtp_rtcp = *it; rtp_rtcp->SetStorePacketsStatus(false); + rtp_rtcp->SetNACKStatus(kNackOff); } rtp_rtcp_->SetStorePacketsStatus(false); vcm_.RegisterPacketRequestCallback(NULL);