2,543
社区成员
发帖
与我相关
我的任务
分享
unsigned int convertToRTPTimestamp(/*struct timeval tv*/)
{
struct timeval tv;
gettimeofday(&tv, NULL);
unsigned int timestampIncrement = (90000*tv.tv_sec);
timestampIncrement += (unsigned int )((2.0*90000*tv.tv_usec + 1000000.0)/2000000);
unsigned int const rtpTimestamp = timestampIncrement;
return rtpTimestamp;
}