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
This commit is contained in:
asapersson@webrtc.org 2012-06-28 07:21:51 +00:00
parent 1b1cd78dd2
commit 100463e828

View File

@ -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);