void WebRtcConnection::writeSsrc(char* buf, int len, unsigned int ssrc) { rtpheader *head = (rtpheader*) buf; rtcpheader *chead = reinterpret_cast<rtcpheader*> (buf); //if it is RTCP we check it it is a compound packet if (chead->packettype == RTCP_Sender_PT || chead->packettype == RTCP_Receiver_PT || chead->packettype == RTCP_PS_Feedback_PT || chead->packettype == RTCP_RTP_Feedback_PT) { processRtcpHeaders(buf,len,ssrc); } else { head->ssrc=htonl(ssrc); } }
void WebRtcConnection::writeSsrc(char* buf, int len, unsigned int ssrc) { RtpHeader *head = reinterpret_cast<RtpHeader*> (buf); RtcpHeader *chead = reinterpret_cast<RtcpHeader*> (buf); //if it is RTCP we check it it is a compound packet if (chead->isRtcp()) { processRtcpHeaders(buf,len,ssrc); } else { head->ssrc=htonl(ssrc); } }