From f15fbc379d7c942832c392fc0c71858d19e852f7 Mon Sep 17 00:00:00 2001 From: "henrik.lundin@webrtc.org" Date: Tue, 8 Nov 2011 08:23:47 +0000 Subject: [PATCH] Change in RTP module SendVP8 Changing how the max payload length is calculated. Instead of handling RTP and FEC header overhead explicitly, call the MaxDataPayloadLength method which already does it. Avoid redundant code. Had to move MaxDataPayloadLength to the RTPSenderInterface. Review URL: http://webrtc-codereview.appspot.com/269002 git-svn-id: http://webrtc.googlecode.com/svn/trunk@901 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/modules/rtp_rtcp/source/rtp_sender.h | 1 + src/modules/rtp_rtcp/source/rtp_sender_video.cc | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/rtp_rtcp/source/rtp_sender.h b/src/modules/rtp_rtcp/source/rtp_sender.h index 03c13cc519..0f27883aff 100644 --- a/src/modules/rtp_rtcp/source/rtp_sender.h +++ b/src/modules/rtp_rtcp/source/rtp_sender.h @@ -49,6 +49,7 @@ public: virtual WebRtc_UWord16 IncrementSequenceNumber() = 0; virtual WebRtc_UWord16 SequenceNumber() const = 0; virtual WebRtc_UWord16 MaxPayloadLength() const = 0; + virtual WebRtc_UWord16 MaxDataPayloadLength() const = 0; virtual WebRtc_UWord16 PacketOverHead() const = 0; virtual WebRtc_UWord16 TargetSendBitrateKbit() const = 0; virtual WebRtc_UWord16 ActualSendBitrateKbit() const = 0; diff --git a/src/modules/rtp_rtcp/source/rtp_sender_video.cc b/src/modules/rtp_rtcp/source/rtp_sender_video.cc index 3b466b27fe..c1ba25bd7a 100644 --- a/src/modules/rtp_rtcp/source/rtp_sender_video.cc +++ b/src/modules/rtp_rtcp/source/rtp_sender_video.cc @@ -1266,8 +1266,7 @@ RTPSenderVideo::SendVP8(const FrameType frameType, WebRtc_Word32 payloadBytesToSend = payloadSize; const WebRtc_UWord8* data = payloadData; - WebRtc_UWord16 maxPayloadLengthVP8 = _rtpSender.MaxPayloadLength() - - FECPacketOverhead() - rtpHeaderLength; + WebRtc_UWord16 maxPayloadLengthVP8 = _rtpSender.MaxDataPayloadLength(); assert(rtpTypeHdr); RtpFormatVp8 packetizer(data, payloadBytesToSend, rtpTypeHdr->VP8,