<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.23415"></HEAD>
<BODY>
<DIV><FONT face=Arial>
<DIV><FONT size=2 face=Arial><SPAN
class=580024614-05112012>Hi,</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=580024614-05112012></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN class=580024614-05112012>we want to use
live555 in one of our products on the WinCE platform and we have some
issues with timestamp calculation.</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN class=580024614-05112012>From file
liveMedia/RTPSink.cpp:</SPAN></FONT></DIV>
<DIV><SPAN class=580024614-05112012>
<P><FONT size=2 face="Courier New">u_int32_t
RTPSink::convertToRTPTimestamp(<FONT color=#0000ff><FONT
color=#0000ff>struct</FONT></FONT> timeval tv) {</FONT></P>
<P><FONT color=#008000><FONT color=#008000><FONT size=2 face="Courier New">//
Begin by converting from "struct timeval" units to RTP timestamp
units:</FONT></P></FONT></FONT>
<P><FONT size=2 face="Courier New">u_int32_t timestampIncrement =
(fTimestampFrequency*tv.tv_sec);</FONT></P>
<P><FONT size=2 face="Courier New"><U>timestampIncrement +=
(u_int32_t)((2.0*fTimestampFrequency*tv.tv_usec +
1000000.0)/2000000);</U></FONT></P>
<P><FONT color=#008000><FONT color=#008000 size=2 face="Courier New">// note:
rounding</FONT></FONT></P>
<P><SPAN class=580024614-05112012><FONT color=#008000
size=2>...</FONT></SPAN></P></SPAN></DIV>
<DIV><FONT size=2><SPAN class=580024614-05112012>Could you tell me why you are
calculation the timstampIncrement like this? Is there a reason for adding
'1000000.0'?</SPAN></FONT></DIV>
<DIV><SPAN class=580024614-05112012><SPAN class=348523115-05112012><FONT
size=2>This doesn't make sense to me.</FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=580024614-05112012><SPAN
class=348523115-05112012></SPAN></SPAN> </DIV>
<DIV><FONT size=2><SPAN class=580024614-05112012>I would
suggest:</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=580024614-05112012></SPAN></FONT> </DIV>
<DIV><SPAN class=580024614-05112012></SPAN><SPAN class=580024614-05112012><FONT
size=2 face="Courier New">timestampIncrement +=
(tv.tv_usec*fTimestampFrequency/1000<SPAN
class=348523115-05112012>000.0</SPAN>);</FONT></DIV></SPAN>
<P><FONT size=2 face=Arial><SPAN class=580024614-05112012>Kind
Regards,</SPAN></FONT></P>
<DIV><FONT size=2 face=Arial><SPAN class=580024614-05112012>Simon
Röhrl</SPAN></FONT></DIV></FONT></DIV></BODY></HTML>