[Live-devel] RTP Timestamp problem in testMPEG1or2AudioVideo.cpp
David BERTRAND
bidibulle at operamail.com
Tue May 24 22:21:39 PDT 2005
Ross,
FYI, I fixed my problem by commenting the first-packet treatment in RTPSink::convertToRTPTimestamp :
RTPSink::convertToRTPTimestamp(struct timeval tv, Boolean isFirstTime) {
// Thats IMO why RTP timestamps are not consistent when doing stopPlaying and then startplaying again !
/* if (isFirstTime) {
// Make the first timestamp the same as the current "fTimestampBase", so that
// timestamps begin with the value we promised when this "RTPSink" was created:
u_int32_t rtpTimestampIncrement = timevalToTimestamp(tv);
fTimestampBase -= rtpTimestampIncrement;
} */
return convertToRTPTimestamp(tv);
}
Do you think this special treatment to have first RTP timestamp sent being the value returned by random() at RTPSink creation really needed ? I think it may confuse some players when playing a file continuously, as each time a startPlaying is called, the RTP timestamp base is reduced by the value of "rtpTimestampIncrement".
Please let me know if you find a proper way to fix my problem.
Cheers.
David.
> > I try to run testMPEG1or2AudioVideo.cpp and to use QuickTime
> > player to get the audio and video streams. This test program
> > continuously reads and streams a MPEG file but when the file has
> > ended and is reopend, my QT player is confused and cannot render
> > the streams correctly.
>
> This seems to be a problem with QuickTime Player. Instead, I
> suggest using VLC; it will continue to play the stream properly
> after the file is reopened.
>
> I don't think the problem (with QuickTime Player) has anything to
> do with RTP timestamps.
>
>
> Ross Finlayson
> LIVE.COM
> <http://www.live.com/>
>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live.com
> http://lists.live.com/mailman/listinfo/live-devel
--
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 8 at http://www.opera.com
Powered by Outblaze
More information about the live-devel
mailing list