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.
tcploop.patch
Description: tcploop.patch
_______________________________________________ live-devel mailing list [email protected] http://lists.live555.com/mailman/listinfo/live-devel
