[Live-devel] Http/Mjpeg to Rtsp/Mpeg4 video transcoding latency

Ross Finlayson finlayson at live555.com
Sun Oct 21 05:44:46 PDT 2012


> Mjpeg streaming and encoding  is done in separate thread and the output AVPackets are stored in a que
> 
> FramedSource::doGetNextFrame check if there is any packet in the que and deliver it, otherwise schedule a delayed call on FramedSource::doGetNextFrameStatic to do frame checking again.

This is inefficient.  A much better solution is to use 'event triggers', and whenever a new encoded frame has been completed, have the encoding thread call "triggerEvent()" (the only LIVE555 function that can be called from a non-LIVE555 thread) to tell the LIVE555 thread that a new frame is available for delivery.

For an illustration of how to do this, see the model code in "liveMedia/DeviceSource.cpp".


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/20121021/db53d99e/attachment.html>


More information about the live-devel mailing list