Open maxsharabayko opened 5 years ago
@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.
Still topical for the new receiver buffer. https://github.com/Haivision/srt/blob/09f35c0f1743e23f514cb41444504a7faeacf89e/srtcore/buffer_rcv.cpp#L621
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).
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.