[Live-devel] Byte rate of live media server
Warren Young
warren at etr-usa.com
Thu May 31 16:08:05 PDT 2012
On 5/28/2012 8:09 AM, Ketan Gholap wrote:
>
> i was wondering how to
> find out the bit/byte rate of streaming of live media server,that i can
> print on the console???
If you're streaming using an RTPSink object, call its octetCount()
method at two known times. Then:
double mbits_sent = (o2 - o1) / 1024.0 / 1024.0 / (s2 - s1);
where o2 and o1 are the octetCount() values at time_t s2 and s1.
Ross, could you please lift this method up a level, to MediaSink? I
wanted it when playing around with raw UDP streaming a few weeks ago.
It would also avoid the need to dynamic_cast<> the sink object in
certain circumstances, such as when accessing MediaSubsession::sink.
More information about the live-devel
mailing list