Hello everyone,
In live555 library, in the file RTPSink.cpp, and in the function
convertToRTPTimestamp:
RTPSink::convertToRTPTimestamp(struct timeval tv) {
// Begin by converting from "struct timeval" units to RTP timestamp units:
(1)u_int32_t timestampIncrement = (fTimestampFrequency*tv.tv_sec);
(2)timestampIncrement += (u_int32_t)((2.0*fTimestampFrequency*tv.tv_usec +
1000000.0)/2000000);
// note: rounding
I found the (2) statement is some strange. In fact, it is equal to
90000*(tv.tv_usec) + 0.5
Can anyone tell me why it compute the timestamp this way? Why there is a 0.5?
Thank in advance.
Austin
_______________________________________________
live-devel mailing list
[email protected]
http://lists.live555.com/mailman/listinfo/live-devel