[Live-devel] [PATCH] Improve efficiency of interleaved transport when one or more streams are being ignored
Colin Caughie
ccaughie at openeye.net
Mon Apr 1 16:45:33 PDT 2013
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/9f60b7e0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tcploop.patch
Type: application/octet-stream
Size: 4179 bytes
Desc: tcploop.patch
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130401/9f60b7e0/attachment.obj>
More information about the live-devel
mailing list