Live555接收RTP的Jitter Buffer机制(Live555 Rtp Receive Jitter Buffer)

用了Live555 5年了,今天想找一下它接收RTP的防网络抖动的处理机制,看看其jitter buffer缓存时间到底是多长,追踪源码,如愿以偿。
ReorderingPacketBuffer类就是其对接收的RTP包根据seqno序号进行排队的缓存队列,live555的缺省队列缓存是100毫秒,注意代码注释default reordering threshold: 100 ms;
具体代码如下:
ReorderingPacketBuffer
::ReorderingPacketBuffer(BufferedPacketFactory* packetFactory)
: fThresholdTime(100000) /* default reordering threshold: 100 ms */,
fHaveSeenFirstPacket(False), fHeadPacket(NULL), fTailPacket(NULL), fSavedPacket(NULL), fSavedPacketFree(True) {
fPacketFactory = (packetFactory == NULL)
? (new BufferedPacketFactory)
: packetFactory;
}

另外,可以调用MultiFramedRTPSource::setPacketReorderingThresholdTime(unsigned uSeconds)函数修改RTP排队缓存时间,单位是微秒,对于局域网(不是wifi)可以缩减到60毫秒(60000), 对于公网,建议增加到160毫秒(160000)。

回复

你的邮件地址不会被公开(Your email address will not be published.) Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>