Remove getting max payload length from default module.
Moving functionality to get max payload length from default RTP module to the payload router. I'll make a follow up CL changing asserts to DCHECK in rtp_rtcp_impl.cc. BUG=769 TEST=New unittest and existing sender mtu test R=stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/36119004 Cr-Commit-Position: refs/heads/master@{#8345} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8345 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -555,31 +555,8 @@ uint16_t ModuleRtpRtcpImpl::MaxPayloadLength() const {
|
||||
}
|
||||
|
||||
uint16_t ModuleRtpRtcpImpl::MaxDataPayloadLength() const {
|
||||
// Assuming IP/UDP.
|
||||
uint16_t min_data_payload_length = IP_PACKET_SIZE - 28;
|
||||
|
||||
if (IsDefaultModule()) {
|
||||
// For default we need to update all child modules too.
|
||||
CriticalSectionScoped lock(critical_section_module_ptrs_.get());
|
||||
std::vector<ModuleRtpRtcpImpl*>::const_iterator it = child_modules_.begin();
|
||||
while (it != child_modules_.end()) {
|
||||
RtpRtcp* module = *it;
|
||||
if (module) {
|
||||
uint16_t data_payload_length =
|
||||
module->MaxDataPayloadLength();
|
||||
if (data_payload_length < min_data_payload_length) {
|
||||
min_data_payload_length = data_payload_length;
|
||||
}
|
||||
}
|
||||
it++;
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t data_payload_length = rtp_sender_.MaxDataPayloadLength();
|
||||
if (data_payload_length < min_data_payload_length) {
|
||||
min_data_payload_length = data_payload_length;
|
||||
}
|
||||
return min_data_payload_length;
|
||||
assert(!IsDefaultModule());
|
||||
return rtp_sender_.MaxDataPayloadLength();
|
||||
}
|
||||
|
||||
int32_t ModuleRtpRtcpImpl::SetTransportOverhead(
|
||||
|
||||
Reference in New Issue
Block a user