[Live-devel] Bandwith determination using Receiver Report.

Ross Finlayson finlayson at live.com
Fri Jan 21 18:49:08 PST 2005


>Yeah, more like the data corresponding to the RR packet is not
>available due to slow source and was written to RTPSink with some delay.

I still don't understand this.  The timing information in outgoing data 
packets (i.e., RTP timestamps) and in outgoing RTCP SR packets (i.e., NTP 
timestamps) will be very accurate, because they are set just before the 
packet is written.  I.e., there is no significant delay between the time 
that the timing information is set in outgoing packets, and the time that 
the packet gets sent.  (The blocking read from your input file occurs 
somewhere else in the thread, and doesn't affect this at all.)

> > If that's the case, then you may want to consider changing your data source
> > class so that reads from it happen asynchrononously (i.e., in a
> > non-blocking fashion), rather than synchronously.  (In particular, if you
> > are using "ByteStreamFileSource"[*] for your data source, then you will
> > need to use a different source class (that you would write) instead.)
>
>So, are you saying that fFid should be set to non-blocking?

No, keep it blocking, but register it to be read asynchronously - using
         envir().taskScheduler().turnOnBackgroundReadHandling()
(see "liveMedia/DeviceSource()" for a template for how to do this.)

> > Another possibility, of course, is not to use RTCP RR information at all,
> > but instead to just use "RTCPSink::octetCount()" - the byte count of
> > outgoing data that's maintained by the server application itself.  This is
> > always accurate.  (However, this won't measure packet loss.)
>
>yes, that might be a problem. Assuming packet loss number can be ignored
>and (RTPSink::OctetCount() returns total number of packets sent till now),
>how can you estimate time in which it was actively sending packets.

There's no way to do this with the existing code, but you could add code to
         MultiFramedRTPSink::sendPacketIfNecessary()
that records the time when
         sendPacket()
was last called.  That will correspond (exactly) to the time that 
"octetCount()" was last updated.


	Ross Finlayson
	LIVE.COM
	<http://www.live.com/>



More information about the live-devel mailing list