<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
--></style><title>Re: [Live-devel] Packet loss in case of high bit
rate mpeg</title></head><body>
<div>As you've noted/realized, any packet loss - other than network
packet loss - that occurs in a system that uses our code *must* be the
fault of insufficient buffering inside the OS. I.e., this is an
OS problem, and any fix/workaround needs to address this.</div>
<div><br></div>
<div>Unfortunately there is no good way for our code to handle a
failed network write (i.e., no good way to 'retry' the write later).
Instead, we'll need to set things up to ensure (with high probability)
that network writes do not fail. Note also that we can't try to
avoid these write failures by making network sockets blocking.
The calls to "makeSocketNonBlocking()" are there for a good
reason (e.g., to overcome the problem that Marc Neuberger noted in
<<font face="Lucida Grande" size="-4"
color="#000000"
>http://lists.live555.com/pipermail/live-devel/2007-June/006890.html</font
>>), so removing those calls is *not* an acceptable solution.</div>
<div><br></div>
<div>The simplest solution, it seems, is simply to make sure that
there is reasonable buffering inside the OS on writeable sockets.
To do this, add</div>
<div><x-tab>
</x-tab>increaseSendBufferTo(envir(), clientSocket, 50*1024);</div>
<div>after the call to "makeSocketNonBlocking()" on line 235
of "liveMedia/RTSPServer.cpp".</div>
<div><br></div>
<div>Similarly, add</div>
<div><x-tab>
</x-tab>increaseSendBufferTo(envir(), fGS->socketNum(),
50*1024);</div>
<div>after the call to "makeSocketNonBlocking()" on line 101
of "liveMedia/RTPInterface.cpp".</div>
<div><br></div>
<div>These additions will be made to the next release of the
code.</div>
<x-sigsep><pre>--
</pre></x-sigsep>
<div><br>
Ross Finlayson<br>
Live Networks, Inc.<br>
http://www.live555.com/</div>
</body>
</html>