Hello, My name is Jennifer Valle and I am doing the final degree project in UPC with some of its cameras, in particular, NC353L Elphel cameras with the original code of Live555 about the RTSP protocol. I want to syncronized different cameras and I need its timestamps. In this code, there are a testProgs_rtsp function with a struct timeval called PresentationTime and I think that it's the same that timestamp of the server (cameras) when the RTCP is synchronized. I have a problem because when I execute the program, and RTCP is syncronized, I obtain negatives times and i don't understand why this occurs.
The part of the code that I want to modify is in DummySink::afterGettingFrame function. void DummySink::afterGettingFrame(unsigned frameSize, unsigned > numTruncatedBytes,struct timeval presentationTime, unsigned > /*durationInMicroseconds*/) { > // We've just received a frame of data. (Optionally) print out > information about it: > #ifdef DEBUG_PRINT_EACH_RECEIVED_FRAME > if (fStreamId != NULL) envir() << "Stream \"" << fStreamId << "\"; "; > envir() << fSubsession.mediumName() << "/" << fSubsession.codecName() << > ":\tReceived " << frameSize << " bytes"; > if (numTruncatedBytes > 0) envir() << " (with " << numTruncatedBytes << > " bytes truncated)"; > char uSecsStr[6+1]; // used to output the 'microseconds' part of the > presentation time > sprintf(uSecsStr, "%06u", (unsigned)presentationTime.tv_usec); > envir() << ".\tPresentation time: " << (int)presentationTime.tv_sec << > "." << uSecsStr; > if (fSubsession.rtpSource() != NULL && > !fSubsession.rtpSource()->hasBeenSynchronizedUsingRTCP()) { > envir() << "(not RTCP-synchronized!)"; // mark the debugging output to > indicate that this presentation time is not RTCP-synchronized > } > #ifdef DEBUG_PRINT_NPT > envir() << "\tNPT: " << fSubsession.getNormalPlayTime(presentationTime); > #endif > envir() << "\n"; #endif And I obtain "incorrects" PresentationTimes: Stream "rtsp://pa1"; video/JPEG: Received 97775 bytes. Presentation time: > 1448129165.229872(not RTCP-synchronized!) NPT: 0.000000 > Stream "rtsp://pa1"; video/JPEG: Received 98174 bytes. Presentation time: > 1448129165.265949(not RTCP-synchronized!) NPT: 0.000000 > Stream "rtsp://pa1"; video/JPEG: Received 98264 bytes. Presentation time: > -760859674.598727 NPT: 0.000000 > Stream "rtsp://pa1"; video/JPEG: Received 98233 bytes. Presentation time: > -760859674.634804 NPT: 0.000000 > Stream "rtsp://pa1"; video/JPEG: Received 98228 bytes. Presentation time: > -760859674.670881 NPT: 0.000000 > Stream "rtsp://pa1"; video/JPEG: Received 98644 bytes. Presentation time: > -760859674.706947 NPT: 0.000000 > Stream "rtsp://pa1"; video/JPEG: Received 98337 bytes. Presentation time: > -760859674.743024 NPT: 0.000000 > Stream "rtsp://pa1"; video/JPEG: Received 98147 bytes. Presentation time: > -760859674.779101 NPT: 0.000000 > Stream "rtsp://pa1"; video/JPEG: Received 97848 bytes. Presentation time: > -760859674.815178 NPT: 0.000000 How could you get the correct timestamp the server gives each frame? Is it the PresentationTime after RTCP is syncronized or is an another variable? If I have to use the PresentationTime, why do I get incorrect values? Kind regards. Jennifer Valle
_______________________________________________ Support-list mailing list Support-list@support.elphel.com http://support.elphel.com/mailman/listinfo/support-list_support.elphel.com