[Live-devel] byte rate
Ketan Gholap
ketangholap1990 at gmail.com
Wed Jun 27 07:59:21 PDT 2012
*
Hello Sir
i try'ed calculating the bit/byte rate using the method mentioned below´ as
int o1=videoSink->octetCount();
videoSink->startPlaying(*videoSource, afterPlaying, videoSink);
**
**
int o2=videoSink->octetCount();
*
*
*
*At both times the value of o1 and o2 are zero.*
*
*
*Kindly help to find bit/byte rate.*
*
**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.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120627/e7d9a362/attachment-0001.html>
More information about the live-devel
mailing list