Regarding QoS and RTPTransmissionStat
MANDJUKOWSKI Esteban
Esteban.Mandjukowski at telecomnancy.eu
Tue Oct 20 01:06:39 PDT 2026
Hello Live555 developers,
I am currently trying to integrate server-side quality of service statistics into my application, in order to track network issues between my server and the clients.
My code is structured like this :
- QoSRTSPClientSession, a subclass of RTSPServer::RTSPClientSession, that has a function called poll, which updates an array of QoSSnapshot by iterating over the RTPTransmissionStats found in the associated RTPSink :
void poll()
for (int i = 0; fNumStreamStates; i++) {
fStreamStates[i].subsession->getRTPSinkandRTCP(fStreamStates[i].streamToken, rtpSink, rtcp);
RTPTransmissionStatsDB::Iterator iter(rtpSink->transmissionStatsDB());
RTPTransmissionStats *stats = nullptr;
while ((stats = iter.next()) != NULL) {
// add to a vector of Snapshots or whatever
}
}
- QoSDashboard sets up a repetitive task, that calls every session's poll method.
- reuseFirstSource is set up to true for the MediaSubsession.
There are several points where I am struggling to understand how I should approach my goal while using live555 latest release (2026.10.17) :
- Iterating over the RTPTransmissionStats for each QoSRTSPClientSession gives me duplicates : this makes total sense since I can iterate over the same RTPSink twice (or more) if I have two (or more) clients connected to the same stream. I can always add a filter on top of it, but I was wondering if there were a better solution than that, like having a vector of SSRCs associated with the current RTSPClientSession.
- How to correlate the RTSPClientConnection (where I can easily get the IP address) and the different RTPTransmissionStats from RTPSinks : At first, I thought I could just use the lookup method with the correct SSRC, but I can not figure out how to get the SSRC of each StreamState associated to this specific RTSPClientSession. It feels like I am missing a piece : I have access to stats' SSRC, sink's SSRC, but no way to find out if any particular instance of RTPTransmissionStats is associated with the current QoSRTSPClientSession.
- How to display the correct IP address when the client is using TCP (even if frowned upon...) : since stats->lastFromAddress seems to be 0.0.0.0 (only for TCP of course) , I can only give it the IP address of the RTSPClientConnection... which is wrong on RTPTransmissionStats that are not correlated with this RTSPClientSession.
I have looked at
http://lists.live555.com/pipermail/live-devel/2012-January/014453.html : helped me a lot, but I do not understand how to decide if a RTPTransmissionStats instance is associated with my current RTSPClientSession or not.
http://lists.live555.com/pipermail/live-devel/2015-August/019584.html : did not help much
http://lists.live555.com/pipermail/live-devel/2007-April/006491.html
In the source code, I noticed RTCPInstance::setRRHandler . This could be the way to go, because of the fLastReceivedSSRC member, but I am still unsure on how I could correlate it to an instance of a QoSRTSPClientSession.
Again in the source code, the DestinationTable looks interesting, but it feels like it is way too complex for it to be the intended way.
Thanks !
MANDJUKOWSKI Esteban
More information about the live-devel
mailing list