[Live-devel] MP3 streaming problem

Ross Finlayson finlayson at live555.com
Tue Apr 19 12:19:25 PDT 2016


> We have a video subsession, which works fine streaming H.264 video frames.
> We added another subsession for audio, we return as you suggested our
> own framed source subclass.
> 
> The interesting thing is if we NOT ADD the video subsession to the
> ServerMediaSession, the audio hears perfectly well. However, if we add
> the video subsession, as well as the audio subsession we started to
> hear some glitches.
> Any ideas?

Problems like this are usually caused by one of two possible things:

1/ You are blocking (or ‘spin waiting’) in one or both of your “FramedSource” subclasses (implementing your audio and/or video device).  You should not do this!  Remember that LIVE555-based applications are event-based, using a single-threaded event loop for concurrency.  If no data is immediately available, you should not block (or ‘spin wait’), because that would prevent events (for the other medium) from getting handled.  Instead, you should immediately return (to the event loop).

2/ You are not setting “fPresentationTime” properly in your video or audio media - of both.  The “fPresentationTime” values for each medium should be in sync, and aligned with ‘wall clock’ time (i.e., the time that you’d get by calling “gettimeofday()”).

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




More information about the live-devel mailing list