diff --git a/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc b/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc index 5555019de3..fd3b7af2c1 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc +++ b/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc @@ -115,37 +115,4 @@ int32_t RTPReceiverVideo::InvokeOnInitializeDecoder( return 0; } -int32_t RTPReceiverVideo::BuildRTPheader(const WebRtcRTPHeader* rtp_header, - uint8_t* data_buffer) const { - data_buffer[0] = static_cast(0x80); // version 2 - data_buffer[1] = static_cast(rtp_header->header.payloadType); - if (rtp_header->header.markerBit) { - data_buffer[1] |= kRtpMarkerBitMask; // MarkerBit is 1 - } - RtpUtility::AssignUWord16ToBuffer(data_buffer + 2, - rtp_header->header.sequenceNumber); - RtpUtility::AssignUWord32ToBuffer(data_buffer + 4, - rtp_header->header.timestamp); - RtpUtility::AssignUWord32ToBuffer(data_buffer + 8, rtp_header->header.ssrc); - - int32_t rtp_header_length = 12; - - // Add the CSRCs if any - if (rtp_header->header.numCSRCs > 0) { - if (rtp_header->header.numCSRCs > 16) { - // error - assert(false); - } - uint8_t* ptr = &data_buffer[rtp_header_length]; - for (uint32_t i = 0; i < rtp_header->header.numCSRCs; ++i) { - RtpUtility::AssignUWord32ToBuffer(ptr, rtp_header->header.arrOfCSRCs[i]); - ptr += 4; - } - data_buffer[0] = (data_buffer[0] & 0xf0) | rtp_header->header.numCSRCs; - // Update length of header - rtp_header_length += sizeof(uint32_t) * rtp_header->header.numCSRCs; - } - return rtp_header_length; -} - } // namespace webrtc diff --git a/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.h b/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.h index d617d0a856..8528a7d6b7 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.h +++ b/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.h @@ -55,10 +55,6 @@ class RTPReceiverVideo : public RTPReceiverStrategy { const PayloadUnion& specific_payload) const override; void SetPacketOverHead(uint16_t packet_over_head); - - private: - int32_t BuildRTPheader(const WebRtcRTPHeader* rtp_header, - uint8_t* data_buffer) const; }; } // namespace webrtc