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
This commit is contained in:
henrik.lundin@webrtc.org 2011-11-08 08:23:47 +00:00
parent 9b813510eb
commit f15fbc379d
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -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,