Updating the mtu.

Review URL: https://webrtc-codereview.appspot.com/470002

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1962 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
mflodman@webrtc.org 2012-03-30 14:35:51 +00:00
parent 20f4440c73
commit a6a9964346
2 changed files with 9 additions and 1 deletions

View File

@ -73,7 +73,8 @@ ViEChannel::ViEChannel(WebRtc_Word32 channel_id,
effect_filter_(NULL),
color_enhancement_(true),
vcm_rttreported_(TickTime::Now()),
file_recorder_(channel_id) {
file_recorder_(channel_id),
mtu_(0) {
WEBRTC_TRACE(kTraceMemory, kTraceVideo, ViEId(engine_id, channel_id),
"ViEChannel::ViEChannel(channel_id: %d, engine_id: %d)",
channel_id, engine_id);
@ -312,6 +313,9 @@ WebRtc_Word32 ViEChannel::SetSendCodec(const VideoCodec& video_codec,
"%s: could not register payload type", __FUNCTION__);
return -1;
}
if (mtu_ != -1) {
rtp_rtcp->SetMaxTransferUnit(mtu_);
}
if (restart_rtp) {
rtp_rtcp->SetSendingStatus(true);
}
@ -1852,6 +1856,7 @@ WebRtc_Word32 ViEChannel::SetMTU(WebRtc_UWord16 mtu) {
RtpRtcp* rtp_rtcp = *it;
rtp_rtcp->SetMaxTransferUnit(mtu);
}
mtu_ = mtu;
return 0;
}

View File

@ -392,6 +392,9 @@ class ViEChannel
TickTime vcm_rttreported_;
ViEFileRecorder file_recorder_;
// User set MTU, -1 if not set.
uint16_t mtu_;
};
} // namespace webrtc