Skip to content
Snippets Groups Projects
Commit 342e1d4c authored by Lyubomir Marinov's avatar Lyubomir Marinov
Browse files

Fixes a discrepancy/inaccuracy in the RTP buffer length and minimum threshold...

Fixes a discrepancy/inaccuracy in the RTP buffer length and minimum threshold of FMJ which leaves it vularable to even the tinies hiccups of the network. Rebuilds FMJ and libjitsi with debug information such as line numbers.
parent 4da9b7ba
No related branches found
No related tags found
No related merge requests found
......@@ -39,12 +39,14 @@
<mkdir dir="${dest}" />
<javac
classpathref="compile.class.path"
debug="true"
destdir="${dest}"
fork="true"
optimize="true"
source="1.5"
target="1.5">
<src path="${src}"/>
<exclude name="org/jitsi/impl/neomedia/codec/audio/speex/Java*"/>
<src path="${src}"/>
<exclude name="org/jitsi/impl/neomedia/codec/audio/speex/Java*"/>
</javac>
</target>
......
No preview for this file type
......@@ -121,11 +121,17 @@ protected void configureRTPManagerBufferControl(
BufferControl bufferControl)
{
/*
* It appears that if we don't do this managers don't play. You can try
* some other buffer size to see if you can get better smoothness.
* It appears that, if we don't do the following, the RTPManager won't
* play.
*/
ConfigurationService cfg = LibJitsi.getConfigurationService();
long bufferLength = 100;
/*
* There isn't a particular reason why we'd choose 100 or 120. It may be
* that 120 is divided by 30 (which is used by iLBC, for example) and
* 100 isn't. Anyway, what matters most is that it's proportional to the
* latency of the playback.
*/
long bufferLength = 120;
if (cfg != null)
{
......@@ -150,8 +156,15 @@ protected void configureRTPManagerBufferControl(
if (logger.isTraceEnabled())
logger.trace("Set receiver buffer length to " + bufferLength);
bufferControl.setEnabledThreshold(true);
bufferControl.setMinimumThreshold(100);
/*
* The threshold should better be half of the bufferLength rather than
* equal to it (as it used to be before). Whatever it is, FMJ/JMF
* doesn't take it into account anyway.
*/
long minimumThreshold = bufferLength / 2;
bufferControl.setEnabledThreshold(minimumThreshold > 0);
bufferControl.setMinimumThreshold(minimumThreshold);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment