-
Notifications
You must be signed in to change notification settings - Fork 856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] Improved 'no room to store' log message #1909
[core] Improved 'no room to store' log message #1909
Conversation
I've been always suspecting here the TSBPD thread that does not sign off packets early enough, but this could as well look like the application isn't being given enough time slice to read all packets that are ready to play. Might be as well due to that suddenly by some reason (likely drift changes) there have been "signed off" a large number of packets and the application could not extract them fast enough. Could be, however, that the drift change has caused that many packets being previously ready to play became not ready to play after the change, this state has lasted for some longer time due to a temporary high burst of packets being sent, and then later the drift returned to previous value, signing off this way a large number of packets, still after the previous change has caused the receiver buffer to get full. Nevertheless, I'd start with displaying the number of packets ready to play at the moment when the application is reading them, as well as regarding the TSBPD thread changing the read-readiness on the socket (and the packet reading function as well, it does it basing on the same check). Also the first and last packet in the range together with its play time. |
06938cb
to
55c1d9a
Compare
Updated format:
|
6d92119
to
317bfca
Compare
Problem Statement
The current "no room to store incoming packet" log message format does not provide enough hints to define the reason.
Proposed Log Message
Log level: warning (as before).
TSBPD ready in -1680 : -1219 ms indicates that there are 658 packets available for reading for already at least 1.6 seconds.
SRT_RCVLATENCY
is 1s, it can be seen the timestamp of the receiver buffer is less (593 ms). The first packet can be read only in 383 ms, which means the current target buffering delay is 593 + 383 = 976ms.Related issue #409
Possible Reasons for Not Enough Room
Possible reasons for not having enough room for an incoming packet are the following.
1. Receiving Application Is Not Reading
Data is available to be read from SRT socket, but the application is not reading or not reading fast enough. Excessive data is accumulated in the receiver buffer (above the buffering latency).
Need a way to tell how many packets are available for reading (including TSBPD readiness).
2. TSBPD-related:
SRT receiving application is reading fast enough, but there is not enough space to apply the buffering latency for the incoming bitrate.
Possible reasons:
(latency_ms + rtt_ms / 2) * bps / 1000 / 8
.SRTO_RCVLATENCY
.The actual receiver buffer timespan (
stats.msRcvBuf
+ 10ms of unACKed packets) should roughly correspond to theSRTO_RCVLATENCY
.Need a way to tell how many packets (in ms timespan) are not yet available for reading.