重写rtcp框架

This commit is contained in:
xiongziliang
2021-01-31 19:18:17 +08:00
parent 629c39685b
commit 5c6560f55d
16 changed files with 1617 additions and 337 deletions

View File

@@ -414,4 +414,15 @@ string printSSRC(uint32_t ui32Ssrc) {
return tmp;
}
Buffer::Ptr makeRtpOverTcpPrefix(uint16_t size, uint8_t interleaved){
auto rtp_tcp = std::make_shared<BufferRaw>(4);
auto ptr = rtp_tcp->data();
ptr[0] = '$';
ptr[1] = interleaved;
ptr[2] = (size >> 8) & 0xFF;
ptr[3] = size & 0xFF;
rtp_tcp->setSize(4);
return rtp_tcp;
}
}//namespace mediakit