srt icon indicating copy to clipboard operation
srt copied to clipboard

Perf stats instantenious timespan of the receiver's buffer

Open maxsharabayko opened this issue 5 years ago • 3 comments

CRcvBuffer::getRcvDataSize(…) reports the timespan of acknowledged packets in the receiver's buffer only if TSBPD is enabled. Although the value might be useful in both cases.

Note that the same function is used for TSBPD thread to trigger packet drop.

maxsharabayko avatar Oct 09 '19 13:10 maxsharabayko

@maxsharabayko I'm not sure if this still holds, but maybe it should be rechecked. The fix was applied to the old receiver buffer that is already deleted. Might be that this issue is no longer a problem.

ethouris avatar Feb 16 '24 17:02 ethouris

Still topical for the new receiver buffer. https://github.com/Haivision/srt/blob/09f35c0f1743e23f514cb41444504a7faeacf89e/srtcore/buffer_rcv.cpp#L621

maxsharabayko avatar Feb 19 '24 09:02 maxsharabayko

The problem is that in the file mode time is not important. Timestamps are also not assigned to particular packet, but they are set anew for retransmitted packets (that was the old behavior for UDT that was preserved in file mode in SRT). The "timespan" in case of TSBPD mode means for how long time the stream would have to be played. In file mode, including in the message variant, there's no "time" of the packets - they are available at the earliest time when there is a packet at cell 0 (stream) or there's a completely reassembled message available, no matter their timestamps (which don't represent the sending time anyway).

ethouris avatar Feb 19 '24 09:02 ethouris