[Live-devel] TS bit rate

Ross Finlayson finlayson at live.com
Mon Jun 14 12:01:36 PDT 2004


>I have tested the testOnDemandRTSPServer for streaming a MPEG2 TS file and 
>it worked fine. But then i tested it in other machine without RTC and it 
>is too slow sending the data and my rtsp client underflows it's internal 
>buffer.
>
>I do not know why this happens and i would like to know how is the time 
>elapsed between sent packets treated. In wich file can i check this?

This duration is computed by the "MPEG2TransportStreamFramer" class.

>  Is the time got with gettimeofday?

No, the desired duration between packets is computed only from the PCR 
timestamps in the MPEG Transport Stream data.  However, to accurately send 
packets at the desired rate (i.e., with the correct time spacing between 
them), the system relies upon:
         1/ The 'timeout' parameter in "select()" (see 
"BasicTaskScheduler::SingleStep()" in 
"BasicUsageEnvironment/BasicTaskScheduler.cpp"), and
         2/ "gettimeofday()" to determine how much time has actually 
elapsed (see "BasicUsageEnvironment/DelayQueue.cpp").

I'm not sure exactly what you mean when you say that your machine is 
without a RTC (presumably, "real-time clock"), but pretty much all of the 
LIVE.COM code relies upon "gettimeofday()" being reasonably 
accurate.  (It's OK if the granularity of the time returned by 
"gettimeofday()" is rather course, but it's essential that this time remain 
accurate.)


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



More information about the live-devel mailing list