[Live-devel] [PATCH] Improve efficiency of interleaved transportwhen one or more streams are being ignored

Colin Caughie ccaughie at openeye.net
Mon Apr 1 16:56:30 PDT 2013


My apologies, I accidentally left in an unused variable declaration that
I was using for debug purposes. Amended patch attached.

 

 

From: live-devel-bounces at ns.live555.com
[mailto:live-devel-bounces at ns.live555.com] On Behalf Of Colin Caughie
Sent: Monday, April 01, 2013 4:46 PM
To: live-devel at ns.live555.com
Subject: [Live-devel] [PATCH] Improve efficiency of interleaved
transportwhen one or more streams are being ignored

 

When an application is receiving data on some but not all of the streams
in an interleaved RTSP session (i.e. it isn't calling getNextFrame() for
some of the streams), the streams that are not being received consume an
enormous amount of CPU cycles compared to the streams that are being
processed. This is because the RTPInterface code reads the data one byte
at a time, returning to the select() loop after each byte.

 

This patch largely eliminates the problem by only returning to the
select loop once all data currently in the socket buffer has been
consumed (or after 2000 reads to avoid starvation). It could probably be
made more efficient still by reading more than one byte at a time, but
this approach involved the least amount of change to the existing code.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130401/e63aa053/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tcploop.patch
Type: application/octet-stream
Size: 3755 bytes
Desc: tcploop.patch
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130401/e63aa053/attachment.obj>


More information about the live-devel mailing list