[Live-devel] Retrieving kbps of data sent by the Live555 RTSP server.
Ross Finlayson
finlayson at live555.com
Tue Oct 4 15:16:17 PDT 2016
> I can probably roll this myself and/or guess at the value, but I'm curious if there's an authoritative value somewhere that I can query to just get this... What I'd like to do is, from my Live555 RTSP server, determine the number of bytes sent, to all clients, per second.
There’s no way to get this (at least, not easily) without modifying the code. What I’d do is have a global counter variable - i.e., visible to all “RTPSink” objects, and then add a statement to "MultiFramedRTPSink::sendPacketIfNecessary()” at line 375 of “liveMedia/MultiFramedRTPSink.cpp”:
myGlobalCounter += fOutBuf->curPacketSize() + 8 + 20;
(I.e., counting 8 bytes for the UDP header and 20 bytes for the IP header.)
Then schedule a task every second to read and reset this global variable.
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
More information about the live-devel
mailing list