[Live-devel] Live video and audio streaming using one RTSPServer
Ross Finlayson
finlayson at live555.com
Wed Nov 4 22:21:24 PST 2015
> Can you please give me a head start on how to correctly calculate the presentation times? For instance, do I need to have the same time value for an audio frame and a video frame that should be played together?
Yes.
> Should I use a shared presentation time variable for both streams?
I’m not sure what you mean by this, but I think the answer is no. You (presumably) have defined and implemented two subclasses of “FramedSource” - one for audio; one for video. Each of these has a “fPresentationTime” variable (in its parent class “FramedSource”). Each implementation of the “doGetNextFrame()” virtual function will need to set the “fPresentationTime” variable to an appropriate value before it completes delivery of the frame (by calling “FramedSource::afterGetting(this);”).
For an example of this, see the example code in “liveMedia/DeviceSource.cpp”.
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
More information about the live-devel
mailing list