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

Fixes the merging of one-to-one calls into conference calls.

parent a2eb39a8
No related branches found
No related tags found
No related merge requests found
......@@ -313,32 +313,39 @@ protected void deviceSessionChanged(
MediaDeviceSession oldValue,
MediaDeviceSession newValue)
{
if (oldValue != null)
try
{
AudioMediaDeviceSession deviceSession
= (AudioMediaDeviceSession) oldValue;
if (localUserAudioLevelListener != null)
deviceSession.setLocalUserAudioLevelListener(null);
if (streamAudioLevelListener != null)
deviceSession.setStreamAudioLevelListener(null);
}
if (newValue != null)
{
AudioMediaDeviceSession deviceSession
= (AudioMediaDeviceSession) newValue;
if (localUserAudioLevelListener != null)
if (oldValue != null)
{
deviceSession.setLocalUserAudioLevelListener(
localUserAudioLevelListener);
AudioMediaDeviceSession deviceSession
= (AudioMediaDeviceSession) oldValue;
if (localUserAudioLevelListener != null)
deviceSession.setLocalUserAudioLevelListener(null);
if (streamAudioLevelListener != null)
deviceSession.setStreamAudioLevelListener(null);
}
if (streamAudioLevelListener != null)
if (newValue != null)
{
deviceSession.setStreamAudioLevelListener(
streamAudioLevelListener);
AudioMediaDeviceSession deviceSession
= (AudioMediaDeviceSession) newValue;
if (localUserAudioLevelListener != null)
{
deviceSession.setLocalUserAudioLevelListener(
localUserAudioLevelListener);
}
if (streamAudioLevelListener != null)
{
deviceSession.setStreamAudioLevelListener(
streamAudioLevelListener);
}
}
}
finally
{
super.deviceSessionChanged(oldValue, newValue);
}
}
/**
......
......@@ -22,6 +22,12 @@
public abstract class AbstractCodecExt
extends AbstractCodec
{
/**
* An empty array of <tt>Format</tt> element type. Explicitly defined to
* reduce unnecessary allocations.
*/
public static final Format[] EMPTY_FORMATS = new Format[0];
private final Class<? extends Format> formatClass;
/**
......@@ -111,7 +117,7 @@ protected Format[] getMatchingOutputFormats(Format inputFormat)
if (supportedOutputFormats != null)
return supportedOutputFormats.clone();
return new Format[0];
return EMPTY_FORMATS;
}
@Override
......@@ -134,7 +140,7 @@ public Format[] getSupportedOutputFormats(Format inputFormat)
if (!formatClass.isInstance(inputFormat)
|| (matches(inputFormat, inputFormats) == null))
return new Format[0];
return EMPTY_FORMATS;
return getMatchingOutputFormats(inputFormat);
}
......
......@@ -33,6 +33,7 @@ public class FMJPlugInConfiguration
*/
private static final String[] CUSTOM_CODECS
= {
"org.jitsi.impl.neomedia.codec.AndroidMediaCodec",
"org.jitsi.impl.neomedia.codec.audio.alaw.DePacketizer",
"org.jitsi.impl.neomedia.codec.audio.alaw.JavaEncoder",
"org.jitsi.impl.neomedia.codec.audio.alaw.Packetizer",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment