[Live-devel] How to sync H264 and AAC timestamp from live streaming

Ross Finlayson finlayson at live555.com
Wed Oct 21 03:58:16 PDT 2015


> Now, our RTSP server stream H264+AAC works well with one client.
> If there is the second client to connect our server, first client’s video will freeze.

If you’re streaming from a live source, then your subclass of “OnDemandServerMediaSubsession” needs to set the “reuseFirstSource” parameter to “True” when it calls the “OnDemandServerMediaSubsession” constructor.  (This tells the server to use the same stream data for all concurrent clients.)


> I got the reason because doGetNextFrame will be blocked

No, the “doGetNextFrame()” function should never ‘block’ (or ‘spin wait’) for data.  If no data is immediately available when “doGetNextFrame()” is called, then “doGetNextFrame()” should return immediately.  Note the example code (and comments) in “liveMedia/DeviceSource.cpp”.

Once again:
Unfortunately, we’ve probably now reached the limit for how much assistance I can provide you ‘for free’ on this mailing list.  If your company is interested in having me consult further on your project, then please have your management let me know (via separate email).


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20151021/66b9f96c/attachment.html>


More information about the live-devel mailing list