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:
mflodman@webrtc.org
2015-02-12 09:54:18 +00:00
parent 006521d5bd
commit a4ef2ce29d
5 changed files with 69 additions and 35 deletions

View File

@ -33,6 +33,8 @@ class PayloadRouter {
PayloadRouter();
~PayloadRouter();
static size_t DefaultMaxPayloadLength();
// Rtp modules are assumed to be sorted in simulcast index order.
void SetSendingRtpModules(const std::list<RtpRtcp*>& rtp_modules);
@ -52,6 +54,10 @@ class PayloadRouter {
const RTPFragmentationHeader* fragmentation,
const RTPVideoHeader* rtp_video_hdr);
// Returns the maximum allowed data payload length, given the configured MTU
// and RTP headers.
size_t MaxPayloadLength() const;
private:
scoped_ptr<CriticalSectionWrapper> crit_;