void MultiFramedRTPSink::setTimestamp(struct timeval framePresentationTime) { // First, convert the presentation time to a 32-bit RTP timestamp: fCurrentTimestamp = convertToRTPTimestamp(framePresentationTime); // Then, insert it into the RTP packet: fOutBuf->insertWord(fCurrentTimestamp, fTimestampPosition); }
u_int32_t RTPSink::presetNextTimestamp() { struct timeval timeNow; gettimeofday(&timeNow, NULL); u_int32_t tsNow = convertToRTPTimestamp(timeNow); fTimestampBase = tsNow; fNextTimestampHasBeenPreset = True; return tsNow; }