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);
}
Esempio n. 2
0
u_int32_t RTPSink::presetNextTimestamp() {
  struct timeval timeNow;
  gettimeofday(&timeNow, NULL);

  u_int32_t tsNow = convertToRTPTimestamp(timeNow);
  fTimestampBase = tsNow;
  fNextTimestampHasBeenPreset = True;

  return tsNow;
}