rtp使用ntp时间戳作为时间戳,用于实现rtsp音视频同步

This commit is contained in:
ziyue
2021-07-12 21:18:22 +08:00
parent eba3758b30
commit 298f6e3864
17 changed files with 184 additions and 29 deletions

View File

@@ -35,7 +35,7 @@ public:
void onRecvRtp(const Buffer::Ptr &buf, struct sockaddr *addr, int addr_len){
//统计rtp接受情况用于发送rr包
auto header = (RtpHeader *) buf->data();
onRtp(ntohs(header->seq), ntohl(header->stamp), _sample_rate, buf->size());
onRtp(ntohs(header->seq), ntohl(header->stamp), 0/*不发送sr,所以可以设置为0*/ , _sample_rate, buf->size());
sendRtcp(ntohl(header->ssrc), addr, addr_len);
}