MetaContact interface.
*
diff --git a/src/net/java/sip/communicator/impl/contactlist/meta.cl.manifest.mf b/src/net/java/sip/communicator/impl/contactlist/meta.cl.manifest.mf
index 5d655e4a8..fb997832f 100644
--- a/src/net/java/sip/communicator/impl/contactlist/meta.cl.manifest.mf
+++ b/src/net/java/sip/communicator/impl/contactlist/meta.cl.manifest.mf
@@ -5,8 +5,8 @@ Bundle-Vendor: jitsi.org
Bundle-Version: 0.0.1
System-Bundle: yes
Import-Package: org.osgi.framework,
- net.java.sip.communicator.service.fileaccess,
- net.java.sip.communicator.service.configuration,
+ org.jitsi.service.fileaccess,
+ org.jitsi.service.configuration,
net.java.sip.communicator.service.contactlist,
net.java.sip.communicator.service.contactlist.event,
net.java.sip.communicator.service.protocol,
diff --git a/src/net/java/sip/communicator/impl/credentialsstorage/CredentialsStorageServiceImpl.java b/src/net/java/sip/communicator/impl/credentialsstorage/CredentialsStorageServiceImpl.java
index 83abd01f1..6329e97bf 100644
--- a/src/net/java/sip/communicator/impl/credentialsstorage/CredentialsStorageServiceImpl.java
+++ b/src/net/java/sip/communicator/impl/credentialsstorage/CredentialsStorageServiceImpl.java
@@ -8,7 +8,7 @@
import java.util.*;
-import net.java.sip.communicator.service.configuration.*;
+import org.jitsi.service.configuration.*;
import net.java.sip.communicator.service.credentialsstorage.*;
import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.swing.*;
diff --git a/src/net/java/sip/communicator/impl/credentialsstorage/credentialsstorage.manifest.mf b/src/net/java/sip/communicator/impl/credentialsstorage/credentialsstorage.manifest.mf
index 9d7cb699e..f4b5eb012 100644
--- a/src/net/java/sip/communicator/impl/credentialsstorage/credentialsstorage.manifest.mf
+++ b/src/net/java/sip/communicator/impl/credentialsstorage/credentialsstorage.manifest.mf
@@ -5,7 +5,7 @@ Bundle-Vendor: jitsi.org
Bundle-Version: 0.0.1
System-Bundle: yes
Import-Package: org.osgi.framework,
- net.java.sip.communicator.service.configuration,
+ org.jitsi.service.configuration,
net.java.sip.communicator.util,
net.java.sip.communicator.util.swing,
javax.crypto,
diff --git a/src/net/java/sip/communicator/impl/fileaccess/FailSafeTransactionImpl.java b/src/net/java/sip/communicator/impl/fileaccess/FailSafeTransactionImpl.java
index b612feb91..2b4c895e5 100644
--- a/src/net/java/sip/communicator/impl/fileaccess/FailSafeTransactionImpl.java
+++ b/src/net/java/sip/communicator/impl/fileaccess/FailSafeTransactionImpl.java
@@ -8,7 +8,8 @@
package net.java.sip.communicator.impl.fileaccess;
import java.io.*;
-import net.java.sip.communicator.service.fileaccess.*;
+
+import org.jitsi.service.fileaccess.*;
/**
* A failsafe transaction class. By failsafe we mean here that the file
diff --git a/src/net/java/sip/communicator/impl/fileaccess/FileAccessActivator.java b/src/net/java/sip/communicator/impl/fileaccess/FileAccessActivator.java
index 9f832ac1f..8bdaf495d 100644
--- a/src/net/java/sip/communicator/impl/fileaccess/FileAccessActivator.java
+++ b/src/net/java/sip/communicator/impl/fileaccess/FileAccessActivator.java
@@ -6,10 +6,9 @@
*/
package net.java.sip.communicator.impl.fileaccess;
+import org.jitsi.service.fileaccess.*;
import org.osgi.framework.*;
-import net.java.sip.communicator.service.fileaccess.*;
-
/**
* Invoke "Service Binder" to parse the service XML and register all services.
*
diff --git a/src/net/java/sip/communicator/impl/fileaccess/FileAccessServiceImpl.java b/src/net/java/sip/communicator/impl/fileaccess/FileAccessServiceImpl.java
index c3d644c70..677e15b00 100644
--- a/src/net/java/sip/communicator/impl/fileaccess/FileAccessServiceImpl.java
+++ b/src/net/java/sip/communicator/impl/fileaccess/FileAccessServiceImpl.java
@@ -10,9 +10,11 @@
import javax.swing.filechooser.*;
-import net.java.sip.communicator.service.configuration.*;
-import net.java.sip.communicator.service.fileaccess.*;
-import net.java.sip.communicator.util.*;
+import net.java.sip.communicator.util.Logger;
+
+import org.jitsi.service.configuration.*;
+import org.jitsi.service.fileaccess.*;
+import org.jitsi.util.*;
/**
* Default FileAccessService implementation.
diff --git a/src/net/java/sip/communicator/impl/fileaccess/fileaccess.manifest.mf b/src/net/java/sip/communicator/impl/fileaccess/fileaccess.manifest.mf
index df19ee546..ddcc1159e 100644
--- a/src/net/java/sip/communicator/impl/fileaccess/fileaccess.manifest.mf
+++ b/src/net/java/sip/communicator/impl/fileaccess/fileaccess.manifest.mf
@@ -14,6 +14,6 @@ Import-Package: org.osgi.framework,
javax.swing.filechooser,
net.java.sip.communicator.util,
net.java.sip.communicator.util.xml,
- net.java.sip.communicator.service.fileaccess
-Export-Package: net.java.sip.communicator.service.fileaccess
+ org.jitsi.service.fileaccess,
+ org.jitsi.util
Metadata-Location: /net/java/sip/communicator/impl/fileaccess/fileaccess.metadata.xml
diff --git a/src/net/java/sip/communicator/impl/galagonotification/GalagoNotificationActivator.java b/src/net/java/sip/communicator/impl/galagonotification/GalagoNotificationActivator.java
index 6904a9c3d..01f4d620b 100644
--- a/src/net/java/sip/communicator/impl/galagonotification/GalagoNotificationActivator.java
+++ b/src/net/java/sip/communicator/impl/galagonotification/GalagoNotificationActivator.java
@@ -10,6 +10,7 @@
import net.java.sip.communicator.service.systray.*;
import net.java.sip.communicator.util.*;
+import org.jitsi.service.resources.*;
import org.osgi.framework.*;
/**
diff --git a/src/net/java/sip/communicator/impl/galagonotification/galagonotification.manifest.mf b/src/net/java/sip/communicator/impl/galagonotification/galagonotification.manifest.mf
index e1fe3df35..7c68a9475 100644
--- a/src/net/java/sip/communicator/impl/galagonotification/galagonotification.manifest.mf
+++ b/src/net/java/sip/communicator/impl/galagonotification/galagonotification.manifest.mf
@@ -6,6 +6,6 @@ Bundle-Version: 0.0.1
System-Bundle: yes
Import-Package: javax.imageio,
net.java.sip.communicator.service.systray,
- net.java.sip.communicator.service.resources,
+ org.jitsi.service.resources, net.java.sip.communicator.service.resources,
net.java.sip.communicator.util,
org.osgi.framework
diff --git a/src/net/java/sip/communicator/impl/globalshortcut/GlobalShortcutServiceImpl.java b/src/net/java/sip/communicator/impl/globalshortcut/GlobalShortcutServiceImpl.java
index bb183b8d7..b9336b3fd 100644
--- a/src/net/java/sip/communicator/impl/globalshortcut/GlobalShortcutServiceImpl.java
+++ b/src/net/java/sip/communicator/impl/globalshortcut/GlobalShortcutServiceImpl.java
@@ -6,14 +6,16 @@
*/
package net.java.sip.communicator.impl.globalshortcut;
-import java.util.*;
-import java.util.List; // disambiguation
-
import java.awt.*;
+import java.util.*;
+import java.util.List;
import net.java.sip.communicator.service.globalshortcut.*;
import net.java.sip.communicator.service.keybindings.*;
-import net.java.sip.communicator.util.*;
+import net.java.sip.communicator.util.Logger;
+
+import org.jitsi.util.*;
+// disambiguation
/**
* This global shortcut service permits to register listeners for global
diff --git a/src/net/java/sip/communicator/impl/globalshortcut/NativeKeyboardHookDelegate.java b/src/net/java/sip/communicator/impl/globalshortcut/NativeKeyboardHookDelegate.java
index 04b135c32..522759989 100644
--- a/src/net/java/sip/communicator/impl/globalshortcut/NativeKeyboardHookDelegate.java
+++ b/src/net/java/sip/communicator/impl/globalshortcut/NativeKeyboardHookDelegate.java
@@ -41,4 +41,4 @@ public interface NativeKeyboardHookDelegate
* @param modifiers modifiers received (ALT or CTRL + letter, ...)
*/
public void receiveKey(int keycode, int modifiers);
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/globalshortcut/globalshortcut.manifest.mf b/src/net/java/sip/communicator/impl/globalshortcut/globalshortcut.manifest.mf
index 93aec4c75..16bd25ec9 100644
--- a/src/net/java/sip/communicator/impl/globalshortcut/globalshortcut.manifest.mf
+++ b/src/net/java/sip/communicator/impl/globalshortcut/globalshortcut.manifest.mf
@@ -5,6 +5,7 @@ Bundle-Vendor: jitsi.org
Bundle-Version: 0.0.1
System-Bundle: yes
Import-Package: org.osgi.framework,
+ org.jitsi.util,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.service.protocol.media,
net.java.sip.communicator.service.protocol.event,
diff --git a/src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsActivator.java b/src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsActivator.java
index 243b9f095..0ee56758c 100644
--- a/src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsActivator.java
+++ b/src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsActivator.java
@@ -8,15 +8,15 @@
import java.util.*;
-import net.java.sip.communicator.service.configuration.*;
+import org.jitsi.service.configuration.*;
import net.java.sip.communicator.service.contactsource.*;
import net.java.sip.communicator.service.credentialsstorage.*;
import net.java.sip.communicator.service.googlecontacts.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.protocol.*;
-import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.jitsi.service.resources.*;
import org.osgi.framework.*;
/**
diff --git a/src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsServiceImpl.java b/src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsServiceImpl.java
index 0b1c98d49..509ecd9b7 100644
--- a/src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsServiceImpl.java
+++ b/src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsServiceImpl.java
@@ -11,7 +11,7 @@
import java.util.*;
import java.util.regex.*;
-import net.java.sip.communicator.service.configuration.*;
+import org.jitsi.service.configuration.*;
import net.java.sip.communicator.service.credentialsstorage.*;
import net.java.sip.communicator.service.googlecontacts.*;
import net.java.sip.communicator.impl.googlecontacts.configform.*;
diff --git a/src/net/java/sip/communicator/impl/googlecontacts/googlecontacts.manifest.mf b/src/net/java/sip/communicator/impl/googlecontacts/googlecontacts.manifest.mf
index 9629bf12d..f5f779364 100644
--- a/src/net/java/sip/communicator/impl/googlecontacts/googlecontacts.manifest.mf
+++ b/src/net/java/sip/communicator/impl/googlecontacts/googlecontacts.manifest.mf
@@ -5,11 +5,11 @@ Bundle-Vendor: jitsi.org
Bundle-Version: 0.0.1
System-Bundle: yes
Import-Package: org.osgi.framework,
- net.java.sip.communicator.service.configuration,
+ org.jitsi.service.configuration,
net.java.sip.communicator.service.credentialsstorage,
net.java.sip.communicator.service.contactsource,
net.java.sip.communicator.service.gui,
- net.java.sip.communicator.service.resources,
+ org.jitsi.service.resources, net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.util,
net.java.sip.communicator.util.swing,
diff --git a/src/net/java/sip/communicator/impl/growlnotification/GrowlNotificationActivator.java b/src/net/java/sip/communicator/impl/growlnotification/GrowlNotificationActivator.java
index 69a1638c9..ac32c63be 100644
--- a/src/net/java/sip/communicator/impl/growlnotification/GrowlNotificationActivator.java
+++ b/src/net/java/sip/communicator/impl/growlnotification/GrowlNotificationActivator.java
@@ -6,14 +6,14 @@
*/
package net.java.sip.communicator.impl.growlnotification;
-import net.java.sip.communicator.service.configuration.*;
+import org.jitsi.service.configuration.*;
import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.service.systray.*;
+import net.java.sip.communicator.util.*;
+import org.jitsi.service.resources.*;
import org.osgi.framework.*;
-import net.java.sip.communicator.util.*;
-
/**
* Activates the GrowlNotificationService
*
diff --git a/src/net/java/sip/communicator/impl/growlnotification/growlnotification.manifest.mf b/src/net/java/sip/communicator/impl/growlnotification/growlnotification.manifest.mf
index 27444f404..08734427f 100644
--- a/src/net/java/sip/communicator/impl/growlnotification/growlnotification.manifest.mf
+++ b/src/net/java/sip/communicator/impl/growlnotification/growlnotification.manifest.mf
@@ -5,10 +5,10 @@ Bundle-Vendor: jitsi.org
Bundle-Version: 0.0.1
System-Bundle: yes
Import-Package: org.osgi.framework,
- net.java.sip.communicator.service.configuration,
+ org.jitsi.service.configuration,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.util,
- net.java.sip.communicator.service.resources,
+ org.jitsi.service.resources, net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.systray,
net.java.sip.communicator.service.systray.event,
net.java.sip.communicator.util.swing,
diff --git a/src/net/java/sip/communicator/impl/gui/GuiActivator.java b/src/net/java/sip/communicator/impl/gui/GuiActivator.java
index 66af4a650..302107338 100644
--- a/src/net/java/sip/communicator/impl/gui/GuiActivator.java
+++ b/src/net/java/sip/communicator/impl/gui/GuiActivator.java
@@ -11,26 +11,26 @@
import net.java.sip.communicator.impl.gui.main.account.*;
import net.java.sip.communicator.impl.gui.main.contactlist.*;
import net.java.sip.communicator.impl.gui.utils.*;
-import net.java.sip.communicator.service.audionotifier.*;
import net.java.sip.communicator.service.browserlauncher.*;
import net.java.sip.communicator.service.callhistory.*;
-import net.java.sip.communicator.service.configuration.*;
import net.java.sip.communicator.service.contactlist.*;
import net.java.sip.communicator.service.contactsource.*;
import net.java.sip.communicator.service.desktop.*;
-import net.java.sip.communicator.service.fileaccess.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.keybindings.*;
import net.java.sip.communicator.service.metahistory.*;
-import net.java.sip.communicator.service.neomedia.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.replacement.*;
import net.java.sip.communicator.service.replacement.smilies.*;
-import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.service.shutdown.*;
import net.java.sip.communicator.service.systray.*;
import net.java.sip.communicator.util.*;
+import org.jitsi.service.audionotifier.*;
+import org.jitsi.service.configuration.*;
+import org.jitsi.service.fileaccess.*;
+import org.jitsi.service.neomedia.*;
+import org.jitsi.service.resources.*;
import org.osgi.framework.*;
/**
diff --git a/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java b/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java
index c705230a6..45eb91cc3 100644
--- a/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java
+++ b/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java
@@ -35,12 +35,14 @@
import net.java.sip.communicator.service.gui.Container;
import net.java.sip.communicator.service.gui.event.*;
import net.java.sip.communicator.service.protocol.*;
-import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.service.shutdown.*;
import net.java.sip.communicator.util.*;
+import net.java.sip.communicator.util.Logger;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.service.resources.*;
+import org.jitsi.util.*;
import org.osgi.framework.*;
import com.sun.jna.examples.*;
@@ -1515,4 +1517,4 @@ public void startChat(String[] participants)
else
throw new IllegalArgumentException("participants");
}
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/SCScrollPane.java b/src/net/java/sip/communicator/impl/gui/customcontrols/SCScrollPane.java
index 3a1ccf089..d56dab53d 100644
--- a/src/net/java/sip/communicator/impl/gui/customcontrols/SCScrollPane.java
+++ b/src/net/java/sip/communicator/impl/gui/customcontrols/SCScrollPane.java
@@ -15,10 +15,11 @@
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.utils.*;
-import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.util.*;
+
/**
* The SCScrollPane is a JScrollPane with a custom viewport that allows to
* set an image as a background. Depending on the
diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/wizard/Wizard.java b/src/net/java/sip/communicator/impl/gui/customcontrols/wizard/Wizard.java
index 2d4c7c1b0..923015831 100644
--- a/src/net/java/sip/communicator/impl/gui/customcontrols/wizard/Wizard.java
+++ b/src/net/java/sip/communicator/impl/gui/customcontrols/wizard/Wizard.java
@@ -16,9 +16,10 @@
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.service.gui.*;
-import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.service.resources.*;
+
/**
* This class implements a basic wizard dialog, where the programmer can insert
* one or more Components to act as panels. These panels can be navigated
diff --git a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommCheckBoxUI.java b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommCheckBoxUI.java
index 2e208b345..757006fea 100644
--- a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommCheckBoxUI.java
+++ b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommCheckBoxUI.java
@@ -34,4 +34,4 @@ public void paint(Graphics g, JComponent c)
AntialiasingManager.activateAntialiasing(g);
super.paint(g, c);
}
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/DialPadFieldUI.java b/src/net/java/sip/communicator/impl/gui/main/DialPadFieldUI.java
index a3e2adbb9..c4cf2526b 100644
--- a/src/net/java/sip/communicator/impl/gui/main/DialPadFieldUI.java
+++ b/src/net/java/sip/communicator/impl/gui/main/DialPadFieldUI.java
@@ -103,4 +103,4 @@ public static ComponentUI createUI(JComponent c)
{
return new DialPadFieldUI();
}
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/GeneralDialPadDialog.java b/src/net/java/sip/communicator/impl/gui/main/GeneralDialPadDialog.java
index d40260f3e..1a165282a 100644
--- a/src/net/java/sip/communicator/impl/gui/main/GeneralDialPadDialog.java
+++ b/src/net/java/sip/communicator/impl/gui/main/GeneralDialPadDialog.java
@@ -14,11 +14,12 @@
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.call.*;
import net.java.sip.communicator.impl.gui.utils.*;
-import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
import net.java.sip.communicator.util.swing.plaf.*;
+import org.jitsi.util.*;
+
import com.explodingpixels.macwidgets.*;
/**
diff --git a/src/net/java/sip/communicator/impl/gui/main/GeneralDialPanel.java b/src/net/java/sip/communicator/impl/gui/main/GeneralDialPanel.java
index 1f61649a2..58075ac95 100755
--- a/src/net/java/sip/communicator/impl/gui/main/GeneralDialPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/GeneralDialPanel.java
@@ -16,10 +16,11 @@
import net.java.sip.communicator.impl.gui.main.call.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.resources.*;
-import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.util.*;
+
/**
* The DialPanel is the panel that contains the buttons to dial a
* phone number.
diff --git a/src/net/java/sip/communicator/impl/gui/main/MainFrame.java b/src/net/java/sip/communicator/impl/gui/main/MainFrame.java
index 6824c943a..e2a6ae195 100644
--- a/src/net/java/sip/communicator/impl/gui/main/MainFrame.java
+++ b/src/net/java/sip/communicator/impl/gui/main/MainFrame.java
@@ -8,7 +8,7 @@
import java.awt.*;
import java.awt.event.*;
-import java.beans.PropertyChangeEvent;
+import java.beans.*;
import java.util.*;
import java.util.List;
@@ -23,20 +23,22 @@
import net.java.sip.communicator.impl.gui.main.menus.*;
import net.java.sip.communicator.impl.gui.main.presence.*;
import net.java.sip.communicator.impl.gui.utils.*;
-import net.java.sip.communicator.service.configuration.*;
import net.java.sip.communicator.service.contacteventhandler.*;
import net.java.sip.communicator.service.contactlist.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.gui.Container;
import net.java.sip.communicator.service.protocol.*;
-import net.java.sip.communicator.service.protocol.OperationSetMessageWaiting.*;
+import net.java.sip.communicator.service.protocol.OperationSetMessageWaiting.MessageType;
import net.java.sip.communicator.service.protocol.event.*;
-import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import net.java.sip.communicator.util.Logger;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
import net.java.sip.communicator.util.swing.event.*;
+import org.jitsi.service.configuration.*;
+import org.jitsi.service.resources.*;
+import org.jitsi.util.*;
import org.osgi.framework.*;
import com.explodingpixels.macwidgets.*;
@@ -2009,4 +2011,4 @@ public void loadSkin()
GuiActivator.getResources()
.getColor("service.gui.MAIN_WINDOW_BACKGROUND")));
}
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/account/AccountRegWizardContainerImpl.java b/src/net/java/sip/communicator/impl/gui/main/account/AccountRegWizardContainerImpl.java
index 78026b4da..314ee9830 100644
--- a/src/net/java/sip/communicator/impl/gui/main/account/AccountRegWizardContainerImpl.java
+++ b/src/net/java/sip/communicator/impl/gui/main/account/AccountRegWizardContainerImpl.java
@@ -7,18 +7,17 @@
import java.io.*;
import java.util.*;
-import java.util.List;
import javax.imageio.*;
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.customcontrols.wizard.*;
import net.java.sip.communicator.impl.gui.main.*;
-import net.java.sip.communicator.service.configuration.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.util.*;
+import org.jitsi.service.configuration.*;
import org.osgi.framework.*;
/**
diff --git a/src/net/java/sip/communicator/impl/gui/main/account/AccountsConfigurationPanel.java b/src/net/java/sip/communicator/impl/gui/main/account/AccountsConfigurationPanel.java
index 5b7ed35b2..90246d6fb 100644
--- a/src/net/java/sip/communicator/impl/gui/main/account/AccountsConfigurationPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/account/AccountsConfigurationPanel.java
@@ -14,11 +14,12 @@
import javax.swing.event.*;
import net.java.sip.communicator.impl.gui.*;
-import net.java.sip.communicator.service.configuration.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.service.configuration.*;
+
/**
* The AccountsConfigurationPanel is the panel containing the accounts
* list and according buttons shown in the options form.
diff --git a/src/net/java/sip/communicator/impl/gui/main/account/NewAccountDialog.java b/src/net/java/sip/communicator/impl/gui/main/account/NewAccountDialog.java
index 0f62bae33..1c6514a2d 100644
--- a/src/net/java/sip/communicator/impl/gui/main/account/NewAccountDialog.java
+++ b/src/net/java/sip/communicator/impl/gui/main/account/NewAccountDialog.java
@@ -18,10 +18,10 @@
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.protocol.*;
-import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.service.resources.*;
import org.osgi.framework.*;
/**
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/AbstractCallToggleButton.java b/src/net/java/sip/communicator/impl/gui/main/call/AbstractCallToggleButton.java
index 13d217dda..7958d68db 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/AbstractCallToggleButton.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/AbstractCallToggleButton.java
@@ -300,4 +300,4 @@ public void setIconImageID(ImageID iconImageID)
* action has been performed and that it should execute its very logic.
*/
public abstract void buttonPressed();
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallButton.java b/src/net/java/sip/communicator/impl/gui/main/call/CallButton.java
index b2c1b7d3c..69c86d52e 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/CallButton.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/CallButton.java
@@ -149,4 +149,4 @@ private void updateTooltip()
else
setToolTipText(defaultTooltip);
}
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallHistoryButton.java b/src/net/java/sip/communicator/impl/gui/main/call/CallHistoryButton.java
index 9e0b67950..476ad524f 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/CallHistoryButton.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/CallHistoryButton.java
@@ -223,4 +223,4 @@ public void loadSkin()
setHistoryView();
}
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallInfoFrame.java b/src/net/java/sip/communicator/impl/gui/main/call/CallInfoFrame.java
index baea81ff6..49ef171ee 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/CallInfoFrame.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/CallInfoFrame.java
@@ -12,16 +12,18 @@
import javax.swing.*;
-import com.explodingpixels.macwidgets.*;
-
import net.java.sip.communicator.impl.gui.*;
-import net.java.sip.communicator.service.neomedia.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.media.*;
-import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.swing.*;
+
import org.ice4j.ice.*;
+import org.jitsi.service.neomedia.*;
+import org.jitsi.service.resources.*;
+import org.jitsi.util.*;
+
+import com.explodingpixels.macwidgets.*;
/**
* The frame displaying the statistical information for a call.
@@ -495,8 +497,8 @@ private void appendStreamEncryptionMethod(
}
String rtpType;
- SrtpControl srtpControl = callPeerMediaHandler
- .getEncryptionMethod(mediaType);
+ SrtpControl srtpControl
+ = callPeerMediaHandler.getEncryptionMethod(mediaType);
// If the stream is secured.
if(srtpControl != null)
{
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java b/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java
index 4d7ae57df..b20dc5d51 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java
@@ -19,14 +19,15 @@
import net.java.sip.communicator.impl.gui.main.contactlist.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.contactlist.*;
-import net.java.sip.communicator.service.neomedia.*;
-import net.java.sip.communicator.service.neomedia.device.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
import net.java.sip.communicator.service.protocol.media.*;
import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.swing.transparent.*;
+import org.jitsi.service.neomedia.*;
+import org.jitsi.service.neomedia.device.*;
+
/**
* The CallManager is the one that handles calls. It contains also
* the "Call" and "Hang up" buttons panel. Here are handles incoming and
@@ -1170,7 +1171,7 @@ public void run()
qualityControl.setPreferredRemoteSendMaxPreset(
qualityPreset);
}
- catch(OperationFailedException e)
+ catch(org.jitsi.service.protocol.OperationFailedException e)
{
logger.info("Unable to change video quality.", e);
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
index 84ed128d5..751bba184 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
@@ -16,23 +16,25 @@
import javax.swing.border.*;
import javax.swing.event.*;
-import org.osgi.framework.*;
-
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.event.*;
import net.java.sip.communicator.impl.gui.main.call.conference.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.contactlist.*;
import net.java.sip.communicator.service.gui.*;
-import net.java.sip.communicator.service.neomedia.*;
-import net.java.sip.communicator.service.neomedia.device.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
import net.java.sip.communicator.util.*;
+import net.java.sip.communicator.util.Logger;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
import net.java.sip.communicator.util.swing.border.*;
+import org.jitsi.service.neomedia.*;
+import org.jitsi.service.neomedia.device.*;
+import org.jitsi.util.*;
+import org.osgi.framework.*;
+
/**
* The dialog created for a given call.
*
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallPeerAdapter.java b/src/net/java/sip/communicator/impl/gui/main/call/CallPeerAdapter.java
index e61759da8..23c39b3ff 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/CallPeerAdapter.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/CallPeerAdapter.java
@@ -11,6 +11,8 @@
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
+import org.jitsi.service.protocol.event.*;
+
/**
* The CallPeerAdapter is an adapter that implements all common
* CallPeer related listeners in order to facilitate the task of
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallStatusPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/CallStatusPanel.java
index 3099702f9..e50f7ef81 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/CallStatusPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/CallStatusPanel.java
@@ -53,4 +53,4 @@ public void paintComponent(Graphics g)
g.dispose();
}
}
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallTransferHandler.java b/src/net/java/sip/communicator/impl/gui/main/call/CallTransferHandler.java
index 86dbfb777..beaf53667 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/CallTransferHandler.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/CallTransferHandler.java
@@ -219,4 +219,4 @@ else if (t.isDataFlavorSupported(DataFlavor.stringFlavor))
}
return false;
}
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/DTMFHandler.java b/src/net/java/sip/communicator/impl/gui/main/call/DTMFHandler.java
index 62594fbe3..126c6e505 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/DTMFHandler.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/DTMFHandler.java
@@ -13,12 +13,13 @@
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.utils.*;
-
-import net.java.sip.communicator.service.audionotifier.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.jitsi.service.audionotifier.*;
+import org.jitsi.service.protocol.*;
+
/**
* Handles DTMF sending and playing sound notifications for that.
*
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/DesktopSharingFrame.java b/src/net/java/sip/communicator/impl/gui/main/call/DesktopSharingFrame.java
index 693c6cf2e..41de8abbd 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/DesktopSharingFrame.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/DesktopSharingFrame.java
@@ -15,13 +15,15 @@
import javax.swing.*;
import net.java.sip.communicator.impl.gui.*;
-import net.java.sip.communicator.service.neomedia.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
-import net.java.sip.communicator.util.*;
+import net.java.sip.communicator.util.Logger;
import net.java.sip.communicator.util.swing.*;
import net.java.sip.communicator.util.swing.transparent.*;
+import org.jitsi.service.neomedia.*;
+import org.jitsi.util.*;
+
/**
*
* @author Yana Stamcheva
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/InputVolumeControlButton.java b/src/net/java/sip/communicator/impl/gui/main/call/InputVolumeControlButton.java
index 5dc9996ae..f318667ac 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/InputVolumeControlButton.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/InputVolumeControlButton.java
@@ -16,11 +16,12 @@
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.utils.*;
-import net.java.sip.communicator.service.neomedia.*;
-import net.java.sip.communicator.service.neomedia.event.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.resources.*;
+import org.jitsi.service.neomedia.*;
+import org.jitsi.service.neomedia.event.*;
+
/**
* Represents an UI means to mute the audio stream sent in an associated
* Call.
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/LocalVideoButton.java b/src/net/java/sip/communicator/impl/gui/main/call/LocalVideoButton.java
index 54b4961b9..d945a43ed 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/LocalVideoButton.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/LocalVideoButton.java
@@ -8,11 +8,12 @@
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.utils.*;
-import net.java.sip.communicator.service.neomedia.*;
-import net.java.sip.communicator.service.neomedia.device.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.util.*;
+import org.jitsi.service.neomedia.*;
+import org.jitsi.service.neomedia.device.*;
+
/**
* The local video button is the button used to start/stop video in a
* conversation.
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPanel.java
index 8a4796b0e..13bdaf4bc 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPanel.java
@@ -12,13 +12,16 @@
import javax.swing.*;
-import com.explodingpixels.macwidgets.*;
-
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.util.*;
+import net.java.sip.communicator.util.Logger;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.util.*;
+
+import com.explodingpixels.macwidgets.*;
+
/**
* The CallPanel is the panel containing call information. It's created
* and added to the main tabbed pane when user makes or receives calls. It shows
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java
index a1bfc7ca6..86ed4494e 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java
@@ -17,7 +17,6 @@
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.contactlist.*;
import net.java.sip.communicator.impl.gui.utils.*;
-import net.java.sip.communicator.service.neomedia.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
import net.java.sip.communicator.service.protocol.media.*;
@@ -25,6 +24,11 @@
import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
+import net.java.sip.communicator.util.swing.TransparentPanel;
+
+import org.jitsi.service.neomedia.*;
+import org.jitsi.service.protocol.event.*;
+import org.jitsi.util.swing.*;
/**
* The OneToOneCallPeerPanel is the panel containing data for a call
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/OutputVolumeControlButton.java b/src/net/java/sip/communicator/impl/gui/main/call/OutputVolumeControlButton.java
index 7dfdde5f1..78a157d50 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/OutputVolumeControlButton.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/OutputVolumeControlButton.java
@@ -13,10 +13,11 @@
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.utils.*;
-import net.java.sip.communicator.service.neomedia.*;
import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.service.neomedia.*;
+
/**
* The VolumeControlButton is the button shown in the call window,
* which allows to adjust the playback volume of your call.
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/ParanoiaTimerSecurityPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/ParanoiaTimerSecurityPanel.java
index 13c7de2e0..f950a7fb1 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/ParanoiaTimerSecurityPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/ParanoiaTimerSecurityPanel.java
@@ -6,17 +6,19 @@
*/
package net.java.sip.communicator.impl.gui.main.call;
+import java.awt.*;
+import java.text.*;
+import java.util.*;
+import java.util.Timer;
+
+import javax.swing.*;
+
import net.java.sip.communicator.impl.gui.*;
-import net.java.sip.communicator.service.neomedia.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
import net.java.sip.communicator.util.*;
-import javax.swing.*;
-import java.awt.*;
-import java.text.*;
-import java.util.*;
-import java.util.Timer;
+import org.jitsi.service.neomedia.*;
/**
* @author Damian Minkov
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/PreCallDialog.java b/src/net/java/sip/communicator/impl/gui/main/call/PreCallDialog.java
index fa31bb6e1..c3cc565d7 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/PreCallDialog.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/PreCallDialog.java
@@ -12,11 +12,12 @@
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.utils.*;
-import net.java.sip.communicator.service.neomedia.*;
-import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.service.neomedia.*;
+import org.jitsi.util.*;
+
import com.explodingpixels.macwidgets.*;
/**
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/RecordButton.java b/src/net/java/sip/communicator/impl/gui/main/call/RecordButton.java
index 607231719..12289ced4 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/RecordButton.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/RecordButton.java
@@ -11,13 +11,15 @@
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.utils.*;
-import net.java.sip.communicator.service.configuration.*;
-import net.java.sip.communicator.service.neomedia.*;
import net.java.sip.communicator.service.protocol.*;
-import net.java.sip.communicator.service.resources.*;
-import net.java.sip.communicator.util.*;
+import net.java.sip.communicator.util.Logger;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.service.configuration.*;
+import org.jitsi.service.neomedia.*;
+import org.jitsi.service.resources.*;
+import org.jitsi.util.*;
+
/**
* The button that starts/stops the call recording.
*
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/ResizeVideoButton.java b/src/net/java/sip/communicator/impl/gui/main/call/ResizeVideoButton.java
index 9b581c1b0..e7cae169c 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/ResizeVideoButton.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/ResizeVideoButton.java
@@ -13,9 +13,10 @@
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.utils.*;
-import net.java.sip.communicator.service.neomedia.*;
import net.java.sip.communicator.service.protocol.*;
+import org.jitsi.service.neomedia.*;
+
/**
* The button responsible to resize video for the associated participant.
*
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/SecurityPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/SecurityPanel.java
index 202c15078..22e940027 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/SecurityPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/SecurityPanel.java
@@ -6,12 +6,13 @@
*/
package net.java.sip.communicator.impl.gui.main.call;
-import net.java.sip.communicator.service.neomedia.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.service.neomedia.*;
+
/**
* Base class for security panels that show encryption specific UI controls.
*
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/SelectScreenDialog.java b/src/net/java/sip/communicator/impl/gui/main/call/SelectScreenDialog.java
index 961fdd335..e08eb0ca9 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/SelectScreenDialog.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/SelectScreenDialog.java
@@ -14,11 +14,14 @@
import javax.swing.*;
import net.java.sip.communicator.impl.gui.*;
-import net.java.sip.communicator.service.neomedia.*;
-import net.java.sip.communicator.service.neomedia.device.*;
-import net.java.sip.communicator.service.neomedia.format.*;
import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.swing.*;
+import net.java.sip.communicator.util.swing.TransparentPanel;
+
+import org.jitsi.service.neomedia.*;
+import org.jitsi.service.neomedia.device.*;
+import org.jitsi.service.neomedia.format.*;
+import org.jitsi.util.swing.*;
/**
* A dialog dedicated to desktop streaming/sharing. Shows the possible screens
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/UIVideoHandler.java b/src/net/java/sip/communicator/impl/gui/main/call/UIVideoHandler.java
index 3bd9caac5..37863a9ef 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/UIVideoHandler.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/UIVideoHandler.java
@@ -16,12 +16,15 @@
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.call.conference.*;
import net.java.sip.communicator.impl.gui.utils.*;
-import net.java.sip.communicator.service.neomedia.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
import net.java.sip.communicator.util.*;
-import net.java.sip.communicator.util.event.*;
import net.java.sip.communicator.util.swing.*;
+import net.java.sip.communicator.util.swing.TransparentPanel;
+
+import org.jitsi.service.neomedia.*;
+import org.jitsi.util.event.*;
+import org.jitsi.util.swing.*;
/**
* The UIVideoHandler is meant to handle all video related events.
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/VolumeControlSlider.java b/src/net/java/sip/communicator/impl/gui/main/call/VolumeControlSlider.java
index 08b74320a..9f8d2f271 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/VolumeControlSlider.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/VolumeControlSlider.java
@@ -11,10 +11,11 @@
import javax.swing.*;
import javax.swing.event.*;
-import net.java.sip.communicator.service.neomedia.*;
-import net.java.sip.communicator.service.neomedia.event.*;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.service.neomedia.*;
+import org.jitsi.service.neomedia.event.*;
+
/**
* The volume control slider component.
*
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/ZrtpSecurityPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/ZrtpSecurityPanel.java
index 31b7ab5ff..8c56ae9c6 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/ZrtpSecurityPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/ZrtpSecurityPanel.java
@@ -14,16 +14,18 @@
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.utils.*;
-import net.java.sip.communicator.service.configuration.*;
import net.java.sip.communicator.service.gui.*;
-import net.java.sip.communicator.service.neomedia.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
import net.java.sip.communicator.service.protocol.media.*;
-import net.java.sip.communicator.util.event.*;
import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.service.configuration.*;
+import org.jitsi.service.neomedia.*;
+import org.jitsi.service.protocol.event.*;
+import org.jitsi.util.event.*;
+
/**
* The panel containing details about ZRTP call security.
*
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/conference/BasicConferenceParticipantPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/conference/BasicConferenceParticipantPanel.java
index 2f0f3d2fa..1b13b99f4 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/conference/BasicConferenceParticipantPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/conference/BasicConferenceParticipantPanel.java
@@ -13,13 +13,14 @@
import net.java.sip.communicator.impl.gui.main.call.*;
import net.java.sip.communicator.impl.gui.utils.*;
-import net.java.sip.communicator.service.neomedia.*;
import net.java.sip.communicator.service.protocol.event.*;
import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.service.neomedia.*;
+
/**
* The basic panel used to render any conference participant. Meant to be
* extended for CallPeers and ConferenceMembers.
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferenceFocusPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferenceFocusPanel.java
index c50b83c94..e67a97fff 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferenceFocusPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferenceFocusPanel.java
@@ -18,6 +18,8 @@
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.service.protocol.event.*;
+
/**
*
*
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferenceInviteDialog.java b/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferenceInviteDialog.java
index 593b8766d..0dc53c4da 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferenceInviteDialog.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferenceInviteDialog.java
@@ -482,4 +482,4 @@ public String toString()
return contact;
}
}
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferencePeerPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferencePeerPanel.java
index c091ac04e..c23021962 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferencePeerPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferencePeerPanel.java
@@ -13,16 +13,19 @@
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.call.*;
-import net.java.sip.communicator.impl.gui.main.call.CallPeerAdapter; // disambiguation
+import net.java.sip.communicator.impl.gui.main.call.CallPeerAdapter;
import net.java.sip.communicator.impl.gui.main.presence.*;
import net.java.sip.communicator.impl.gui.utils.*;
-import net.java.sip.communicator.service.neomedia.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.service.neomedia.*;
+import org.jitsi.service.protocol.event.*;
+// disambiguation
+
/**
* The ConferencePeerPanel renders a single ConferencePeer,
* which is not a conference focus.
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/conference/ProtocolProviderSelectorBox.java b/src/net/java/sip/communicator/impl/gui/main/call/conference/ProtocolProviderSelectorBox.java
index 7d21f3f36..2e7c57452 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/conference/ProtocolProviderSelectorBox.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/conference/ProtocolProviderSelectorBox.java
@@ -253,4 +253,4 @@ public void paintComponent(Graphics g)
this);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/conference/VideoConferenceCallPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/conference/VideoConferenceCallPanel.java
index f44bc8b39..03a78b75d 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/conference/VideoConferenceCallPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/conference/VideoConferenceCallPanel.java
@@ -10,7 +10,8 @@
import net.java.sip.communicator.impl.gui.main.call.CallPeerAdapter;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
-import net.java.sip.communicator.util.swing.*;
+
+import org.jitsi.util.swing.*;
/**
* The UI for video conference calls. This panel contains all conference peers
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationComponent.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationComponent.java
index 7aa4dca00..e25a9afb1 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationComponent.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationComponent.java
@@ -14,11 +14,12 @@
import javax.swing.*;
import net.java.sip.communicator.impl.gui.*;
-import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.service.resources.*;
+
/**
* The ChatConversationComponent is a component that can be added to
* the conversation area of the chat window in order to display any special
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java
index 97c65b48a..70a8ab90f 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java
@@ -9,8 +9,7 @@
import java.awt.*;
import java.awt.Container;
import java.awt.event.*;
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
+import java.beans.*;
import java.io.*;
import java.util.*;
import java.util.List;
@@ -30,11 +29,13 @@
import net.java.sip.communicator.service.metahistory.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
-import net.java.sip.communicator.util.*;
+import net.java.sip.communicator.util.Logger;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
import net.java.sip.communicator.util.swing.SwingWorker;
+import org.jitsi.util.*;
+
/**
* The ChatPanel is the panel, where users can write and send messages,
* view received messages. A ChatPanel is created for a contact or for a group
@@ -2636,4 +2637,4 @@ public void removeChatLinkClickedListener(ChatLinkClickedListener listener)
{
conversationPanel.removeChatLinkClickedListener(listener);
}
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java
index e06118265..75fc85147 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java
@@ -23,9 +23,11 @@
import net.java.sip.communicator.service.gui.Container;
import net.java.sip.communicator.service.keybindings.*;
import net.java.sip.communicator.util.*;
+import net.java.sip.communicator.util.Logger;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.util.*;
import org.osgi.framework.*;
import com.explodingpixels.macwidgets.*;
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindowManager.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindowManager.java
index 7962e872f..5f122c297 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindowManager.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindowManager.java
@@ -20,7 +20,9 @@
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.gui.event.*;
import net.java.sip.communicator.service.protocol.*;
-import net.java.sip.communicator.util.*;
+import net.java.sip.communicator.util.Logger;
+
+import org.jitsi.util.*;
/**
* Manages chat windows and panels.
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWritePanel.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWritePanel.java
index 7829c825f..1c3149968 100755
--- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWritePanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWritePanel.java
@@ -21,7 +21,7 @@
import net.java.sip.communicator.impl.gui.customcontrols.*;
import net.java.sip.communicator.impl.gui.main.chat.menus.*;
import net.java.sip.communicator.impl.gui.utils.*;
-import net.java.sip.communicator.service.configuration.*;
+import org.jitsi.service.configuration.*;
import net.java.sip.communicator.service.gui.event.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.util.*;
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ContactPhotoPanel.java b/src/net/java/sip/communicator/impl/gui/main/chat/ContactPhotoPanel.java
index 8f95667a3..54c8ac634 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/ContactPhotoPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/ContactPhotoPanel.java
@@ -188,4 +188,4 @@ public String getToolTipText(MouseEvent event)
{
return chatSession.getChatName();
}
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/FontChooser.java b/src/net/java/sip/communicator/impl/gui/main/chat/FontChooser.java
index c0f287621..4945aed0b 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/FontChooser.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/FontChooser.java
@@ -14,9 +14,10 @@
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.utils.*;
-import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.service.resources.*;
+
/**
* The FontChooserDialog is a dialog for font selection
*
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatContactRoleIcon.java b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatContactRoleIcon.java
index 1468b5e3c..80b3a8c85 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatContactRoleIcon.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatContactRoleIcon.java
@@ -50,4 +50,4 @@ public static Icon getRoleIcon(ChatRoomMemberRole role)
}
return i;
}
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomSubjectPanel.java b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomSubjectPanel.java
index 724b932b1..75e46abba 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomSubjectPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomSubjectPanel.java
@@ -15,11 +15,12 @@
import net.java.sip.communicator.impl.gui.customcontrols.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.protocol.*;
-import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.service.resources.*;
+
/**
* The panel containing the subject of the chat room and the configuration
* button.
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatManager.java b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatManager.java
index 39eb97261..64e08b74d 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatManager.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatManager.java
@@ -20,12 +20,12 @@
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
-import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
-// Java 1.6 has javax.swing.SwingWorker so we have to disambiguate.
-import org.jdesktop.swingworker.SwingWorker;
+import org.jdesktop.swingworker.*;
+import org.jitsi.service.resources.*;
import org.osgi.framework.*;
+// Java 1.6 has javax.swing.SwingWorker so we have to disambiguate.
/**
* The ConferenceChatManager is the one that manages both chat room and
diff --git a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/AdHocChatRoomList.java b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/AdHocChatRoomList.java
index 2df98ef7d..e936e4338 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/AdHocChatRoomList.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/AdHocChatRoomList.java
@@ -10,10 +10,10 @@
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.chat.conference.*;
-import net.java.sip.communicator.service.configuration.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.util.*;
+import org.jitsi.service.configuration.*;
import org.osgi.framework.*;
/**
diff --git a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomList.java b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomList.java
index edec4b746..74c006f1a 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomList.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomList.java
@@ -11,7 +11,7 @@
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.chat.conference.*;
import net.java.sip.communicator.impl.gui.utils.*;
-import net.java.sip.communicator.service.configuration.*;
+import org.jitsi.service.configuration.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.util.*;
diff --git a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomRightButtonMenu.java b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomRightButtonMenu.java
index 576a49002..d5be43c4f 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomRightButtonMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomRightButtonMenu.java
@@ -21,6 +21,8 @@
import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.service.resources.*;
+
/**
* The ChatRoomsListRightButtonMenu is the menu, opened when user clicks
* with the right mouse button on the chat rooms list panel. It's the one that
diff --git a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/joinforms/JoinChatRoomWizard.java b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/joinforms/JoinChatRoomWizard.java
index 1b8c66226..3d29b72ff 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/joinforms/JoinChatRoomWizard.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/joinforms/JoinChatRoomWizard.java
@@ -75,4 +75,4 @@ public void wizardFinished(WizardEvent e)
newChatRoom.getChatRoomProvider());
}
}
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/joinforms/JoinChatRoomWizardPage2.java b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/joinforms/JoinChatRoomWizardPage2.java
index d39b6f271..4f23b02a9 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/joinforms/JoinChatRoomWizardPage2.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/joinforms/JoinChatRoomWizardPage2.java
@@ -160,4 +160,4 @@ public void removeUpdate(DocumentEvent e)
public void changedUpdate(DocumentEvent e)
{}
}
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/configforms/ConfigurationFrame.java b/src/net/java/sip/communicator/impl/gui/main/configforms/ConfigurationFrame.java
index 77ceba8f5..054b5c0be 100644
--- a/src/net/java/sip/communicator/impl/gui/main/configforms/ConfigurationFrame.java
+++ b/src/net/java/sip/communicator/impl/gui/main/configforms/ConfigurationFrame.java
@@ -13,9 +13,10 @@
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.*;
import net.java.sip.communicator.service.gui.*;
-import net.java.sip.communicator.util.*;
+import net.java.sip.communicator.util.Logger;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.util.*;
import org.osgi.framework.*;
import com.explodingpixels.macwidgets.*;
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListTreeCellRenderer.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListTreeCellRenderer.java
index d38df5e47..f92eb915e 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListTreeCellRenderer.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListTreeCellRenderer.java
@@ -1548,4 +1548,4 @@ public void run()
}
}
}
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListUtils.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListUtils.java
index 817d71008..18a630e7c 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListUtils.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListUtils.java
@@ -98,4 +98,4 @@ else if (errorCode
}
}.start();
}
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/GroupNode.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/GroupNode.java
index d988c3e79..11753db19 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/GroupNode.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/GroupNode.java
@@ -456,4 +456,4 @@ private void refreshSelection(int lastSelectedIndex, int newSelectedIndex)
sipCommTreeUI.selectionChanged(oldSelectionPath, newSelectionPath);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/SearchFieldUI.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/SearchFieldUI.java
index 06a680380..bf85c9e20 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/SearchFieldUI.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/SearchFieldUI.java
@@ -351,4 +351,4 @@ public static ComponentUI createUI(JComponent c)
{
return new SearchFieldUI();
}
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/UIContactDetail.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/UIContactDetail.java
index 26670893f..c50e0c263 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/UIContactDetail.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/UIContactDetail.java
@@ -201,4 +201,4 @@ public void setPrefix(String prefix)
* null if the detail doesn't support presence
*/
public abstract PresenceStatus getPresenceStatus();
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/UnknownContactPanel.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/UnknownContactPanel.java
index 6549cb0c9..38ce960c8 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/UnknownContactPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/UnknownContactPanel.java
@@ -259,4 +259,4 @@ public void setVisible(boolean isVisible)
super.setVisible(isVisible);
}
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaUIContact.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaUIContact.java
index dc834e1f9..e6735cb3c 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaUIContact.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaUIContact.java
@@ -608,4 +608,4 @@ public JPopupMenu getRightButtonMenu()
{
return new MetaContactRightButtonMenu(metaContact);
}
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/notifsource/NotificationContact.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/notifsource/NotificationContact.java
index d64c382e3..ae728ecc0 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/notifsource/NotificationContact.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/notifsource/NotificationContact.java
@@ -17,7 +17,8 @@
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.OperationSetMessageWaiting.MessageType;
import net.java.sip.communicator.service.protocol.event.*;
-import net.java.sip.communicator.service.resources.*;
+
+import org.jitsi.service.resources.*;
/**
* The NotificationContact represents a notification entry shown in
diff --git a/src/net/java/sip/communicator/impl/gui/main/login/DefaultSecurityAuthority.java b/src/net/java/sip/communicator/impl/gui/main/login/DefaultSecurityAuthority.java
index 96caa5463..e2c975366 100644
--- a/src/net/java/sip/communicator/impl/gui/main/login/DefaultSecurityAuthority.java
+++ b/src/net/java/sip/communicator/impl/gui/main/login/DefaultSecurityAuthority.java
@@ -147,4 +147,4 @@ public boolean isUserNameEditable()
{
return isUserNameEditable;
}
-}
\ No newline at end of file
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/menus/AutoAnswerMenu.java b/src/net/java/sip/communicator/impl/gui/main/menus/AutoAnswerMenu.java
index cfcaf17b8..e3bd95f93 100644
--- a/src/net/java/sip/communicator/impl/gui/main/menus/AutoAnswerMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/menus/AutoAnswerMenu.java
@@ -10,17 +10,18 @@
import java.awt.event.*;
import java.awt.image.*;
+import javax.swing.*;
+import javax.swing.border.*;
+
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.protocol.*;
-import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
-import org.osgi.framework.*;
-import javax.swing.*;
-import javax.swing.border.*;
+import org.jitsi.service.resources.*;
+import org.osgi.framework.*;
/**
* The auto answer menu dynamically adds/removes menu items for enabled/disabled
diff --git a/src/net/java/sip/communicator/impl/gui/main/menus/FileMenu.java b/src/net/java/sip/communicator/impl/gui/main/menus/FileMenu.java
index 1c8aa6d35..ddf214562 100644
--- a/src/net/java/sip/communicator/impl/gui/main/menus/FileMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/menus/FileMenu.java
@@ -20,11 +20,12 @@
import net.java.sip.communicator.impl.gui.main.contactlist.addgroup.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.gui.*;
-import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.service.resources.*;
+
/**
* The FileMenu is a menu in the main application menu bar that
* contains "New account".
diff --git a/src/net/java/sip/communicator/impl/gui/main/menus/HelpMenu.java b/src/net/java/sip/communicator/impl/gui/main/menus/HelpMenu.java
index 4a3c0ae55..6cf1680bc 100644
--- a/src/net/java/sip/communicator/impl/gui/main/menus/HelpMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/menus/HelpMenu.java
@@ -9,13 +9,13 @@
import java.awt.event.*;
import net.java.sip.communicator.impl.gui.*;
-import net.java.sip.communicator.impl.gui.event.*;
import net.java.sip.communicator.impl.gui.main.*;
import net.java.sip.communicator.impl.gui.utils.*;
-import net.java.sip.communicator.service.gui.Container;
-import net.java.sip.communicator.service.resources.*;
+import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.util.swing.*;
+import org.jitsi.service.resources.*;
+
/**
* The HelpMenu is a menu in the main application menu bar.
*
diff --git a/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java b/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java
index e5f840c34..47b8e07c9 100755
--- a/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java
@@ -10,7 +10,8 @@
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.*;
-import net.java.sip.communicator.service.resources.*;
+
+import org.jitsi.service.resources.*;
/**
* The main menu bar. This is the menu bar that appears on top of the main
diff --git a/src/net/java/sip/communicator/impl/gui/main/presence/GlobalStatusSelectorBox.java b/src/net/java/sip/communicator/impl/gui/main/presence/GlobalStatusSelectorBox.java
index e831a30f8..5bfde2490 100644
--- a/src/net/java/sip/communicator/impl/gui/main/presence/GlobalStatusSelectorBox.java
+++ b/src/net/java/sip/communicator/impl/gui/main/presence/GlobalStatusSelectorBox.java
@@ -18,7 +18,7 @@
import net.java.sip.communicator.impl.gui.lookandfeel.*;
import net.java.sip.communicator.impl.gui.main.*;
import net.java.sip.communicator.impl.gui.utils.*;
-import net.java.sip.communicator.service.configuration.*;
+import org.jitsi.service.configuration.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.service.systray.*;
diff --git a/src/net/java/sip/communicator/impl/gui/main/presence/StatusSelectorMenu.java b/src/net/java/sip/communicator/impl/gui/main/presence/StatusSelectorMenu.java
index 8b0df4cce..4cc7968a1 100644
--- a/src/net/java/sip/communicator/impl/gui/main/presence/StatusSelectorMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/presence/StatusSelectorMenu.java
@@ -13,7 +13,7 @@
import javax.swing.*;
import net.java.sip.communicator.impl.gui.*;
-import net.java.sip.communicator.service.configuration.*;
+import org.jitsi.service.configuration.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
diff --git a/src/net/java/sip/communicator/impl/gui/main/presence/avatar/imagepicker/WebcamDialog.java b/src/net/java/sip/communicator/impl/gui/main/presence/avatar/imagepicker/WebcamDialog.java
index 4429d9f1d..db16279d8 100644
--- a/src/net/java/sip/communicator/impl/gui/main/presence/avatar/imagepicker/WebcamDialog.java
+++ b/src/net/java/sip/communicator/impl/gui/main/presence/avatar/imagepicker/WebcamDialog.java
@@ -13,10 +13,13 @@
import javax.swing.*;
import net.java.sip.communicator.impl.gui.*;
-import net.java.sip.communicator.service.audionotifier.*;
-import net.java.sip.communicator.service.neomedia.*;
import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.swing.*;
+import net.java.sip.communicator.util.swing.TransparentPanel;
+
+import org.jitsi.service.audionotifier.*;
+import org.jitsi.service.neomedia.*;
+import org.jitsi.util.swing.*;
/**
* A dialog showing the webcam and allowing the user to grap a snapshot
diff --git a/src/net/java/sip/communicator/impl/gui/swing.ui.manifest.mf b/src/net/java/sip/communicator/impl/gui/swing.ui.manifest.mf
index 4b8512a24..2673e6ab1 100644
--- a/src/net/java/sip/communicator/impl/gui/swing.ui.manifest.mf
+++ b/src/net/java/sip/communicator/impl/gui/swing.ui.manifest.mf
@@ -4,17 +4,30 @@ Bundle-Description: An implementation of the UI service.
Bundle-Vendor: jitsi.org
Bundle-Version: 0.0.1
System-Bundle: yes
-Import-Package: org.osgi.framework,
- net.java.sip.communicator.service.audionotifier,
+Import-Package: com.apple.eawt,
+ com.sun.jna.examples,
+ javax.accessibility,
+ javax.imageio,
+ javax.swing,
+ javax.swing.border,
+ javax.swing.event,
+ javax.swing.filechooser,
+ javax.swing.plaf,
+ javax.swing.plaf.basic,
+ javax.swing.plaf.metal,
+ javax.swing.table,
+ javax.swing.text,
+ javax.swing.text.html,
+ javax.swing.tree,
+ javax.swing.undo,
net.java.sip.communicator.service.browserlauncher,
net.java.sip.communicator.service.callhistory,
net.java.sip.communicator.service.callhistory.event,
- net.java.sip.communicator.service.configuration,
net.java.sip.communicator.service.contacteventhandler,
net.java.sip.communicator.service.contactlist,
net.java.sip.communicator.service.contactlist.event,
+ net.java.sip.communicator.service.contactsource,
net.java.sip.communicator.service.desktop,
- net.java.sip.communicator.service.fileaccess,
net.java.sip.communicator.service.filehistory,
net.java.sip.communicator.service.gui,
net.java.sip.communicator.service.gui.event,
@@ -26,39 +39,29 @@ Import-Package: org.osgi.framework,
net.java.sip.communicator.service.protocol.event,
net.java.sip.communicator.service.protocol.icqconstants,
net.java.sip.communicator.service.protocol.media,
+ net.java.sip.communicator.service.replacement,
+ net.java.sip.communicator.service.replacement.smilies,
net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.shutdown,
net.java.sip.communicator.service.systray,
- net.java.sip.communicator.service.neomedia,
- net.java.sip.communicator.service.neomedia.event,
- net.java.sip.communicator.service.neomedia.device,
- net.java.sip.communicator.service.neomedia.format,
- net.java.sip.communicator.service.contactsource,
- net.java.sip.communicator.service.replacement,
- net.java.sip.communicator.service.replacement.smilies,
net.java.sip.communicator.util,
net.java.sip.communicator.util.event,
net.java.sip.communicator.util.skin,
- net.java.sip.communicator.util.swing.transparent,
net.java.sip.communicator.util.swing,
net.java.sip.communicator.util.swing.border,
net.java.sip.communicator.util.swing.event,
net.java.sip.communicator.util.swing.plaf,
- javax.accessibility,
- javax.imageio,
- javax.swing,
- javax.swing.border,
- javax.swing.event,
- javax.swing.filechooser,
- javax.swing.plaf,
- javax.swing.plaf.basic,
- javax.swing.plaf.metal,
- javax.swing.table,
- javax.swing.text,
- javax.swing.text.html,
- javax.swing.tree,
- javax.swing.undo,
- com.sun.jna.examples,
+ net.java.sip.communicator.util.swing.transparent,
org.jdesktop.jdic.desktop,
- say.swing,
- com.apple.eawt
+ org.jitsi.service.audionotifier,
+ org.jitsi.service.configuration,
+ org.jitsi.service.fileaccess,
+ org.jitsi.service.neomedia,
+ org.jitsi.service.neomedia.event,
+ org.jitsi.service.neomedia.device,
+ org.jitsi.service.neomedia.format,
+ org.jitsi.service.resources,
+ org.jitsi.util,
+ org.jitsi.util.swing,
+ org.osgi.framework,
+ say.swing
diff --git a/src/net/java/sip/communicator/impl/gui/utils/ConfigurationManager.java b/src/net/java/sip/communicator/impl/gui/utils/ConfigurationManager.java
index 3ec0530ed..73c078bb5 100644
--- a/src/net/java/sip/communicator/impl/gui/utils/ConfigurationManager.java
+++ b/src/net/java/sip/communicator/impl/gui/utils/ConfigurationManager.java
@@ -11,7 +11,7 @@
import java.util.List;
import net.java.sip.communicator.impl.gui.*;
-import net.java.sip.communicator.service.configuration.*;
+import org.jitsi.service.configuration.*;
import net.java.sip.communicator.service.protocol.*;
import org.osgi.framework.*;
diff --git a/src/net/java/sip/communicator/impl/gui/utils/SoundProperties.java b/src/net/java/sip/communicator/impl/gui/utils/SoundProperties.java
index 76d0aaf84..a4933f5ea 100644
--- a/src/net/java/sip/communicator/impl/gui/utils/SoundProperties.java
+++ b/src/net/java/sip/communicator/impl/gui/utils/SoundProperties.java
@@ -7,7 +7,8 @@
package net.java.sip.communicator.impl.gui.utils;
import net.java.sip.communicator.impl.gui.*;
-import net.java.sip.communicator.service.resources.*;
+
+import org.jitsi.service.resources.*;
/**
* Manages the access to the properties file containing all sounds paths.
diff --git a/src/net/java/sip/communicator/impl/hid/HIDServiceImpl.java b/src/net/java/sip/communicator/impl/hid/HIDServiceImpl.java
index 82a887102..3e5c48712 100644
--- a/src/net/java/sip/communicator/impl/hid/HIDServiceImpl.java
+++ b/src/net/java/sip/communicator/impl/hid/HIDServiceImpl.java
@@ -10,7 +10,9 @@
import java.awt.event.*;
import net.java.sip.communicator.service.hid.*;
-import net.java.sip.communicator.util.*;
+import net.java.sip.communicator.util.Logger;
+
+import org.jitsi.util.*;
/**
* Implementation of the HID service to provide way of regenerate key press
diff --git a/src/net/java/sip/communicator/impl/hid/hid.manifest.mf b/src/net/java/sip/communicator/impl/hid/hid.manifest.mf
index 504fb2dcc..a4db319f9 100644
--- a/src/net/java/sip/communicator/impl/hid/hid.manifest.mf
+++ b/src/net/java/sip/communicator/impl/hid/hid.manifest.mf
@@ -5,5 +5,6 @@ Bundle-Vendor: jitsi.org
Bundle-Version: 0.0.1
System-Bundle: yes
Import-Package: org.osgi.framework,
+ org.jitsi.util,
net.java.sip.communicator.util
-Export-Package: net.java.sip.communicator.service.hid
\ No newline at end of file
+Export-Package: net.java.sip.communicator.service.hid
diff --git a/src/net/java/sip/communicator/impl/history/HistoryServiceImpl.java b/src/net/java/sip/communicator/impl/history/HistoryServiceImpl.java
index 48214eb85..e4139d91c 100644
--- a/src/net/java/sip/communicator/impl/history/HistoryServiceImpl.java
+++ b/src/net/java/sip/communicator/impl/history/HistoryServiceImpl.java
@@ -11,16 +11,16 @@
import javax.xml.parsers.*;
-import org.osgi.framework.*;
-import org.w3c.dom.*;
-import org.xml.sax.*;
-
-import net.java.sip.communicator.service.configuration.*;
-import net.java.sip.communicator.service.fileaccess.*;
import net.java.sip.communicator.service.history.*;
import net.java.sip.communicator.service.history.records.*;
import net.java.sip.communicator.util.*;
+import org.jitsi.service.configuration.*;
+import org.jitsi.service.fileaccess.*;
+import org.osgi.framework.*;
+import org.w3c.dom.*;
+import org.xml.sax.*;
+
/**
* @author Alexander Pelov
* @author Damian Minkov
diff --git a/src/net/java/sip/communicator/impl/history/history.manifest.mf b/src/net/java/sip/communicator/impl/history/history.manifest.mf
index bc08a6d90..249408945 100644
--- a/src/net/java/sip/communicator/impl/history/history.manifest.mf
+++ b/src/net/java/sip/communicator/impl/history/history.manifest.mf
@@ -5,8 +5,8 @@ Bundle-Vendor: jitsi.org
Bundle-Version: 0.0.1
System-Bundle: yes
Import-Package: org.osgi.framework,
- net.java.sip.communicator.service.configuration,
- net.java.sip.communicator.service.fileaccess,
+ org.jitsi.service.configuration,
+ org.jitsi.service.fileaccess,
net.java.sip.communicator.service.history,
net.java.sip.communicator.service.history.records,
org.w3c.dom,
diff --git a/src/net/java/sip/communicator/impl/keybindings/KeybindingsActivator.java b/src/net/java/sip/communicator/impl/keybindings/KeybindingsActivator.java
index aad960a16..f8ca35755 100644
--- a/src/net/java/sip/communicator/impl/keybindings/KeybindingsActivator.java
+++ b/src/net/java/sip/communicator/impl/keybindings/KeybindingsActivator.java
@@ -6,11 +6,11 @@
*/
package net.java.sip.communicator.impl.keybindings;
-import net.java.sip.communicator.service.configuration.*;
+import org.jitsi.service.configuration.*;
import net.java.sip.communicator.service.keybindings.*;
-import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.jitsi.service.resources.*;
import org.osgi.framework.*;
/**
diff --git a/src/net/java/sip/communicator/impl/keybindings/KeybindingsServiceImpl.java b/src/net/java/sip/communicator/impl/keybindings/KeybindingsServiceImpl.java
index 35efb39ff..d294166f2 100644
--- a/src/net/java/sip/communicator/impl/keybindings/KeybindingsServiceImpl.java
+++ b/src/net/java/sip/communicator/impl/keybindings/KeybindingsServiceImpl.java
@@ -10,17 +10,18 @@
import java.io.*;
import java.text.*;
import java.util.*;
-import java.util.List; //disambiguation
+import java.util.List;
import javax.swing.*;
-import org.osgi.framework.*;
-
-import net.java.sip.communicator.service.configuration.*;
-import net.java.sip.communicator.service.fileaccess.*;
import net.java.sip.communicator.service.keybindings.*;
import net.java.sip.communicator.util.*;
+import org.jitsi.service.configuration.*;
+import org.jitsi.service.fileaccess.*;
+import org.osgi.framework.*;
+//disambiguation
+
/**
* Service that concerns keybinding mappings used by various parts of the UI.
* Persistence is handled as follows when started:
diff --git a/src/net/java/sip/communicator/impl/keybindings/keybindings.manifest.mf b/src/net/java/sip/communicator/impl/keybindings/keybindings.manifest.mf
index 278a3c998..716b666ee 100644
--- a/src/net/java/sip/communicator/impl/keybindings/keybindings.manifest.mf
+++ b/src/net/java/sip/communicator/impl/keybindings/keybindings.manifest.mf
@@ -6,9 +6,9 @@ Bundle-Version: 0.0.1
System-Bundle: yes
Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
- net.java.sip.communicator.service.fileaccess,
+ org.jitsi.service.fileaccess,
net.java.sip.communicator.service.gui,
- net.java.sip.communicator.service.configuration,
- net.java.sip.communicator.service.resources,
+ org.jitsi.service.configuration,
+ org.jitsi.service.resources, net.java.sip.communicator.service.resources,
javax.swing
Export-Package: net.java.sip.communicator.service.keybindings
diff --git a/src/net/java/sip/communicator/impl/ldap/LdapActivator.java b/src/net/java/sip/communicator/impl/ldap/LdapActivator.java
index 23f691e36..d47f3e1bd 100644
--- a/src/net/java/sip/communicator/impl/ldap/LdapActivator.java
+++ b/src/net/java/sip/communicator/impl/ldap/LdapActivator.java
@@ -6,16 +6,15 @@
*/
package net.java.sip.communicator.impl.ldap;
-import java.util.HashMap;
-import java.util.Map;
+import java.util.*;
-import org.osgi.framework.*;
-
-import net.java.sip.communicator.util.*;
-import net.java.sip.communicator.service.contactsource.ContactSourceService;
+import net.java.sip.communicator.service.contactsource.*;
import net.java.sip.communicator.service.ldap.*;
-import net.java.sip.communicator.service.protocol.PhoneNumberI18nService;
-import net.java.sip.communicator.service.resources.ResourceManagementService;
+import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.util.*;
+
+import org.jitsi.service.resources.*;
+import org.osgi.framework.*;
/**
* Activates the LdapService
diff --git a/src/net/java/sip/communicator/impl/ldap/LdapDirectorySetImpl.java b/src/net/java/sip/communicator/impl/ldap/LdapDirectorySetImpl.java
index 2631fc2ed..734921986 100644
--- a/src/net/java/sip/communicator/impl/ldap/LdapDirectorySetImpl.java
+++ b/src/net/java/sip/communicator/impl/ldap/LdapDirectorySetImpl.java
@@ -9,7 +9,7 @@
import java.util.*;
import net.java.sip.communicator.util.*;
-import net.java.sip.communicator.service.configuration.*;
+import org.jitsi.service.configuration.*;
import net.java.sip.communicator.service.ldap.*;
import net.java.sip.communicator.service.ldap.event.*;
diff --git a/src/net/java/sip/communicator/impl/ldap/LdapDirectorySettingsImpl.java b/src/net/java/sip/communicator/impl/ldap/LdapDirectorySettingsImpl.java
index b30093d4c..940772a38 100644
--- a/src/net/java/sip/communicator/impl/ldap/LdapDirectorySettingsImpl.java
+++ b/src/net/java/sip/communicator/impl/ldap/LdapDirectorySettingsImpl.java
@@ -8,7 +8,7 @@
import java.util.*;
-import net.java.sip.communicator.service.configuration.*;
+import org.jitsi.service.configuration.*;
import net.java.sip.communicator.service.credentialsstorage.*;
import net.java.sip.communicator.service.ldap.*;
diff --git a/src/net/java/sip/communicator/impl/ldap/LdapServiceImpl.java b/src/net/java/sip/communicator/impl/ldap/LdapServiceImpl.java
index 9791f4e42..da18a0783 100644
--- a/src/net/java/sip/communicator/impl/ldap/LdapServiceImpl.java
+++ b/src/net/java/sip/communicator/impl/ldap/LdapServiceImpl.java
@@ -11,7 +11,7 @@
import org.osgi.framework.*;
import net.java.sip.communicator.service.certificate.CertificateService;
-import net.java.sip.communicator.service.configuration.*;
+import org.jitsi.service.configuration.*;
import net.java.sip.communicator.service.contactsource.ContactSourceService;
import net.java.sip.communicator.service.credentialsstorage.*;
import net.java.sip.communicator.service.ldap.*;
diff --git a/src/net/java/sip/communicator/impl/ldap/ldap.manifest.mf b/src/net/java/sip/communicator/impl/ldap/ldap.manifest.mf
index 248ca893b..4bd450d3e 100644
--- a/src/net/java/sip/communicator/impl/ldap/ldap.manifest.mf
+++ b/src/net/java/sip/communicator/impl/ldap/ldap.manifest.mf
@@ -12,14 +12,14 @@ Import-Package: org.osgi.framework,
javax.net.ssl,
net.java.sip.communicator.util,
net.java.sip.communicator.service.certificate,
- net.java.sip.communicator.service.configuration,
+ org.jitsi.service.configuration,
net.java.sip.communicator.service.credentialsstorage,
net.java.sip.communicator.service.ldap,
net.java.sip.communicator.service.ldap.event,
net.java.sip.communicator.service.contactsource,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.util.swing,
- net.java.sip.communicator.service.resources
+ org.jitsi.service.resources, net.java.sip.communicator.service.resources
Export-Package: net.java.sip.communicator.service.ldap,
net.java.sip.communicator.service.ldap.event
Metadata-Location: /net/java/sip/communicator/impl/ldap/ldap.metadata.xml
diff --git a/src/net/java/sip/communicator/impl/msghistory/MessageHistoryServiceImpl.java b/src/net/java/sip/communicator/impl/msghistory/MessageHistoryServiceImpl.java
index 563cf4646..3eb3c5bf5 100644
--- a/src/net/java/sip/communicator/impl/msghistory/MessageHistoryServiceImpl.java
+++ b/src/net/java/sip/communicator/impl/msghistory/MessageHistoryServiceImpl.java
@@ -6,14 +6,11 @@
*/
package net.java.sip.communicator.impl.msghistory;
+import java.beans.*;
import java.io.*;
import java.util.*;
-import java.beans.*;
-
-import org.osgi.framework.*;
-import net.java.sip.communicator.service.configuration.*;
-import net.java.sip.communicator.service.resources.*;
+import org.jitsi.service.configuration.*;
import net.java.sip.communicator.service.contactlist.*;
import net.java.sip.communicator.service.history.*;
import net.java.sip.communicator.service.history.event.*;
@@ -25,6 +22,9 @@
import net.java.sip.communicator.service.protocol.event.*;
import net.java.sip.communicator.util.*;
+import org.jitsi.service.resources.*;
+import org.osgi.framework.*;
+
/**
* The Message History Service stores messages exchanged through the various
* protocols
diff --git a/src/net/java/sip/communicator/impl/msghistory/msghistory.manifest.mf b/src/net/java/sip/communicator/impl/msghistory/msghistory.manifest.mf
index e2733eefe..e6379edba 100644
--- a/src/net/java/sip/communicator/impl/msghistory/msghistory.manifest.mf
+++ b/src/net/java/sip/communicator/impl/msghistory/msghistory.manifest.mf
@@ -5,9 +5,9 @@ Bundle-Vendor: jitsi.org
Bundle-Version: 0.0.1
System-Bundle: yes
Import-Package: org.osgi.framework,
- net.java.sip.communicator.service.configuration,
- net.java.sip.communicator.service.resources,
- net.java.sip.communicator.service.fileaccess,
+ org.jitsi.service.configuration,
+ org.jitsi.service.resources, net.java.sip.communicator.service.resources,
+ org.jitsi.service.fileaccess,
net.java.sip.communicator.service.history,
net.java.sip.communicator.service.history.event,
net.java.sip.communicator.service.msghistory,
diff --git a/src/net/java/sip/communicator/impl/neomedia/AbstractRTPConnector.java b/src/net/java/sip/communicator/impl/neomedia/AbstractRTPConnector.java
deleted file mode 100755
index 931e9ca19..000000000
--- a/src/net/java/sip/communicator/impl/neomedia/AbstractRTPConnector.java
+++ /dev/null
@@ -1,417 +0,0 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.impl.neomedia;
-
-import java.io.*;
-import java.net.*;
-
-import javax.media.rtp.*;
-
-import net.java.sip.communicator.service.neomedia.*;
-
-/**
- * Provides a base/default implementation of RTPConnector which has
- * factory methods for its control and data input and output streams and has an
- * associated StreamConnector.
- *
- * @author Bing SU (nova.su@gmail.com)
- * @author Lyubomir Marinov
- */
-public abstract class AbstractRTPConnector
- implements RTPConnector
-{
- /**
- * The pair of datagram sockets for RTP and RTCP traffic that this instance
- * uses in the form of a StreamConnector.
- */
- protected final StreamConnector connector;
-
- /**
- * RTCP packet input stream used by RTPManager.
- */
- private RTPConnectorInputStream controlInputStream;
-
- /**
- * RTCP packet output stream used by RTPManager.
- */
- private RTPConnectorOutputStream controlOutputStream;
-
- /**
- * RTP packet input stream used by RTPManager.
- */
- private RTPConnectorInputStream dataInputStream;
-
- /**
- * RTP packet output stream used by RTPManager.
- */
- private RTPConnectorOutputStream dataOutputStream;
-
- /**
- * Initializes a new AbstractRTPConnector which is to use a given
- * pair of datagram sockets for RTP and RTCP traffic specified in the form
- * of a StreamConnector.
- *
- * @param connector the pair of datagram sockets for RTP and RTCP traffic
- * the new instance is to use
- */
- public AbstractRTPConnector(StreamConnector connector)
- {
- if (connector == null)
- throw new NullPointerException("connector");
-
- this.connector = connector;
- }
-
- /**
- * Add a stream target. A stream target is the destination address which
- * this RTP session will send its data to. For a single session, we can add
- * multiple SessionAddresses, and for each address, one copy of data will be
- * sent to.
- *
- * @param target Destination target address
- * @throws IOException if there was a socket-related error while adding the
- * specified target
- */
- public void addTarget(SessionAddress target)
- throws IOException
- {
- InetAddress controlAddress = target.getControlAddress();
-
- if (controlAddress != null)
- {
- getControlOutputStream()
- .addTarget(
- controlAddress,
- target.getControlPort());
- }
-
- getDataOutputStream()
- .addTarget(
- target.getDataAddress(),
- target.getDataPort());
- }
-
- /**
- * Closes all sockets, stream, and the StreamConnector that this
- * RTPConnector is using.
- */
- public void close()
- {
- if (dataOutputStream != null)
- {
- dataOutputStream.close();
- dataOutputStream = null;
- }
- if (controlOutputStream != null)
- {
- controlOutputStream.close();
- controlOutputStream = null;
- }
- if (dataInputStream != null)
- {
- dataInputStream.close();
- dataInputStream = null;
- }
- if (controlInputStream != null)
- {
- controlInputStream.close();
- controlInputStream = null;
- }
-
- connector.close();
- }
-
- /**
- * Creates the RTCP packet input stream to be used by RTPManager.
- *
- * @return a new RTCP packet input stream to be used by RTPManager
- * @throws IOException if an error occurs during the creation of the RTCP
- * packet input stream
- */
- protected abstract RTPConnectorInputStream createControlInputStream()
- throws IOException;
-
- /**
- * Creates the RTCP packet output stream to be used by RTPManager.
- *
- * @return a new RTCP packet output stream to be used by RTPManager
- * @throws IOException if an error occurs during the creation of the RTCP
- * packet output stream
- */
- protected abstract RTPConnectorOutputStream createControlOutputStream()
- throws IOException;
-
- /**
- * Creates the RTP packet input stream to be used by RTPManager.
- *
- * @return a new RTP packet input stream to be used by RTPManager
- * @throws IOException if an error occurs during the creation of the RTP
- * packet input stream
- */
- protected abstract RTPConnectorInputStream createDataInputStream()
- throws IOException;
-
- /**
- * Creates the RTP packet output stream to be used by RTPManager.
- *
- * @return a new RTP packet output stream to be used by RTPManager
- * @throws IOException if an error occurs during the creation of the RTP
- * packet output stream
- */
- protected abstract RTPConnectorOutputStream createDataOutputStream()
- throws IOException;
-
- /**
- * Gets the StreamConnector which represents the pair of datagram
- * sockets for RTP and RTCP traffic used by this instance.
- *
- * @return the StreamConnector which represents the pair of
- * datagram sockets for RTP and RTCP traffic used by this instance
- */
- public final StreamConnector getConnector()
- {
- return connector;
- }
-
- /**
- * Returns the input stream that is handling incoming RTCP packets.
- *
- * @return the input stream that is handling incoming RTCP packets.
- *
- * @throws IOException if an error occurs during the creation of the RTCP
- * packet input stream
- */
- public RTPConnectorInputStream getControlInputStream()
- throws IOException
- {
- return getControlInputStream(true);
- }
-
- /**
- * Gets the PushSourceStream which gives access to the RTCP data
- * received from the remote targets and optionally creates it if it does not
- * exist yet.
- *
- * @param create true to create the PushSourceStream which
- * gives access to the RTCP data received from the remote targets if it does
- * not exist yet; otherwise, false
- * @return the PushBufferStream which gives access to the RTCP data
- * received from the remote targets; null if it does not exist yet
- * and create is false
- * @throws IOException if creating the PushSourceStream fails
- */
- protected RTPConnectorInputStream getControlInputStream(boolean create)
- throws IOException
- {
- if ((controlInputStream == null) && create)
- controlInputStream = createControlInputStream();
- return controlInputStream;
- }
-
- /**
- * Returns the input stream that is handling outgoing RTCP packets.
- *
- * @return the input stream that is handling outgoing RTCP packets.
- *
- * @throws IOException if an error occurs during the creation of the RTCP
- * packet output stream
- */
- public RTPConnectorOutputStream getControlOutputStream()
- throws IOException
- {
- return getControlOutputStream(true);
- }
-
- /**
- * Gets the OutputDataStream which is used to write RTCP data to be
- * sent to from the remote targets and optionally creates it if it does not
- * exist yet.
- *
- * @param create true to create the OutputDataStream which
- * is to be used to write RTCP data to be sent to the remote targets if it
- * does not exist yet; otherwise, false
- * @return the OutputDataStream which is used to write RTCP data to
- * be sent to the remote targets; null if it does not exist yet and
- * create is false
- * @throws IOException if creating the OutputDataStream fails
- */
- protected RTPConnectorOutputStream getControlOutputStream(boolean create)
- throws IOException
- {
- if ((controlOutputStream == null) && create)
- controlOutputStream = createControlOutputStream();
- return controlOutputStream;
- }
-
- /**
- * Returns the input stream that is handling incoming RTP packets.
- *
- * @return the input stream that is handling incoming RTP packets.
- *
- * @throws IOException if an error occurs during the creation of the RTP
- * packet input stream
- */
- public RTPConnectorInputStream getDataInputStream()
- throws IOException
- {
- return getDataInputStream(true);
- }
-
- /**
- * Gets the PushSourceStream which gives access to the RTP data
- * received from the remote targets and optionally creates it if it does not
- * exist yet.
- *
- * @param create true to create the PushSourceStream which
- * gives access to the RTP data received from the remote targets if it does
- * not exist yet; otherwise, false
- * @return the PushBufferStream which gives access to the RTP data
- * received from the remote targets; null if it does not exist yet
- * and create is false
- * @throws IOException if creating the PushSourceStream fails
- */
- protected RTPConnectorInputStream getDataInputStream(boolean create)
- throws IOException
- {
- if ((dataInputStream == null) && create)
- dataInputStream = createDataInputStream();
- return dataInputStream;
- }
-
- /**
- * Returns the input stream that is handling outgoing RTP packets.
- *
- * @return the input stream that is handling outgoing RTP packets.
- *
- * @throws IOException if an error occurs during the creation of the RTP
- */
- public RTPConnectorOutputStream getDataOutputStream()
- throws IOException
- {
- return getDataOutputStream(true);
- }
-
- /**
- * Gets the OutputDataStream which is used to write RTP data to be
- * sent to from the remote targets and optionally creates it if it does not
- * exist yet.
- *
- * @param create true to create the OutputDataStream which
- * is to be used to write RTP data to be sent to the remote targets if it
- * does not exist yet; otherwise, false
- * @return the OutputDataStream which is used to write RTP data to
- * be sent to the remote targets; null if it does not exist yet and
- * create is false
- * @throws IOException if creating the OutputDataStream fails
- */
- public RTPConnectorOutputStream getDataOutputStream(boolean create)
- throws IOException
- {
- if ((dataOutputStream == null) && create)
- dataOutputStream = createDataOutputStream();
- return dataOutputStream;
- }
-
- /**
- * Provides a dummy implementation to {@link
- * RTPConnector#getReceiveBufferSize()} that always returns -1.
- */
- public int getReceiveBufferSize()
- {
- // Not applicable
- return -1;
- }
-
- /**
- * Provides a dummy implementation to {@link
- * RTPConnector#getRTCPBandwidthFraction()} that always returns -1.
- */
- public double getRTCPBandwidthFraction()
- {
- // Not applicable
- return -1;
- }
-
- /**
- * Provides a dummy implementation to {@link
- * RTPConnector#getRTCPSenderBandwidthFraction()} that always returns
- * -1.
- */
- public double getRTCPSenderBandwidthFraction()
- {
- // Not applicable
- return -1;
- }
-
- /**
- * Provides a dummy implementation to {@link
- * RTPConnector#getSendBufferSize()} that always returns -1.
- */
- public int getSendBufferSize()
- {
- // Not applicable
- return -1;
- }
-
- /**
- * Removes a target from our session. If a target is removed, there will be
- * no data sent to that address.
- *
- * @param target Destination target to be removed
- */
- public void removeTarget(SessionAddress target)
- {
- if (controlOutputStream != null)
- controlOutputStream
- .removeTarget(
- target.getControlAddress(),
- target.getControlPort());
-
- if (dataOutputStream != null)
- dataOutputStream
- .removeTarget(
- target.getDataAddress(),
- target.getDataPort());
- }
-
- /**
- * Remove all stream targets. After this operation is done. There will be
- * no targets receiving data, so no data will be sent.
- */
- public void removeTargets()
- {
- if (controlOutputStream != null)
- controlOutputStream.removeTargets();
-
- if (dataOutputStream != null)
- dataOutputStream.removeTargets();
- }
-
- /**
- * Provides a dummy implementation to {@link
- * RTPConnector#setReceiveBufferSize(int)}.
- *
- * @param size ignored.
- */
- public void setReceiveBufferSize(int size)
- throws IOException
- {
- // Nothing should be done here :-)
- }
-
- /**
- * Provides a dummy implementation to {@link
- * RTPConnector#setSendBufferSize(int)}.
- *
- * @param size ignored.
- */
- public void setSendBufferSize(int size)
- throws IOException
- {
- // Nothing should be done here :-)
- }
-}
diff --git a/src/net/java/sip/communicator/impl/neomedia/AbstractVolumeControl.java b/src/net/java/sip/communicator/impl/neomedia/AbstractVolumeControl.java
deleted file mode 100644
index 3b8a9eeca..000000000
--- a/src/net/java/sip/communicator/impl/neomedia/AbstractVolumeControl.java
+++ /dev/null
@@ -1,536 +0,0 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.impl.neomedia;
-
-import java.awt.*;
-import java.lang.ref.*;
-import java.util.*;
-import java.util.List;
-
-import javax.media.*;
-
-import net.java.sip.communicator.service.configuration.*;
-import net.java.sip.communicator.service.neomedia.*;
-import net.java.sip.communicator.service.neomedia.event.*;
-import net.java.sip.communicator.util.*;
-
-/**
- * Controls media service volume input or output. If a playback volume level
- * is set we change it on all current players, as we synchronize volume
- * on all players. Implements interface exposed from media service, also
- * implements the interface used in the Renderer part of JMF and merges the two
- * functionalities to work as one.
- *
- * @author Damian Minkov
- * @author Lyubomir Marinov
- */
-public class AbstractVolumeControl
- implements VolumeControl,
- GainControl
-{
- /**
- * The Logger used by the VolumeControlImpl class and
- * its instances for logging output.
- */
- private static final Logger logger
- = Logger.getLogger(AbstractVolumeControl.class);
-
- /**
- * The minimum volume level accepted by AbstractVolumeControl.
- */
- private static final float MIN_VOLUME_LEVEL = 0.0F;
-
- /**
- * The minimum volume level expressed in percent accepted by
- * AbstractVolumeControl.
- */
- public static final int MIN_VOLUME_PERCENT = 0;
-
- /**
- * The maximum volume level accepted by AbstractVolumeControl.
- */
- private static final float MAX_VOLUME_LEVEL = 1.0F;
-
- /**
- * The maximum volume level expressed in percent accepted by
- * AbstractVolumeControl.
- */
- public static final int MAX_VOLUME_PERCENT = 200;
-
- /**
- * The default volume level.
- */
- private static final float DEFAULT_VOLUME_LEVEL
- = MIN_VOLUME_LEVEL
- + (MAX_VOLUME_LEVEL - MIN_VOLUME_LEVEL)
- / ((MAX_VOLUME_PERCENT - MIN_VOLUME_PERCENT) / 100);
-
- /**
- * The VolumeChangeListeners interested in volume change events
- * through the VolumeControl interface.
- * - * Because the instances of AbstractVolumeControl are global at the - * time of this writing and, consequently, they cause the - * VolumeChangeListeners to be leaked, the listeners are referenced - * using WeakReferences. - *
- */ - private final ListGainControl supports.
- *
- * @param level The new gain value specified in the level scale.
- * @return The level that was actually set.
- *
- * @see javax.media.GainControl
- */
- public float setLevel(float level)
- {
- return this.setVolumeLevel(level);
- }
-
- /**
- * Internal implementation combining setting level from JMF
- * and from outside Media Service.
- *
- * @param value the new value, changed if different from current
- * volume settings.
- * @return the value that was changed or just the current one if
- * the same.
- */
- private float setVolumeLevel(float value)
- {
- if (value < MIN_VOLUME_LEVEL)
- value = MIN_VOLUME_LEVEL;
- else if (value > MAX_VOLUME_LEVEL)
- value = MAX_VOLUME_LEVEL;
-
- if (volumeLevel == value)
- return value;
-
- volumeLevel = value;
- fireVolumeChange();
-
- /*
- * Save the current volume level in the ConfigurationService so that we
- * can restore it on the next application run.
- */
- ConfigurationService cfg = NeomediaActivator.getConfigurationService();
-
- if (cfg != null)
- {
- cfg.setProperty(
- this.volumeLevelConfigurationPropertyName,
- String.valueOf(volumeLevel));
- }
-
- float f1 = value / initialVolumeLevel;
-
- db
- = (float)
- ((Math.log(((double)f1 != 0.0D) ? f1 : 0.0001D)
- / Math.log(10D))
- * 20D);
- fireGainEvents();
-
- return volumeLevel;
- }
-
- /**
- * Mutes current sound.
- *
- * @param mute mutes/unmutes.
- */
- public void setMute(boolean mute)
- {
- if (this.mute != mute)
- {
- this.mute = mute;
-
- fireVolumeChange();
- fireGainEvents();
- }
- }
-
- /**
- * Get mute state of sound.
- *
- * @return mute state of sound.
- */
- public boolean getMute()
- {
- return mute;
- }
-
- /**
- * Set the gain in decibels.
- * Setting the gain to 0.0 (the default) implies that the audio
- * signal is neither amplified nor attenuated.
- * Positive values amplify the audio signal and negative values attenuate
- * the signal.
- *
- * @param gain The new gain in dB.
- * @return The gain that was actually set.
- *
- * @see javax.media.GainControl
- */
- public float setDB(float gain)
- {
- if(this.db != gain)
- {
- this.db = gain;
-
- float f1 = (float)Math.pow(10D, (double)this.db / 20D);
- float volumeLevel = f1 * this.initialVolumeLevel;
-
- setVolumeLevel(volumeLevel);
- }
- return this.db;
- }
-
- /**
- * Get the current gain set for this object in dB.
- * @return The gain in dB.
- */
- public float getDB()
- {
- return this.db;
- }
-
- /**
- * Register for gain change update events.
- * A GainChangeEvent is posted when the state
- * of the GainControl changes.
- *
- * @param listener The object to deliver events to.
- */
- public void addGainChangeListener(GainChangeListener listener)
- {
- if(listener != null)
- {
- if(gainChangeListeners == null)
- gainChangeListeners = new ArrayList- * Note: Also resets any previous direction set with - * {@link #setDirection(MediaDirection)} to the direction of the specified - * MediaDevice. - *
- * - * @param device the MediaDevice that this stream should use to - * play back and capture media - * @see MediaStream#setDevice(MediaDevice) - */ - public void setDevice(MediaDevice device) - { - if (device == null) - throw new NullPointerException("device"); - - // Require AbstractMediaDevice for MediaDeviceSession support. - AbstractMediaDevice abstractMediaDevice = (AbstractMediaDevice) device; - - if ((deviceSession == null) || (deviceSession.getDevice() != device)) - { - MediaDeviceSession oldValue = deviceSession; - MediaFormat format; - MediaDirection startedDirection; - - if (deviceSession != null) - { - format = getFormat(); - startedDirection = deviceSession.getStartedDirection(); - - deviceSession.removePropertyChangeListener( - deviceSessionPropertyChangeListener); - - // keep player active - deviceSession.setDisposePlayerOnClose( - !(deviceSession instanceof VideoMediaDeviceSession)); - deviceSession.close(); - deviceSession = null; - } - else - { - format = null; - startedDirection = MediaDirection.INACTIVE; - } - - deviceSession = abstractMediaDevice.createSession(); - - /* - * Copy the playback from the old MediaDeviceSession into the new - * MediaDeviceSession in order to prevent the recreation of the - * playback of the ReceiveStream(s) when just changing the - * MediaDevice of this MediaSteam. - */ - if (oldValue != null) - deviceSession.copyPlayback(oldValue); - - deviceSession.addPropertyChangeListener( - deviceSessionPropertyChangeListener); - - /* - * Setting a new device resets any previously-set direction. - * Otherwise, we risk not being able to set a new device if it is - * mandatory for the new device to fully cover any previously-set - * direction. - */ - direction = null; - - if (deviceSession != null) - { - if (format != null) - deviceSession.setFormat(format); - deviceSession.setMute(mute); - } - deviceSessionChanged(oldValue, deviceSession); - if (deviceSession != null) - { - deviceSession.start(startedDirection); - synchronized (receiveStreams) - { - for (ReceiveStream receiveStream : receiveStreams) - deviceSession.addReceiveStream(receiveStream); - } - } - } - } - - /** - * Sets the direction in which media in this MediaStream is to be - * streamed. If this MediaStream is not currently started, calls to - * {@link #start()} later on will start it only in the specified - * direction. If it is currently started in a direction different - * than the specified, directions other than the specified will be stopped. - * - * @param direction the MediaDirection in which this - * MediaStream is to stream media when it is started - * @see MediaStream#setDirection(MediaDirection) - */ - public void setDirection(MediaDirection direction) - { - if (direction == null) - throw new NullPointerException("direction"); - if(this.direction == direction) - return; - - if(logger.isTraceEnabled()) - logger.trace("Changing direction of stream " + hashCode() - + " from:" + this.direction + " to:" + direction); - - /* - * Make sure that the specified direction is in accord with the - * direction of the MediaDevice of this instance. - */ - MediaDeviceSession deviceSession = getDeviceSession(); - MediaDirection deviceDirection - = (deviceSession == null) - ? MediaDirection.INACTIVE - : deviceSession.getDevice().getDirection(); - - if (!deviceDirection.and(direction).equals(direction)) - throw new IllegalArgumentException("direction"); - - this.direction = direction; - - switch (this.direction) - { - case INACTIVE: - stop(MediaDirection.SENDRECV); - return; - case RECVONLY: - stop(MediaDirection.SENDONLY); - break; - case SENDONLY: - stop(MediaDirection.RECVONLY); - break; - case SENDRECV: - break; - default: - // Don't know what it may be (in the future) so ignore it. - return; - } - if (started) - start(this.direction); - } - - /** - * Sets the MediaFormat that this MediaStream should - * transmit in. - * - * @param format the MediaFormat that this MediaStream - * should transmit in - * @see MediaStream#setFormat(MediaFormat) - */ - public void setFormat(MediaFormat format) - { - MediaDeviceSession deviceSession = getDeviceSession(); - MediaFormatImpl extends Format> deviceSessionFormat = null; - - if (deviceSession != null) - { - deviceSessionFormat = deviceSession.getFormat(); - if ((deviceSessionFormat != null) - && deviceSessionFormat.equals(format) - && deviceSessionFormat.advancedAttributesAreEqual( - deviceSessionFormat.getAdvancedAttributes(), - format.getAdvancedAttributes())) - return; - } - - if (logger.isTraceEnabled()) - logger.trace( - "Changing format of stream " + hashCode() - + " from: " + deviceSessionFormat - + " to: " + format); - - handleAttributes(format, format.getAdvancedAttributes()); - handleAttributes(format, format.getFormatParameters()); - deviceSession.setFormat(format); - } - - /** - * Handles attributes contained in MediaFormat. - * - * @param format the MediaFormat to handle the attributes of - * @param attrs the attributes Map to handle - */ - protected void handleAttributes( - MediaFormat format, - MapController that this listener is registered with. We use
- * the event to notify all waiting on our lock and record success or
- * failure.
- *
- * @param ce The event generated.
- */
- public void controllerUpdate(ControllerEvent ce)
- {
- // If there was an error during configure or
- // realize, the processor will be closed
- if (ce instanceof ControllerClosedEvent)
- {
- if (ce instanceof ControllerErrorEvent)
- logger.warn("ControllerErrorEvent: " + ce);
- else
- if (logger.isDebugEnabled())
- logger.debug("ControllerClosedEvent: " + ce);
-
- setFailed(true);
-
- // All controller events, send a notification
- // to the waiting thread in waitForState method.
- }
-
- Object stateLock = getStateLock();
-
- synchronized (stateLock)
- {
- stateLock.notifyAll();
- }
- }
-
- /**
- * Waits until processor enters state and returns a boolean
- * indicating success or failure of the operation.
- *
- * @param processor Processor
- * @param state one of the Processor.XXXed state vars
- * @return true if the state has been reached; false,
- * otherwise
- */
- public synchronized boolean waitForState(Processor processor, int state)
- {
- processor.addControllerListener(this);
- setFailed(false);
-
- // Call the required method on the processor
- if (state == Processor.Configured)
- processor.configure();
- else if (state == Processor.Realized)
- processor.realize();
-
- // Wait until we get an event that confirms the
- // success of the method, or a failure event.
- // See StateListener inner class
- while ((processor.getState() < state) && !failed)
- {
- Object stateLock = getStateLock();
-
- synchronized (stateLock)
- {
- try
- {
- stateLock.wait();
- }
- catch (InterruptedException ie)
- {
- logger
- .warn(
- "Failed while waiting on Processor "
- + processor
- + " for state "
- + state,
- ie);
- processor.removeControllerListener(this);
- return false;
- }
- }
- }
-
- processor.removeControllerListener(this);
- return !failed;
- }
-}
diff --git a/src/net/java/sip/communicator/impl/neomedia/RTCPConnectorInputStream.java b/src/net/java/sip/communicator/impl/neomedia/RTCPConnectorInputStream.java
deleted file mode 100644
index d25f1eb14..000000000
--- a/src/net/java/sip/communicator/impl/neomedia/RTCPConnectorInputStream.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.impl.neomedia;
-
-import java.io.*;
-import java.net.*;
-import java.util.*;
-
-import net.java.sip.communicator.service.neomedia.event.*;
-
-/**
- * @author Bing SU (nova.su@gmail.com)
- * @author Lyubomir Marinov
- * @author Sebastien Vincent
- */
-public class RTCPConnectorInputStream
- extends RTPConnectorUDPInputStream
-{
- /**
- * List of feedback listeners;
- */
- private final List- * Since the videoNotifierSupport of this - * VideoMediaStreamImpl just forwards the VideoEvents of - * the associated VideoMediaDeviceSession at the time of this - * writing, it does not make sense to have videoNotifierSupport - * executing asynchronously because it does not know whether it has to wait - * for the delivery of the VideoEvents and thus it has to default - * to waiting anyway. - *
- */ - private final VideoNotifierSupport videoNotifierSupport - = new VideoNotifierSupport(this, true); - - /** - * Initializes a new VideoMediaStreamImpl instance which will use - * the specified MediaDevice for both capture and playback of video - * exchanged via the specified StreamConnector. - * - * @param connector the StreamConnector the new instance is to use - * for sending and receiving video - * @param device the MediaDevice the new instance is to use for - * both capture and playback of video exchanged via the specified - * StreamConnector - * @param srtpControl a control which is already created, used to control - * the srtp operations. - */ - public VideoMediaStreamImpl(StreamConnector connector, MediaDevice device, - SrtpControl srtpControl) - { - super(connector, device, srtpControl); - - if(logger.isTraceEnabled()) - logger.trace("Created Video Stream with hashCode " + hashCode()); - } - - /** - * Adds a specific VideoListener to this VideoMediaStream - * in order to receive notifications when visual/video Components - * are being added and removed. - *- * Adding a listener which has already been added does nothing i.e. it is - * not added more than once and thus does not receive one and the same - * VideoEvent multiple times. - *
- * - * @param listener the VideoListener to be notified when - * visual/video Components are being added or removed in this - * VideoMediaStream - */ - public void addVideoListener(VideoListener listener) - { - videoNotifierSupport.addVideoListener(listener); - } - - /** - * Performs any optional configuration on a specific - * RTPConnectorOuputStream of an RTPManager to be used by - * this MediaStreamImpl. - * - * @param dataOutputStream the RTPConnectorOutputStream to be used - * by an RTPManager of this MediaStreamImpl and to be - * configured - */ - @Override - protected void configureDataOutputStream( - RTPConnectorOutputStream dataOutputStream) - { - super.configureDataOutputStream(dataOutputStream); - - /* - * XXX Android's current video CaptureDevice is based on MediaRecorder - * which gives no control over the number and the size of the packets, - * frame dropping is not implemented because it is hard since - * MediaRecorder generates encoded video. - */ - if (!OSUtils.IS_ANDROID) - { - int maxBandwidth - = NeomediaActivator - .getMediaServiceImpl() - .getDeviceConfiguration() - .getVideoMaxBandwidth(); - - // maximum one packet for X milliseconds(the settings are for one - // second) - dataOutputStream.setMaxPacketsPerMillis(1, 1000 / maxBandwidth); - } - } - - /** - * Performs any optional configuration on the BufferControl of the - * specified RTPManager which is to be used as the - * RTPManager of this MediaStreamImpl. - * - * @param rtpManager the RTPManager which is to be used by this - * MediaStreamImpl - * @param bufferControl the BufferControl of rtpManager on - * which any optional configuration is to be performed - */ - @Override - protected void configureRTPManagerBufferControl( - StreamRTPManager rtpManager, - BufferControl bufferControl) - { - super.configureRTPManagerBufferControl(rtpManager, bufferControl); - - bufferControl.setBufferLength(BufferControl.MAX_VALUE); - } - - /** - * Creates the visual Component depicting the video being streamed - * from the local peer to the remote peer. - * - * @param flipLocalVideoDisplay Tells to flip the local video display (true, - * in case of diplaying the webcam as a mirror), or not (false, for desktop - * streaming). - * - * @return the visual Component depicting the video being streamed - * from the local peer to the remote peer if it was immediately created or - * null if it was not immediately created and it is to be delivered - * to the currently registered VideoListeners in a - * VideoEvent with type {@link VideoEvent#VIDEO_ADDED} and origin - * {@link VideoEvent#LOCAL} - */ - public Component createLocalVisualComponent(boolean flipLocalVideoDisplay) - { - MediaDeviceSession deviceSession = getDeviceSession(); - - return - (deviceSession instanceof VideoMediaDeviceSession) - ? ((VideoMediaDeviceSession) deviceSession) - .createLocalVisualComponent(flipLocalVideoDisplay) - : null; - } - - /** - * Notifies this MediaStream that the MediaDevice (and - * respectively the MediaDeviceSession with it) which this instance - * uses for capture and playback of media has been changed. Makes sure that - * the VideoListeners of this instance get VideoEvents for - * the new/current VideoMediaDeviceSession and not for the old one. - * - * @param oldValue the MediaDeviceSession with the - * MediaDevice this instance used work with - * @param newValue the MediaDeviceSession with the - * MediaDevice this instance is to work with - * @see MediaStreamImpl#deviceSessionChanged(MediaDeviceSession, - * MediaDeviceSession) - */ - @Override - protected void deviceSessionChanged( - MediaDeviceSession oldValue, - MediaDeviceSession newValue) - { - super.deviceSessionChanged(oldValue, newValue); - - if (oldValue instanceof VideoMediaDeviceSession) - { - VideoMediaDeviceSession oldVideoMediaDeviceSession - = (VideoMediaDeviceSession) oldValue; - - if (deviceSessionVideoListener != null) - oldVideoMediaDeviceSession.removeVideoListener( - deviceSessionVideoListener); - - /* - * The oldVideoMediaDeviceSession is being disconnected from this - * VideoMediaStreamImpl so do not let it continue using its - * keyFrameControl. - */ - oldVideoMediaDeviceSession.setKeyFrameControl(null); - } - if (newValue instanceof VideoMediaDeviceSession) - { - VideoMediaDeviceSession newVideoMediaDeviceSession - = (VideoMediaDeviceSession) newValue; - - if (deviceSessionVideoListener == null) - { - deviceSessionVideoListener = new VideoListener() - { - - /** - * Notifies that a visual Component representing - * video has been added to the provider this listener has - * been added to. - * - * @param e a VideoEvent describing the added - * visual Component representing video and the - * provider it was added into - * @see VideoListener#videoAdded(VideoEvent) - */ - public void videoAdded(VideoEvent e) - { - if (fireVideoEvent( - e.getType(), - e.getVisualComponent(), - e.getOrigin(), - true)) - e.consume(); - } - - /** - * Notifies that a visual Component representing - * video has been removed from the provider this listener - * has been added to. - * - * @param e a VideoEvent describing the removed - * visual Component representing video and the - * provider it was removed from - * @see VideoListener#videoRemoved(VideoEvent) - */ - public void videoRemoved(VideoEvent e) - { - videoAdded(e); - } - - public void videoUpdate(VideoEvent e) - { - fireVideoEvent(e, true); - } - }; - } - newVideoMediaDeviceSession.addVideoListener( - deviceSessionVideoListener); - - newVideoMediaDeviceSession.setOutputSize(outputSize); - - AbstractRTPConnector rtpConnector = getRTPConnector(); - - if (rtpConnector != null) - newVideoMediaDeviceSession.setConnector(rtpConnector); - newVideoMediaDeviceSession.setRtcpFeedbackPLI(usePLI); - - /* - * The newVideoMediaDeviceSession is being connected to this - * VideoMediaStreamImpl so the key frame-related logic will be - * controlled by the keyFrameControl of this VideoMediaStreamImpl. - */ - newVideoMediaDeviceSession.setKeyFrameControl(getKeyFrameControl()); - } - } - - /** - * Disposes of the visual Component of the local peer. - * - * @param component the visual Component of the local peer to - * dispose of - */ - public void disposeLocalVisualComponent(Component component) - { - MediaDeviceSession deviceSession = getDeviceSession(); - - if(deviceSession instanceof VideoMediaDeviceSession) - ((VideoMediaDeviceSession) deviceSession) - .disposeLocalVisualComponent(component); - } - - /** - * Notifies the VideoListeners registered with this - * VideoMediaStream about a specific type of change in the - * availability of a specific visual Component depicting video. - * - * @param type the type of change as defined by VideoEvent in the - * availability of the specified visual Component depicting video - * @param visualComponent the visual Component depicting video - * which has been added or removed in this VideoMediaStream - * @param origin {@link VideoEvent#LOCAL} if the origin of the video is - * local (e.g. it is being locally captured); {@link VideoEvent#REMOTE} if - * the origin of the video is remote (e.g. a remote peer is streaming it) - * @param wait true if the call is to wait till the specified - * VideoEvent has been delivered to the VideoListeners; - * otherwise, false - * @return true if this event and, more specifically, the visual - * Component it describes have been consumed and should be - * considered owned, referenced (which is important because - * Components belong to a single Container at a time); - * otherwise, false - */ - protected boolean fireVideoEvent( - int type, Component visualComponent, int origin, - boolean wait) - { - if (logger.isTraceEnabled()) - logger - .trace( - "Firing VideoEvent with type " - + VideoEvent.typeToString(type) - + " and origin " - + VideoEvent.originToString(origin)); - - return - videoNotifierSupport.fireVideoEvent( - type, visualComponent, origin, - wait); - } - - /** - * Notifies the VideoListeners registered with this instance about - * a specific VideoEvent. - * - * @param event the VideoEvent to be fired to the - * VideoListeners registered with this instance - * @param wait true if the call is to wait till the specified - * VideoEvent has been delivered to the VideoListeners; - * otherwise, false - */ - protected void fireVideoEvent(VideoEvent event, boolean wait) - { - videoNotifierSupport.fireVideoEvent(event, wait); - } - - /** - * Gets the visual Component where video from the remote peer is - * being rendered or null if no video is currently being rendered. - * - * @return the visual Component where video from the remote peer is - * being rendered or null if no video is currently being rendered - * @see VideoMediaStream#getVisualComponent() - */ - @Deprecated - public Component getVisualComponent() - { - Listnull
- * if ZRTP is not available.
- */
- public String[] getHelloHashSep()
- {
- return getTransformEngine().getHelloHashSep();
- }
-
- /**
- * Sets the RTPConnector which is to use or uses this ZRTP engine.
- *
- * @param connector the RTPConnector which is to use or uses this
- * ZRTP engine
- */
- public void setConnector(AbstractRTPConnector connector)
- {
- zrtpConnector = connector;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * net.java.sip.communicator.service.neomedia.ZrtpControl#getSecurityString
- * ()
- */
- public String getSecurityString()
- {
- return getTransformEngine().getUserCallback().getSecurityString();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * net.java.sip.communicator.service.neomedia.ZrtpControl#getCiperString
- * ()
- */
- public String getCipherString()
- {
- return getTransformEngine().getUserCallback().getCipherString();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * net.java.sip.communicator.service.neomedia.ZrtpControl#isSecurityVerified
- * ()
- */
- public boolean isSecurityVerified()
- {
- return getTransformEngine().getUserCallback().isSecurityVerified();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * net.java.sip.communicator.service.neomedia.ZrtpControl#getPeerZid
- * ()
- */
- public byte[] getPeerZid()
- {
- return getTransformEngine().getPeerZid();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * net.java.sip.communicator.service.neomedia.ZrtpControl#getPeerZidString
- * ()
- */
- public String getPeerZidString()
- {
- byte[] zid = getPeerZid();
- String s = new String(ZrtpUtils.bytesToHexString(zid, zid.length));
- return s;
- }
-
- /**
- * Returns false, ZRTP exchanges is keys over the media path.
- *
- * @return false
- */
- public boolean requiresSecureSignalingTransport()
- {
- return false;
- }
-
- /**
- * Returns the timeout value that will we will wait
- * and fire timeout secure event if call is not secured.
- * The value is in milliseconds.
- * @return the timeout value that will we will wait
- * and fire timeout secure event if call is not secured.
- */
- public long getTimeoutValue()
- {
- // this is the default value as mentioned in rfc6189
- // we will later grab this setting from zrtp
- return 3750;
- }
-}
diff --git a/src/net/java/sip/communicator/impl/neomedia/ZrtpFortunaEntropyGatherer.java b/src/net/java/sip/communicator/impl/neomedia/ZrtpFortunaEntropyGatherer.java
deleted file mode 100644
index 608963e18..000000000
--- a/src/net/java/sip/communicator/impl/neomedia/ZrtpFortunaEntropyGatherer.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.impl.neomedia;
-
-import java.io.*;
-
-import javax.media.*;
-import javax.media.control.FormatControl;
-import javax.media.format.*;
-import javax.media.protocol.*;
-
-import gnu.java.zrtp.utils.*;
-
-import net.java.sip.communicator.impl.neomedia.device.*;
-import net.java.sip.communicator.util.*;
-
-/**
- * ZrtpFortunaEntropyGatherer initializes the Fortuna PRNG with entropy
- * data.
- *
- * ZrtpFortunaEntropyGatherer gets the media device configuration and
- * checks which media systems are available. It then reads some data from media
- * input (capture) devices and uses this data to seed the Fortuna PRNG. The
- * ZrtpFortuna PRNG is a singleton and all other methods that require
- * random data shall use this singleton.
- *
- * Use ZrtpFortunaEntropyGatherer during startup and initialization
- * phase of Jitsi but after initialization of the media devices to get entropy
- * data at the earliest point. Also make sure that entropy data is read from
- * local sources only and that entropy data is never send out (via networks
- * for example).
- *
- * @author Werner Dittmann
- * Note that, for performance reasons this class is not 100% thread safe and you
- * should not modify add or remove audio listeners in this dispatcher in the
- * notification thread (i.e. in the thread where you were notified of an audio
- * level change).
- *
- * @author Damian Minkov
- * @author Emil Ivov
- * @author Lyubomir Marinov
- */
-public class AudioLevelEventDispatcher
-{
- /**
- * The interval of time in milliseconds which the Thread of
- * AudioLevelEventDispatcher is to idly wait for data to be provided for
- * audio level calculation before it exits.
- */
- private static final long IDLE_TIMEOUT = 30 * 1000;
-
- /**
- * The AudioLevelMap in which the audio calculations run by this
- * AudioLevelEventDispatcher are to be cached in addition to
- * dispatching them to {@link #listener}.
- */
- private AudioLevelMap cache = null;
-
- /**
- * The data to process.
- */
- private byte[] data = null;
-
- /**
- * The length of the data last recorded in the data array.
- */
- private int dataLength = 0;
-
- /**
- * This is the last level we fired.
- */
- private int lastLevel = 0;
-
- /**
- * The listener which is interested in audio level changes.
- */
- private SimpleAudioLevelListener listener;
-
- /**
- * The SSRC of the stream we are measuring that we should use as a key for
- * entries of the levelMap level cache.
- */
- private long ssrc = -1;
-
- /**
- * The Thread which runs the actual audio level calculations and
- * dispatches to {@link #listener}.
- */
- private Thread thread;
-
- /**
- * The name of the Thread which is to run the actual audio level
- * calculations and to dispatch to {@link #listener}.
- */
- private final String threadName;
-
- /**
- * Initializes a new AudioLevelEventDispatcher instance which is to
- * use a specific name for its Thread which is to run the actual
- * audio level calculations and to dispatch to its
- * SimpleAudioLevelListener
- *
- * @param threadName
- */
- public AudioLevelEventDispatcher(String threadName)
- {
- this.threadName = threadName;
- }
-
- /**
- * Runs the actual audio level calculations and dispatches to the
- * {@link #listener}.
- */
- private void run()
- {
- long idleTimeoutStart = -1;
-
- while (true)
- {
- SimpleAudioLevelListener listener;
- AudioLevelMap cache;
- long ssrc;
-
- byte[] data;
- int dataLength;
-
- synchronized(this)
- {
- if (!Thread.currentThread().equals(thread))
- break;
-
- listener = this.listener;
- cache = this.cache;
- ssrc = this.ssrc;
- /*
- * If no one is interested in the audio level, do not even keep
- * the Thread waiting.
- */
- if ((listener == null) && ((cache == null) || (ssrc == -1)))
- break;
-
- data = this.data;
- dataLength = this.dataLength;
- /*
- * If there is no data to calculate the audio level of, wait for
- * such data to be provided.
- */
- if ((data == null) || (dataLength < 1))
- {
- // The current thread is idle.
- if (idleTimeoutStart == -1)
- idleTimeoutStart = System.currentTimeMillis();
- else if ((System.currentTimeMillis() - idleTimeoutStart)
- >= IDLE_TIMEOUT)
- break;
-
- boolean interrupted = false;
-
- try
- {
- wait(IDLE_TIMEOUT);
- }
- catch (InterruptedException ie)
- {
- interrupted = true;
- }
- if (interrupted)
- Thread.currentThread().interrupt();
-
- continue;
- }
- // The values of data and dataLength seem valid so consume them.
- this.data = null;
- this.dataLength = 0;
- // The current thread is no longer idle.
- idleTimeoutStart = -1;
- }
-
- int newLevel
- = AudioLevelCalculator.calculateSoundPressureLevel(
- data, 0, dataLength,
- SimpleAudioLevelListener.MIN_LEVEL,
- SimpleAudioLevelListener.MAX_LEVEL,
- lastLevel);
-
- /*
- * In order to try to mitigate the issue with allocating data, try
- * to return the one which we have just calculated the audio level
- * of.
- */
- synchronized (this)
- {
- if ((this.data == null)
- && (this.listener == null)
- && ((this.cache == null) || (this.ssrc == -1)))
- this.data = data;
- }
-
- try
- {
- // Cache the newLevel if requested.
- if ((cache != null) && (ssrc != -1))
- cache.putLevel(ssrc, newLevel);
- // Notify the listener about the newLevel if requested.
- if (listener != null)
- listener.audioLevelChanged(newLevel);
- }
- finally
- {
- lastLevel = newLevel;
- }
- }
- }
-
- /**
- * Adds data to be processed.
- *
- * @param buffer the data that we'd like to queue for processing.
- */
- public synchronized void addData(Buffer buffer)
- {
- /*
- * If no one is interested in the audio level, do not even add the
- * Buffer data.
- */
- if ((listener == null) && ((cache == null) || (ssrc == -1)))
- return;
-
- dataLength = buffer.getLength();
- if (dataLength > 0)
- {
- if((data == null) || (data.length < dataLength))
- data = new byte[dataLength];
-
- Object bufferData = buffer.getData();
-
- if (bufferData != null)
- {
- System.arraycopy(
- bufferData, buffer.getOffset(),
- data, 0,
- dataLength);
- }
-
- if (thread == null)
- startThread();
- else
- notify();
- }
- }
-
- /**
- * Sets the new listener that will be gathering all events from this
- * dispatcher.
- *
- * @param listener the listener that we will be notifying or null
- * if we are to remove it.
- */
- public synchronized void setAudioLevelListener(
- SimpleAudioLevelListener listener)
- {
- if (this.listener != listener)
- {
- this.listener = listener;
- startOrNotifyThread();
- }
- }
-
- /**
- * Sets an AudioLevelMap that this dispatcher could use to cache
- * levels it's measuring in addition to simply delivering them to a
- * listener.
- *
- * @param cache the AudioLevelMap where this dispatcher should
- * cache measured results.
- * @param ssrc the SSRC key where entries should be logged
- */
- public synchronized void setAudioLevelCache(AudioLevelMap cache, long ssrc)
- {
- if ((this.cache != cache) || (this.ssrc != ssrc))
- {
- this.cache = cache;
- this.ssrc = ssrc;
- startOrNotifyThread();
- }
- }
-
- /**
- * Starts the Thread which is to run the audio level calculations
- * and to dispatch to {@link #listener} if necessary or notifies it about a
- * change it the state on which it depends.
- */
- private synchronized void startOrNotifyThread()
- {
- if ((this.listener == null) && ((cache == null) || (ssrc == -1)))
- {
- thread = null;
- notify();
- }
- else if ((data != null) && (dataLength > 0))
- {
- if (thread == null)
- startThread();
- else
- notify();
- }
- }
-
- /**
- * Starts the Thread which is to run the audio level calculations
- * and to dispatch to {@link #listener}.
- */
- private synchronized void startThread()
- {
- thread
- = new Thread()
- {
- @Override
- public void run()
- {
- try
- {
- AudioLevelEventDispatcher.this.run();
- }
- finally
- {
- synchronized (AudioLevelEventDispatcher.this)
- {
- if (Thread.currentThread().equals(thread))
- thread = null;
- /*
- * If the thread of this AudioLevelEventDispatcher
- * is dying yet the state suggests that it should be
- * running, restart it.
- */
- if ((thread == null)
- && ((listener != null)
- || ((cache != null)
- && (ssrc != -1)))
- && (data != null)
- && (dataLength > 0))
- startThread();
- }
- }
- }
- };
- thread.setDaemon(true);
- if (threadName != null)
- thread.setName(threadName);
-
- thread.start();
- }
-}
diff --git a/src/net/java/sip/communicator/impl/neomedia/audiolevel/AudioLevelMap.java b/src/net/java/sip/communicator/impl/neomedia/audiolevel/AudioLevelMap.java
deleted file mode 100644
index a382ea608..000000000
--- a/src/net/java/sip/communicator/impl/neomedia/audiolevel/AudioLevelMap.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.impl.neomedia.audiolevel;
-
-/**
- * The class implements a basic mapping utility that allows binding
- * long CSRC ID-s to int audio levels. The class does not
- * implement any synchronization for neither read nor write operations but it
- * is still intended to handle concurrent access in a manner that can be
- * considered graceful for the audio level use case. The class uses a
- * bi-dimensional long[][] matrix that is recreated every time a
- * new CSRC is added or an existing one is removed. Iterating through the
- * matrix is only possible after obtaining a direct reference to it. It is
- * possible for this reference to become invalid shortly after someone has
- * obtained it (e.g. because someone added a new CSRC) but this should not
- * cause problems for the CSRC audio level delivery case.
- *
- * @author Emil Ivov
- */
-public class AudioLevelMap
-{
- /**
- * The matrix containing a CSRC-to-level mappings.
- */
- private long[][] levels = null;
-
- /**
- * If this map already contains csrc this method updates its level,
- * otherwise we add a new entry mapping csrc to level.
- *
- * @param csrc the CSRC key that we'd like to add/update.
- * @param level the new audio level for the specified csrc.
- */
- public void putLevel(long csrc, int level)
- {
- //copy the levels matrix so that no one pulls it from under our feet.
- long[][] levelsRef = levels;
- int csrcIndex = findCSRC(levelsRef, csrc);
-
- if (csrcIndex == -1)
- {
- //we don't have the csrc in there yet so we need a new row.
- levels = appendCSRCToMatrix(levelsRef, csrc, level);
- }
- else
- {
- levelsRef[csrcIndex][1] = level;
- }
- }
-
- /**
- * Removes csrc and its mapped level from this map.
- *
- * @param csrc the CSRC ID that we'd like to remove from this map.
- *
- * @return true if csrc was present in the Map
- * and false otherwise.
- */
- public boolean removeLevel(long csrc)
- {
- //copy the levels matrix so that no one pulls it from under our feet.
- long[][] levelsRef = levels;
- int index = findCSRC(levelsRef, csrc);
-
- if (index == -1)
- return false;
-
- if (levelsRef.length == 1)
- {
- levels = null;
- return true;
- }
-
- //copy levelsRef into newLevels ref making sure we skip the entry
- //containing the CSRC ID that we are trying to remove;
- long[][] newLevelsRef = new long[levelsRef.length - 1][];
-
- System.arraycopy(levelsRef, 0, newLevelsRef, 0, index);
- System.arraycopy(
- levelsRef, index + 1,
- newLevelsRef, index, newLevelsRef.length - index);
-
- levels = newLevelsRef;
- return true;
- }
-
- /**
- * Returns the audio level of the specified csrc id or -1
- * if csrc is not currently registered in this map.
- *
- * @param csrc the CSRC ID whose level we'd like to obtain.
- *
- * @return the audio level of the specified csrc id or -1
- * if csrc is not currently registered in this map.
- */
- public int getLevel(long csrc)
- {
- long[][] levelsRef = levels;
- int index = findCSRC(levelsRef, csrc);
-
- return (index == -1) ? -1 : ((int) levelsRef[index][1]);
- }
-
- /**
- * Returns the index of the specified csrc level in the
- * levels matrix or -1 if levels is null
- * or does not contain csrc.
- *
- * @param levels the bi-dimensional array that we'd like to search for
- * the specified csrc.
- * @param csrc the CSRC identifier that we are looking for.
- *
- * @return the the index of the specified csrc level in the
- * levels matrix or -1 if levels is null
- * or does not contain csrc.
- */
- private int findCSRC(long[][] levels, long csrc)
- {
- if (levels != null)
- {
- for (int i = 0; i < levels.length; i++)
- {
- if (levels[i][0] == csrc)
- return i;
- }
- }
- return -1;
- }
-
- /**
- * Creates a new bi-dimensional array containing all entries (if any) from
- * the levels matrix and an extra entry for the specified
- * csrc and level.
- *
- * @param levels the bi-dimensional levels array that we'd like to add a
- * mapping to.
- * @param csrc the CSRC identifier that we'd like to add to the
- * levels bi-dimensional array.
- * @param level the level corresponding to the csrc identifier.
- *
- * @return a new matrix containing all entries from levels and a new one
- * mapping csrc to level
- */
- private long[][] appendCSRCToMatrix(long[][] levels, long csrc, int level)
- {
- int newLength = 1 + ((levels == null) ? 0 : levels.length);
- long[][] newLevels = new long[newLength][];
-
- //put the new level.
- newLevels[0] = new long[] { csrc, level };
-
- if (newLength == 1)
- return newLevels;
-
- System.arraycopy(levels, 0, newLevels, 1, levels.length);
-
- return newLevels;
- }
-}
diff --git a/src/net/java/sip/communicator/impl/neomedia/codec/AbstractCodecExt.java b/src/net/java/sip/communicator/impl/neomedia/codec/AbstractCodecExt.java
deleted file mode 100644
index f0287fd44..000000000
--- a/src/net/java/sip/communicator/impl/neomedia/codec/AbstractCodecExt.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.impl.neomedia.codec;
-
-import javax.media.*;
-
-import net.sf.fmj.media.*;
-
-/**
- * Extends FMJ's AbstractCodec to make it even easier to implement a
- * Codec.
- *
- * @author Lyubomir Marinov
- */
-public abstract class AbstractCodecExt
- extends AbstractCodec
-{
- private final Class extends Format> formatClass;
-
- /**
- * The name of this PlugIn.
- */
- private final String name;
-
- private final Format[] supportedOutputFormats;
-
- /**
- * Initializes a new AbstractCodecExt instance with a specific
- * PlugIn name, a specific Class of input and output
- * Formats and a specific list of Formats supported as
- * output.
- *
- * @param name the PlugIn name of the new instance
- * @param formatClass the Class of input and output
- * Formats supported by the new instance
- * @param supportedOutputFormats the list of Formats supported by
- * the new instance as output
- */
- protected AbstractCodecExt(
- String name,
- Class extends Format> formatClass,
- Format[] supportedOutputFormats)
- {
- this.formatClass = formatClass;
- this.name = name;
- this.supportedOutputFormats = supportedOutputFormats;
-
- /*
- * An Effect is a Codec that does not modify the Format of the data, it
- * modifies the contents.
- */
- if (this instanceof Effect)
- inputFormats = this.supportedOutputFormats;
- }
-
- @Override
- public void close()
- {
- if (!opened)
- return;
-
- doClose();
-
- opened = false;
- super.close();
- }
-
- protected void discardOutputBuffer(Buffer outputBuffer)
- {
- outputBuffer.setDiscard(true);
- }
-
- protected abstract void doClose();
-
- /**
- * Opens this Codec and acquires the resources that it needs to
- * operate. A call to {@link PlugIn#open()} on this instance will result in
- * a call to doOpen only if {@link AbstractCodec#opened} is
- * false. All required input and/or output formats are assumed to
- * have been set on this Codec before doOpen is called.
- *
- * @throws ResourceUnavailableException if any of the resources that this
- * Codec needs to operate cannot be acquired
- */
- protected abstract void doOpen()
- throws ResourceUnavailableException;
-
- protected abstract int doProcess(Buffer inputBuffer, Buffer outputBuffer);
-
- /**
- * Get the output formats matching a specific input format.
- *
- * @param inputFormat the input format to get the matching output formats of
- * @return the output formats matching the specified input format
- */
- protected Format[] getMatchingOutputFormats(Format inputFormat)
- {
- /*
- * An Effect is a Codec that does not modify the Format of the data, it
- * modifies the contents.
- */
- if (this instanceof Effect)
- return new Format[] { inputFormat };
-
- if (supportedOutputFormats != null)
- return supportedOutputFormats.clone();
- return new Format[0];
- }
-
- @Override
- public String getName()
- {
- return (name == null) ? super.getName() : name;
- }
-
- /**
- * Implements {@link AbstractCodec#getSupportedOutputFormats(Format)}.
- *
- * @param inputFormat input format
- * @return array of supported output format
- * @see AbstractCodec#getSupportedOutputFormats(Format)
- */
- public Format[] getSupportedOutputFormats(Format inputFormat)
- {
- if (inputFormat == null)
- return supportedOutputFormats;
-
- if (!formatClass.isInstance(inputFormat)
- || (matches(inputFormat, inputFormats) == null))
- return new Format[0];
-
- return getMatchingOutputFormats(inputFormat);
- }
-
- /**
- * Utility to perform format matching.
- *
- * @param in input format
- * @param outs array of output formats
- * @return the first output format that is supported
- */
- public static Format matches(Format in, Format outs[])
- {
- for (Format out : outs)
- if (in.matches(out))
- return out;
- return null;
- }
-
- /**
- * Opens this PlugIn software or hardware component and acquires
- * the resources that it needs to operate. All required input and/or output
- * formats have to be set on this PlugIn before open is
- * called. Buffers should not be passed into this PlugIn without
- * first calling open.
- *
- * @throws ResourceUnavailableException if any of the resources that this
- * PlugIn needs to operate cannot be acquired
- * @see AbstractPlugIn#open()
- */
- @Override
- public void open()
- throws ResourceUnavailableException
- {
- if (opened)
- return;
-
- doOpen();
-
- opened = true;
- super.open();
- }
-
- /**
- * Implements AbstractCodec#process(Buffer, Buffer).
- *
- * @param inputBuffer
- * @param outputBuffer
- * @return BUFFER_PROCESSED_OK if all go OK or BUFFER_PROCESSED_FAILED if
- * problems occurred
- * @see AbstractCodec#process(Buffer, Buffer)
- */
- public int process(Buffer inputBuffer, Buffer outputBuffer)
- {
- if (!checkInputBuffer(inputBuffer))
- return BUFFER_PROCESSED_FAILED;
- if (isEOM(inputBuffer))
- {
- propagateEOM(outputBuffer);
- return BUFFER_PROCESSED_OK;
- }
- if (inputBuffer.isDiscard())
- {
- discardOutputBuffer(outputBuffer);
- return BUFFER_PROCESSED_OK;
- }
-
- return doProcess(inputBuffer, outputBuffer);
- }
-
- @Override
- public Format setInputFormat(Format format)
- {
- if (!formatClass.isInstance(format)
- || (matches(format, inputFormats) == null))
- return null;
-
- return super.setInputFormat(format);
- }
-
- @Override
- public Format setOutputFormat(Format format)
- {
- if (!formatClass.isInstance(format)
- || (matches(format, getMatchingOutputFormats(inputFormat))
- == null))
- return null;
-
- return super.setOutputFormat(format);
- }
-
- /**
- * Updates the format, length and offset of a
- * specific output Buffer to specific values.
- *
- * @param outputBuffer the output Buffer to update the properties
- * of
- * @param format the Format to set on outputBuffer
- * @param length the length to set on outputBuffer
- * @param offset the offset to set on outputBuffer
- */
- protected void updateOutput(
- Buffer outputBuffer,
- Format format, int length, int offset)
- {
- outputBuffer.setFormat(format);
- outputBuffer.setLength(length);
- outputBuffer.setOffset(offset);
- }
-
- protected byte[] validateByteArraySize(Buffer buffer, int newSize)
- {
- Object data = buffer.getData();
- byte[] newBytes;
-
- if (data instanceof byte[])
- {
- byte[] bytes = (byte[]) data;
-
- if (bytes.length >= newSize)
- return bytes;
-
- newBytes = new byte[newSize];
- System.arraycopy(bytes, 0, newBytes, 0, bytes.length);
- }
- else
- {
- newBytes = new byte[newSize];
- buffer.setLength(0);
- buffer.setOffset(0);
- }
-
- buffer.setData(newBytes);
- return newBytes;
- }
-
- protected short[] validateShortArraySize(Buffer buffer, int newSize)
- {
- Object data = buffer.getData();
- short[] newShorts;
-
- if (data instanceof short[])
- {
- short[] shorts = (short[]) data;
-
- if (shorts.length >= newSize)
- return shorts;
-
- newShorts = new short[newSize];
- System.arraycopy(shorts, 0, newShorts, 0, shorts.length);
- }
- else
- {
- newShorts = new short[newSize];
- buffer.setLength(0);
- buffer.setOffset(0);
- }
-
- buffer.setData(newShorts);
- return newShorts;
- }
-}
diff --git a/src/net/java/sip/communicator/impl/neomedia/codec/Constants.java b/src/net/java/sip/communicator/impl/neomedia/codec/Constants.java
deleted file mode 100644
index 803c329eb..000000000
--- a/src/net/java/sip/communicator/impl/neomedia/codec/Constants.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.impl.neomedia.codec;
-
-import net.java.sip.communicator.util.*;
-
-/**
- * Allows start import of net.java.sip.communicator.impl.neomedia.codec
- * in order to get the constants define in
- * net.java.sip.communicator.impl.neomedia.codec.Constants without star
- * import of net.java.sip.communicator.impl.neomedia.codec.
- *
- * @author Lubomir Marinov
- */
-public class Constants
-{
- /**
- * The ALAW/RTP constant.
- */
- public static final String ALAW_RTP = "ALAW/rtp";
-
- /**
- * The G722 constant.
- */
- public static final String G722 = "g722";
-
- /**
- * The G722/RTP constant.
- */
- public static final String G722_RTP = "g722/rtp";
-
- /**
- * The iLBC constant.
- */
- public static final String ILBC = "ilbc";
-
- /**
- * The iLBC/RTP constant.
- */
- public static final String ILBC_RTP = "ilbc/rtp";
-
- /**
- * The SILK constant.
- */
- public static final String SILK = "SILK";
-
- /**
- * The SILK/RTP constant.
- */
- public static final String SILK_RTP = "SILK/rtp";
-
- /**
- * The SPEEX constant.
- */
- public static final String SPEEX = "speex";
-
- /**
- * The SPEEX/RTP constant.
- */
- public static final String SPEEX_RTP = "speex/rtp";
-
- /**
- * The H264 constant.
- */
- public static final String H264 = "h264";
-
- /**
- * The H264/RTP constant.
- */
- public static final String H264_RTP = "h264/rtp";
-
- /**
- * The H263+ constant.
- */
- public static final String H263P = "H263-1998";
-
- /**
- * The H263+/RTP constant.
- */
- public static final String H263P_RTP = "h263-1998/rtp";
-
- /**
- * Pseudo format representing DTMF tones sent over RTP.
- */
- public static final String TELEPHONE_EVENT = "telephone-event";
-
- /**
- * mode : Frame size for the encoding/decoding
- * 20 - 20 ms
- * 30 - 30 ms
- */
- public static int ILBC_MODE = 30;
-
- /**
- * Default video width.
- */
- public static final int VIDEO_WIDTH;
-
- /**
- * Default video height.
- */
- public static final int VIDEO_HEIGHT;
-
- static
- {
-
- /*
- * On Mac OS X, the Apple iSight camera reports two sizes 640x480 and
- * 320x240 if we use the default size 352x288 we must use source format
- * 640x480 in this situation we suffer from high cpu usage as every
- * frame is scaled, so we use the non-standard format 320x240.
- */
- if (OSUtils.IS_MAC)
- {
- VIDEO_WIDTH = 320;
- VIDEO_HEIGHT = 240;
- }
- else
- {
- VIDEO_WIDTH = 352;
- VIDEO_HEIGHT = 288;
- }
- }
-}
diff --git a/src/net/java/sip/communicator/impl/neomedia/codec/EncodingConfiguration.java b/src/net/java/sip/communicator/impl/neomedia/codec/EncodingConfiguration.java
deleted file mode 100644
index d50b12943..000000000
--- a/src/net/java/sip/communicator/impl/neomedia/codec/EncodingConfiguration.java
+++ /dev/null
@@ -1,752 +0,0 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.impl.neomedia.codec;
-
-import java.io.*;
-import java.util.*;
-
-import javax.media.*;
-
-import net.java.sip.communicator.impl.neomedia.*;
-import net.java.sip.communicator.impl.neomedia.format.*;
-import net.java.sip.communicator.service.configuration.*;
-import net.java.sip.communicator.service.neomedia.*;
-import net.java.sip.communicator.service.neomedia.format.*;
-import net.java.sip.communicator.util.*;
-
-/**
- * Simple configuration of encoding priorities.
- *
- * @author Damian Minkov
- * @author Lyubomir Marinov
- */
-public class EncodingConfiguration
-{
-
- /**
- * The Logger used by this EncodingConfiguration instance
- * for logging output.
- */
- private final Logger logger = Logger.getLogger(EncodingConfiguration.class);
-
- /**
- * The SDP preference property.
- */
- private static final String PROP_SDP_PREFERENCE
- = "net.java.sip.communicator.impl.neomedia.codec.EncodingConfiguration";
-
- /**
- * The indicator which determines whether the G.729 codec is enabled.
- *
- * WARNING: The use of G.729 may require a license fee and/or royalty fee in
- * some countries and is licensed by
- * SIPRO Lab Telecom.
- */
- public static final boolean G729 = false;
-
- /**
- * The additional custom JMF codecs.
- */
- private static final String[] CUSTOM_CODECS =
- {
- "net.java.sip.communicator.impl.neomedia.codec.audio.alaw.DePacketizer",
- "net.java.sip.communicator.impl.neomedia.codec.audio.alaw.JavaEncoder",
- "net.java.sip.communicator.impl.neomedia.codec.audio.alaw.Packetizer",
- "net.java.sip.communicator.impl.neomedia.codec.audio.ulaw.JavaDecoder",
- "net.java.sip.communicator.impl.neomedia.codec.audio.ulaw.JavaEncoder",
- "net.java.sip.communicator.impl.neomedia.codec.audio.ulaw.Packetizer",
- "net.java.sip.communicator.impl.neomedia.codec.audio.speex.JNIDecoder",
- "net.java.sip.communicator.impl.neomedia.codec.audio.speex.JNIEncoder",
- "net.java.sip.communicator.impl.neomedia.codec.audio.speex.SpeexResampler",
- "net.java.sip.communicator.impl.neomedia.codec.audio.speex.JavaDecoder",
- "net.java.sip.communicator.impl.neomedia.codec.audio.speex.JavaEncoder",
- "net.java.sip.communicator.impl.neomedia.codec.audio.mp3.JNIEncoder",
- "net.java.sip.communicator.impl.neomedia.codec.audio.ilbc.JavaDecoder",
- "net.java.sip.communicator.impl.neomedia.codec.audio.ilbc.JavaEncoder",
- G729
- ? "net.java.sip.communicator.impl.neomedia.codec.audio.g729.JavaDecoder"
- : null,
- G729
- ? "net.java.sip.communicator.impl.neomedia.codec.audio.g729.JavaEncoder"
- : null,
- "net.java.sip.communicator.impl.neomedia.codec.audio.g722.JNIDecoder",
- "net.java.sip.communicator.impl.neomedia.codec.audio.g722.JNIEncoder",
- "net.java.sip.communicator.impl.neomedia.codec.audio.gsm.Decoder",
- "net.java.sip.communicator.impl.neomedia.codec.audio.gsm.Encoder",
- "net.java.sip.communicator.impl.neomedia.codec.audio.gsm.DePacketizer",
- "net.java.sip.communicator.impl.neomedia.codec.audio.gsm.Packetizer",
- "net.java.sip.communicator.impl.neomedia.codec.audio.silk.JavaDecoder",
- "net.java.sip.communicator.impl.neomedia.codec.audio.silk.JavaEncoder",
- "net.java.sip.communicator.impl.neomedia.codec.video.h263p.DePacketizer",
- "net.java.sip.communicator.impl.neomedia.codec.video.h263p.JNIDecoder",
- "net.java.sip.communicator.impl.neomedia.codec.video.h263p.JNIEncoder",
- "net.java.sip.communicator.impl.neomedia.codec.video.h263p.Packetizer",
- "net.java.sip.communicator.impl.neomedia.codec.video.h264.DePacketizer",
- "net.java.sip.communicator.impl.neomedia.codec.video.h264.JNIDecoder",
- "net.java.sip.communicator.impl.neomedia.codec.video.h264.JNIEncoder",
- "net.java.sip.communicator.impl.neomedia.codec.video.h264.Packetizer",
- "net.java.sip.communicator.impl.neomedia.codec.video.SwScaler"
- };
-
- /**
- * The package prefixes of the additional JMF DataSources (e.g. low
- * latency PortAudio and ALSA CaptureDevices).
- */
- private static final String[] CUSTOM_PACKAGES
- = new String[]
- {
- "net.java.sip.communicator.impl.neomedia.jmfext",
- "net.sf.fmj"
- };
-
- /**
- * The Comparator which sorts the sets according to the settings in
- * encodingPreferences.
- */
- private final Comparator prm2bits_ld8k -converts encoder parameter vector into vector of serial bits bits2prm_ld8k - converts serial received bits to encoder parameter vector
- * The transmitted parameters for 8000 bits/sec are:
- *
- * LPC: 1st codebook 7+1 bit
- * 2nd codebook 5+5 bit
- *
- * 1st subframe:
- * pitch period 8 bit
- * parity check on 1st period 1 bit
- * codebook index1 (positions) 13 bit
- * codebook index2 (signs) 4 bit
- * pitch and codebook gains 4+3 bit
- *
- * 2nd subframe:
- * pitch period (relative) 5 bit
- * codebook index1 (positions) 13 bit
- * codebook index2 (signs) 4 bit
- * pitch and codebook gains 4+3 bit
- *
- *
- * @author Lubomir Marinov (translation of ITU-T C source code to Java)
- */
-class Bits
-{
-
-/* ITU-T G.729 Software Package Release 2 (November 2006) */
-/*
- ITU-T G.729 Annex C - Reference C code for floating point
- implementation of G.729
- Version 1.01 of 15.September.98
-*/
-
-/*
-----------------------------------------------------------------------
- COPYRIGHT NOTICE
-----------------------------------------------------------------------
- ITU-T G.729 Annex C ANSI C source code
- Copyright (C) 1998, AT&T, France Telecom, NTT, University of
- Sherbrooke. All rights reserved.
-
-----------------------------------------------------------------------
-*/
-
-/*
- File : BITS.C
- Used for the floating point version of both
- G.729 main body and G.729A
-*/
-
-
-/**
- * Converts encoder parameter vector into vector of serial bits.
- *
- * @param prm input : encoded parameters
- * @param bits output: serial bits
- */
-static void prm2bits_ld8k(
- int prm[],
- short bits[]
-)
-{
- int PRM_SIZE = Ld8k.PRM_SIZE;
- short SIZE_WORD = Ld8k.SIZE_WORD;
- short SYNC_WORD = Ld8k.SYNC_WORD;
- int[] bitsno = TabLd8k.bitsno;
-
- int j = 0, i;
- bits[j] = SYNC_WORD; /* At receiver this bit indicates BFI */
- j++;
- bits[j] = SIZE_WORD; /* Number of bits in this frame */
- j++;
-
- for (i = 0; i < PRM_SIZE; i++)
- {
- int2bin(prm[i], bitsno[i], bits, j);
- j += bitsno[i];
- }
-}
-
-/**
- * Convert integer to binary and write the bits bitstream array.
- *
- * @param value input : decimal value
- * @param no_of_bits input : number of bits to use
- * @param bitstream output: bitstream
- * @param bitstream_offset input: bitstream offset
- */
-private static void int2bin(
- int value,
- int no_of_bits,
- short[] bitstream,
- int bitstream_offset
-)
-{
- short BIT_0 = Ld8k.BIT_0;
- short BIT_1 = Ld8k.BIT_1;
-
- int pt_bitstream;
- int i, bit;
-
- pt_bitstream = bitstream_offset + no_of_bits;
-
- for (i = 0; i < no_of_bits; i++)
- {
- bit = value & 0x0001; /* get lsb */
- if (bit == 0)
- bitstream[--pt_bitstream] = BIT_0;
- else
- bitstream[--pt_bitstream] = BIT_1;
- value >>= 1;
- }
-}
-
-/**
- * Converts serial received bits to encoder parameter vector.
- *
- * @param bits input : serial bits
- * @param prm output: decoded parameters
- */
-static void bits2prm_ld8k(short[] bits, int[] prm)
-{
- bits2prm_ld8k(bits, 0, prm, 0);
-}
-
-/**
- * Converts serial received bits to encoder parameter vector.
- *
- * @param bits input : serial bits
- * @param bits_offset input : serial bits offset
- * @param prm output: decoded parameters
- * @param prm_offset input: decoded parameters offset
- */
-static void bits2prm_ld8k(
- short bits[],
- int bits_offset,
- int prm[],
- int prm_offset
-)
-{
- int PRM_SIZE = Ld8k.PRM_SIZE;
- int[] bitsno = TabLd8k.bitsno;
-
- int i;
- for (i = 0; i < PRM_SIZE; i++)
- {
- prm[i+prm_offset] = bin2int(bitsno[i], bits, bits_offset);
- bits_offset += bitsno[i];
- }
-}
-
-
-/**
- * Read specified bits from bit array and convert to integer value.
- *
- * @param no_of_bits input : number of bits to read
- * @param bitstream input : array containing bits
- * @param bitstream_offset input : array offset
- * @return decimal value of bit pattern
- */
-private static int bin2int(
- int no_of_bits,
- short[] bitstream,
- int bitstream_offset
-)
-{
- short BIT_1 = Ld8k.BIT_1;
-
- int value, i;
- int bit;
-
- value = 0;
- for (i = 0; i < no_of_bits; i++)
- {
- value <<= 1;
- bit = bitstream[bitstream_offset ++];
- if (bit == BIT_1) value += 1;
- }
- return(value);
-}
-}
diff --git a/src/net/java/sip/communicator/impl/neomedia/codec/audio/g729/CodLd8k.java b/src/net/java/sip/communicator/impl/neomedia/codec/audio/g729/CodLd8k.java
deleted file mode 100644
index 3a1726f00..000000000
--- a/src/net/java/sip/communicator/impl/neomedia/codec/audio/g729/CodLd8k.java
+++ /dev/null
@@ -1,498 +0,0 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-/*
- * WARNING: The use of G.729 may require a license fee and/or royalty fee in
- * some countries and is licensed by
- * SIPRO Lab Telecom.
- */
-package net.java.sip.communicator.impl.neomedia.codec.audio.g729;
-
-/**
- * Functions coder_ld8k and init_coder_ld8k
- * Coder constant parameters (defined in "ld8k.h")
- *
- * L_WINDOW : LPC analysis window size.
- * L_NEXT : Samples of next frame needed for autocor.
- * L_FRAME : Frame size.
- * L_SUBFR : Sub-frame size.
- * M : LPC order.
- * MP1 : LPC order+1
- * L_TOTAL : Total size of speech buffer.
- * PIT_MIN : Minimum pitch lag.
- * PIT_MAX : Maximum pitch lag.
- * L_INTERPOL : Length of filter for interpolation
- *
- *
- * @author Lubomir Marinov (translation of ITU-T C source code to Java)
- */
-class CodLd8k
- extends Ld8k
-{
-
-/* ITU-T G.729 Software Package Release 2 (November 2006) */
-/*
- ITU-T G.729 Annex C - Reference C code for floating point
- implementation of G.729
- Version 1.01 of 15.September.98
-*/
-
-/*
-----------------------------------------------------------------------
- COPYRIGHT NOTICE
-----------------------------------------------------------------------
- ITU-T G.729 Annex C ANSI C source code
- Copyright (C) 1998, AT&T, France Telecom, NTT, University of
- Sherbrooke. All rights reserved.
-
-----------------------------------------------------------------------
-*/
-
-/*
- File : COD_LD8K.C
- Used for the floating point version of G.729 main body
- (not for G.729A)
-*/
-
-
-
-
- /*--------------------------------------------------------*
- * Static memory allocation. *
- *--------------------------------------------------------*/
-
- /* Speech vector */
-private final float[] old_speech = new float[L_TOTAL];
-float[] new_speech;
-int new_speech_offset;
-private float[] speech;
-private int speech_offset;
-private float[] p_window;
-private int p_window_offset;
-
- /* Weighted speech vector */
-
-private final float[] old_wsp = new float[L_FRAME+PIT_MAX];
-private float[] wsp;
-private int wsp_offset;
-
- /* Excitation vector */
-
-private final float[] old_exc = new float[L_FRAME+PIT_MAX+L_INTERPOL];
-private float[] exc;
-private int exc_offset;
-
- /* Zero vector */
-
-private final float[] ai_zero = new float[L_SUBFR+MP1];
-private float[] zero;
-private int zero_offset;
-
-
- /* Lsp (Line spectral pairs) */
-private final float[/* M */] lsp_old =
- { 0.9595f, 0.8413f, 0.6549f, 0.4154f, 0.1423f,
- -0.1423f, -0.4154f, -0.6549f, -0.8413f, -0.9595f};
-private final float[] lsp_old_q = new float[M];
-
- /* Filter's memory */
-
-private final float[] mem_syn = new float[M];
-private final float[] mem_w0 = new float[M];
-private final float[] mem_w = new float[M];
-private final float[] mem_err = new float[M+L_SUBFR];
-private float[] error;
-private int error_offset;
-
-private float sharp;
-
-private final AcelpCo acelpCo = new AcelpCo();
-private final Pwf pwf = new Pwf();
-private final QuaGain quaGain = new QuaGain();
-private final QuaLsp quaLsp = new QuaLsp();
-private final Taming taming = new Taming();
-
-/**
- * Initialization of variables for the encoder.
- * Initialize pointers to speech vector.
- *
- * |--------------------|-------------|-------------|------------|
- * previous speech sf1 sf2 L_NEXT
- *
- * <---------------- Total speech vector (L_TOTAL) ----------->
- * | <------------ LPC analysis window (L_WINDOW) ----------->
- * | | <-- present frame (L_FRAME) -->
- * old_speech | <-- new speech (L_FRAME) -->
- * p_wind | |
- * speech |
- * new_speech
- *
- */
-void init_coder_ld8k()
-{
-
- new_speech = old_speech;
- new_speech_offset = L_TOTAL - L_FRAME; /* New speech */
- speech = new_speech; /* Present frame */
- speech_offset = new_speech_offset - L_NEXT;
- p_window = old_speech;
- p_window_offset = L_TOTAL - L_WINDOW; /* For LPC window */
-
- /* Initialize static pointers */
-
- wsp = old_wsp;
- wsp_offset = PIT_MAX;
- exc = old_exc;
- exc_offset = PIT_MAX + L_INTERPOL;
- zero = ai_zero;
- zero_offset = MP1;
- error = mem_err;
- error_offset = M;
-
- /* Static vectors to zero */
- Util.set_zero(old_speech, L_TOTAL);
- Util.set_zero(old_exc, PIT_MAX+L_INTERPOL);
- Util.set_zero(old_wsp, PIT_MAX);
- Util.set_zero(mem_syn, M);
- Util.set_zero(mem_w, M);
- Util.set_zero(mem_w0, M);
- Util.set_zero(mem_err, M);
- Util.set_zero(zero, zero_offset, L_SUBFR);
- sharp = SHARPMIN;
-
- /* Initialize lsp_old_q[] */
- Util.copy(lsp_old, lsp_old_q, M);
-
- quaLsp.lsp_encw_reset();
- taming.init_exc_err();
-}
-
-/**
- * Encoder routine ( speech data should be in new_speech ).
- *
- * @param ana output: analysis parameters
- */
-void coder_ld8k(
- int ana[]
-)
-{
- /* LPC coefficients */
- float[] r = new float[MP1]; /* Autocorrelations low and hi */
- float[] A_t = new float[(MP1)*2]; /* A(z) unquantized for the 2 subframes */
- float[] Aq_t = new float[(MP1)*2]; /* A(z) quantized for the 2 subframes */
- float[] Ap1 = new float[MP1]; /* A(z) with spectral expansion */
- float[] Ap2 = new float[MP1]; /* A(z) with spectral expansion */
- float[] A, Aq; /* Pointer on A_t and Aq_t */
- int A_offset, Aq_offset;
-
- /* LSP coefficients */
- float[] lsp_new = new float[M], lsp_new_q = new float[M]; /* LSPs at 2th subframe */
- float[] lsf_int = new float[M]; /* Interpolated LSF 1st subframe. */
- float[] lsf_new = new float[M];
-
- /* Variable added for adaptive gamma1 and gamma2 of the PWF */
-
- float[] rc = new float[M]; /* Reflection coefficients */
- float[] gamma1 = new float[2]; /* Gamma1 for 1st and 2nd subframes */
- float[] gamma2 = new float[2]; /* Gamma2 for 1st and 2nd subframes */
-
- /* Other vectors */
- float[] synth = new float[L_FRAME]; /* Buffer for synthesis speech */
- float[] h1 = new float[L_SUBFR]; /* Impulse response h1[] */
- float[] xn = new float[L_SUBFR]; /* Target vector for pitch search */
- float[] xn2 = new float[L_SUBFR]; /* Target vector for codebook search */
- float[] code = new float[L_SUBFR]; /* Fixed codebook excitation */
- float[] y1 = new float[L_SUBFR]; /* Filtered adaptive excitation */
- float[] y2 = new float[L_SUBFR]; /* Filtered fixed codebook excitation */
- float[] g_coeff = new float[5]; /* Correlations between xn, y1, & y2:
- L_FRAME short of speech.
- *
- * @param sp16 input : speach short array
- * @param serial output : serial array encoded in bits_ld8k
- */
- void process(short[] sp16, short[] serial)
- {
- float[] new_speech = codLd8k.new_speech; /* Pointer to new speech data */
- int new_speech_offset = codLd8k.new_speech_offset;
-
- for (int i = 0; i < L_FRAME; i++)
- new_speech[new_speech_offset + i] = sp16[i];
-
- preProc.pre_process(new_speech, new_speech_offset, L_FRAME);
-
- codLd8k.coder_ld8k(prm);
-
- Bits.prm2bits_ld8k(prm, serial);
- }
-}
diff --git a/src/net/java/sip/communicator/impl/neomedia/codec/audio/g729/CorFunc.java b/src/net/java/sip/communicator/impl/neomedia/codec/audio/g729/CorFunc.java
deleted file mode 100644
index 6cd5b017b..000000000
--- a/src/net/java/sip/communicator/impl/neomedia/codec/audio/g729/CorFunc.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-/*
- * WARNING: The use of G.729 may require a license fee and/or royalty fee in
- * some countries and is licensed by
- * SIPRO Lab Telecom.
- */
-package net.java.sip.communicator.impl.neomedia.codec.audio.g729;
-
-/**
- * Functions corr_xy2() and cor_h_x().
- *
- * @author Lubomir Marinov (translation of ITU-T C source code to Java)
- */
-class CorFunc
-{
-
-/* ITU-T G.729 Software Package Release 2 (November 2006) */
-/*
- ITU-T G.729 Annex C - Reference C code for floating point
- implementation of G.729
- Version 1.01 of 15.September.98
-*/
-
-/*
-----------------------------------------------------------------------
- COPYRIGHT NOTICE
-----------------------------------------------------------------------
- ITU-T G.729 Annex C ANSI C source code
- Copyright (C) 1998, AT&T, France Telecom, NTT, University of
- Sherbrooke. All rights reserved.
-
-----------------------------------------------------------------------
-*/
-
-/*
- File : COR_FUNC.C
- Used for the floating point version of both
- G.729 main body and G.729A
-*/
-
-/**
- * Compute the correlation products needed for gain computation.
- *
- * @param xn input : target vector x[0:l_subfr]
- * @param y1 input : filtered adaptive codebook vector
- * @param y2 input : filtered 1st codebook innovation
- * @param g_coeff output:
- * Decoder constant parameters (defined in "ld8k.h")
- * L_FRAME : Frame size.
- * L_SUBFR : Sub-frame size.
- * M : LPC order.
- * MP1 : LPC order+1
- * PIT_MIN : Minimum pitch lag.
- * PIT_MAX : Maximum pitch lag.
- * L_INTERPOL : Length of filter for interpolation
- * PRM_SIZE : Size of vector containing analysis parameters
- *
- *
- * @author Lubomir Marinov (translation of ITU-T C source code to Java)
- */
-class DecLd8k
- extends Ld8k
-{
-
-/* ITU-T G.729 Software Package Release 2 (November 2006) */
-/*
- ITU-T G.729 Annex C - Reference C code for floating point
- implementation of G.729
- Version 1.01 of 15.September.98
-*/
-
-/*
-----------------------------------------------------------------------
- COPYRIGHT NOTICE
-----------------------------------------------------------------------
- ITU-T G.729 Annex C ANSI C source code
- Copyright (C) 1998, AT&T, France Telecom, NTT, University of
- Sherbrooke. All rights reserved.
-
-----------------------------------------------------------------------
-*/
-
-/*
- File : DEC_LD8K.C
- Used for the floating point version of G.729 main body
- (not for G.729A)
-*/
-
-/*--------------------------------------------------------*
- * Static memory allocation. *
- *--------------------------------------------------------*/
-
-/**
- * Excitation vector
- */
-private final float[] old_exc = new float[L_FRAME+PIT_MAX+L_INTERPOL];
-
-/**
- * Excitation vector
- */
-private float[] exc;
-
-/**
- * Excitation vector offset
- */
-private int exc_offset;
-
-/**
- * Lsp (Line spectral pairs)
- */
-private final float[/* M */] lsp_old={
- 0.9595f, 0.8413f, 0.6549f, 0.4154f, 0.1423f,
- -0.1423f, -0.4154f, -0.6549f, -0.8413f, -0.9595f};
-
-/**
- * Filter's memory
- */
-private final float[] mem_syn = new float[M];
-
-/**
- * pitch sharpening of previous fr
- */
-private float sharp ;
-
-/**
-* integer delay of previous frame
-*/
-private int old_t0;
-
-/**
- * fixed codebook gain
- */
-private final FloatReference gain_code = new FloatReference();
-
-/**
- * adaptive codebook gain
- */
-private final FloatReference gain_pitch = new FloatReference();
-
-private final DecGain decGain = new DecGain();
-private final Lspdec lspdec = new Lspdec();
-
-/**
- * Initialization of variables for the decoder section.
- */
-void init_decod_ld8k()
-{
- /* Initialize static pointer */
- exc = old_exc;
- exc_offset = PIT_MAX + L_INTERPOL;
-
- /* Static vectors to zero */
- Util.set_zero(old_exc,PIT_MAX + L_INTERPOL);
- Util.set_zero(mem_syn, M);
-
- sharp = SHARPMIN;
- old_t0 = 60;
- gain_code.value = 0.f;
- gain_pitch.value = 0.f;
-
- lspdec.lsp_decw_reset();
-}
-
-/**
- * Decoder
- *
- * @param parm input : synthesis parameters (parm[0] = bfi)
- * @param voicing input : voicing decision from previous frame
- * @param synth output: synthesized speech
- * @param synth_offset input : synthesized speech offset
- * @param A_t output: two sets of A(z) coefficients length=2*MP1
- * @return output: integer delay of first subframe
- */
-int decod_ld8k(
- int parm[],
- int voicing,
- float synth[],
- int synth_offset,
- float A_t[]
-)
-{
- int parm_offset = 0;
-
- int t0_first = 0; /* output: integer delay of first subframe */
- float[] Az; /* Pointer to A_t (LPC coefficients) */
- int Az_offset;
- float[] lsp_new = new float[M]; /* LSPs */
- float[] code = new float[L_SUBFR]; /* algebraic codevector */
-
- /* Scalars */
- int i, i_subfr;
- IntReference t0 = new IntReference(), t0_frac = new IntReference();
- int index;
-
- int bfi;
- int bad_pitch;
-
- /* Test bad frame indicator (bfi) */
-
- bfi = parm[parm_offset];
- parm_offset++;
-
- /* Decode the LSPs */
-
- lspdec.d_lsp(parm, parm_offset, lsp_new, bfi);
- parm_offset += 2; /* Advance synthesis parameters pointer */
-
- /* Interpolation of LPC for the 2 subframes */
-
- Lpcfunc.int_qlpc(lsp_old, lsp_new, A_t);
-
- /* update the LSFs for the next frame */
-
- Util.copy(lsp_new, lsp_old, M);
-
-/*------------------------------------------------------------------------*
- * Loop for every subframe in the analysis frame *
- *------------------------------------------------------------------------*
- * The subframe size is L_SUBFR and the loop is repeated L_FRAME/L_SUBFR *
- * times *
- * - decode the pitch delay *
- * - decode algebraic code *
- * - decode pitch and codebook gains *
- * - find the excitation and compute synthesis speech *
- *------------------------------------------------------------------------*/
-
- Az = A_t; /* pointer to interpolated LPC parameters */
- Az_offset = 0;
-
- for (i_subfr = 0; i_subfr < L_FRAME; i_subfr += L_SUBFR) {
-
- index = parm[parm_offset]; /* pitch index */
- parm_offset++;
-
- if (i_subfr == 0) { /* if first subframe */
- i = parm[parm_offset]; /* get parity check result */
- parm_offset++;
- bad_pitch = bfi+ i;
- if( bad_pitch == 0)
- {
- DecLag3.dec_lag3(index, PIT_MIN, PIT_MAX, i_subfr, t0, t0_frac);
- old_t0 = t0.value;
- }
- else /* Bad frame, or parity error */
- {
- t0.value = old_t0;
- t0_frac.value = 0;
- old_t0++;
- if( old_t0> PIT_MAX) {
- old_t0 = PIT_MAX;
- }
- }
- t0_first = t0.value; /* If first frame */
- }
- else /* second subframe */
- {
- if( bfi == 0)
- {
- DecLag3.dec_lag3(index, PIT_MIN, PIT_MAX, i_subfr, t0, t0_frac);
- old_t0 = t0.value;
- }
- else
- {
- t0.value = old_t0;
- t0_frac.value = 0;
- old_t0++;
- if( old_t0 >PIT_MAX) {
- old_t0 = PIT_MAX;
- }
- }
- }
-
-
- /*-------------------------------------------------*
- * - Find the adaptive codebook vector. *
- *--------------------------------------------------*/
-
- PredLt3.pred_lt_3(exc, exc_offset + i_subfr, t0.value, t0_frac.value, L_SUBFR);
-
- /*-------------------------------------------------------*
- * - Decode innovative codebook. *
- * - Add the fixed-gain pitch contribution to code[]. *
- *-------------------------------------------------------*/
-
- if(bfi != 0) { /* Bad Frame Error Concealment */
- parm[parm_offset + 0] = (Util.random_g729() & 0x1fff); /* 13 bits random*/
- parm[parm_offset + 1]= (Util.random_g729() & 0x000f); /* 4 bits random */
- }
-
- DeAcelp.decod_ACELP(parm[parm_offset + 1], parm[parm_offset + 0], code);
- parm_offset +=2;
- for (i = t0.value; i < L_SUBFR; i++) code[i] += sharp * code[i-t0.value];
-
- /*-------------------------------------------------*
- * - Decode pitch and codebook gains. *
- *-------------------------------------------------*/
-
- index = parm[parm_offset]; /* index of energy VQ */
- parm_offset++;
- decGain.dec_gain(index, code, L_SUBFR, bfi, gain_pitch, gain_code);
-
- /*-------------------------------------------------------------*
- * - Update pitch sharpening "sharp" with quantized gain_pitch *
- *-------------------------------------------------------------*/
-
- sharp = gain_pitch.value;
- if (sharp > SHARPMAX) sharp = SHARPMAX;
- if (sharp < SHARPMIN) sharp = SHARPMIN;
-
- /*-------------------------------------------------------*
- * - Find the total excitation. *
- *-------------------------------------------------------*/
-
- if(bfi != 0 ) {
- if(voicing == 0) { /* for unvoiced frame */
- for (i = 0; i < L_SUBFR; i++) {
- exc[exc_offset + i+i_subfr] = gain_code.value*code[i];
- }
- } else { /* for voiced frame */
- for (i = 0; i < L_SUBFR; i++) {
- exc[exc_offset + i+i_subfr] = gain_pitch.value*exc[exc_offset + i+i_subfr];
- }
- }
- } else { /* No frame errors */
- for (i = 0; i < L_SUBFR; i++) {
- exc[exc_offset + i+i_subfr] = gain_pitch.value*exc[exc_offset + i+i_subfr] + gain_code.value*code[i];
- }
- }
-
- /*-------------------------------------------------------*
- * - Find synthesis speech corresponding to exc[]. *
- *-------------------------------------------------------*/
-
- Filter.syn_filt(Az, Az_offset, exc, exc_offset + i_subfr, synth, synth_offset + i_subfr, L_SUBFR, mem_syn, 0, 1);
-
- Az_offset += MP1; /* interpolated LPC parameters for next subframe */
- }
-
- /*--------------------------------------------------*
- * Update signal for next frame. *
- * -> shift to the left by L_FRAME exc[] *
- *--------------------------------------------------*/
- Util.copy(old_exc, L_FRAME, old_exc, PIT_MAX+L_INTERPOL);
- return t0_first;
-}
-}
diff --git a/src/net/java/sip/communicator/impl/neomedia/codec/audio/g729/Decoder.java b/src/net/java/sip/communicator/impl/neomedia/codec/audio/g729/Decoder.java
deleted file mode 100644
index fa085d737..000000000
--- a/src/net/java/sip/communicator/impl/neomedia/codec/audio/g729/Decoder.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-/*
- * WARNING: The use of G.729 may require a license fee and/or royalty fee in
- * some countries and is licensed by
- * SIPRO Lab Telecom.
- */
-package net.java.sip.communicator.impl.neomedia.codec.audio.g729;
-
-import java.io.*;
-
-/**
- * Main program of the G.729 8.0 kbit/s decoder.
- * Usage : decoder bitstream_file synth_file.
- *
- * @author Lubomir Marinov (translation of ITU-T C source code to Java)
- */
-class Decoder
- extends Ld8k
-{
-
-/* ITU-T G.729 Software Package Release 2 (November 2006) */
-/*
- ITU-T G.729 Annex C - Reference C code for floating point
- implementation of G.729
- Version 1.01 of 15.September.98
-*/
-
-/*
-----------------------------------------------------------------------
- COPYRIGHT NOTICE
-----------------------------------------------------------------------
- ITU-T G.729 Annex C ANSI C source code
- Copyright (C) 1998, AT&T, France Telecom, NTT, University of
- Sherbrooke. All rights reserved.
-
-----------------------------------------------------------------------
-*/
-
-/*
- File : DECODER.C
- Used for the floating point version of G.729 main body
- (not for G.729A)
-*/
-
- /**
- * DecLd8k reference
- */
- private final DecLd8k decLd8k = new DecLd8k();
-
- /**
- * Postfil reference
- */
- private final Postfil postfil = new Postfil();
-
- /**
- * PostPro reference
- */
- private final PostPro postPro = new PostPro();
- /**
- * Synthesis
- */
- private final float[] synth_buf = new float[L_FRAME+M];
-
- /**
- * Synthesis
- */
- private final float[] synth;
-
-
- /**
- * Synthesis
- */
- private int synth_offset;
-
- /**
- * Synthesis parameters + BFI
- */
- private final int[] parm = new int[PRM_SIZE+1];
-
- /**
- * Synthesis parameters + BFI
- */
- private final float[] Az_dec = new float[2*MP1];
-
- /**
- * postfilter output
- */
- private final float[] pst_out = new float[L_FRAME];
-
- /**
- * voicing for previous subframe
- */
- private int voicing;
-
- /**
- * Initialization of decoder
- */
- Decoder()
- {
-
- synth = synth_buf;
- synth_offset = M;
-
- decLd8k.init_decod_ld8k();
- postfil.init_post_filter();
- postPro.init_post_process();
-
- voicing = 60;
- }
-
- /**
- * Converts floats array into shorts array.
- *
- * @param floats
- * @param shorts
- */
- private static void floats2shorts(float[] floats, short[] shorts)
- {
- for (int i = 0; i < floats.length; i++)
- {
- /* round and convert to int */
- float f = floats[i];
- if (f >= 0.0f)
- f += 0.5f;
- else
- f -= 0.5f;
- if (f > 32767.0f)
- f = 32767.0f;
- if (f < -32768.0f)
- f = -32768.0f;
- shorts[i] = (short) f;
- }
- }
-
-/**
- * Main decoder routine
- * Usage :Decoder bitstream_file outputspeech_file
- *
- * Format for bitstream_file:
- * One (2-byte) synchronization word
- * One (2-byte) size word,
- * 80 words (2-byte) containing 80 bits.
- *
- * Format for outputspeech_file:
- * Synthesis is written to a binary file of 16 bits data.
- *
- * @param args bitstream_file outputspeech_file
- * @throws java.io.IOException
- */
-public static void main(String[] args)
- throws IOException
-{
- OutputStream f_syn;
- InputStream f_serial;
-
- short[] serial = new short[SERIAL_SIZE]; /* Serial stream */
- short[] sp16 = new short[L_FRAME]; /* Buffer to write 16 bits speech */
-
- int frame;
-
- System.out.printf("\n");
- System.out.printf("************** G.729 8 KBIT/S SPEECH DECODER ************\n");
- System.out.printf("\n");
- System.out.printf("----------------- Floating point C simulation ----------------\n");
- System.out.printf("\n");
- System.out.printf("------------ Version 1.01 (Release 2, November 2006) --------\n");
- System.out.printf("\n");
-
- /* Passed arguments */
-
- if ( args.length != 2)
- {
- System.out.printf("Usage :Decoder bitstream_file outputspeech_file\n");
- System.out.printf("\n");
- System.out.printf("Format for bitstream_file:\n");
- System.out.printf(" One (2-byte) synchronization word \n");
- System.out.printf(" One (2-byte) size word,\n");
- System.out.printf(" 80 words (2-byte) containing 80 bits.\n");
- System.out.printf("\n");
- System.out.printf("Format for outputspeech_file:\n");
- System.out.printf(" Synthesis is written to a binary file of 16 bits data.\n");
- System.exit( 1 );
- }
-
- /* Open file for synthesis and packed serial stream */
-
- try
- {
- f_serial = new FileInputStream(args[0]);
- }
- catch (IOException ex)
- {
- System.out.printf("Decoder - Error opening file %s !!\n", args[0]);
- System.exit(0);
- throw ex; // Silence the compiler.
- }
-
- try
- {
- f_syn = new FileOutputStream(args[1]);
- }
- catch (IOException ex)
- {
- System.out.printf("Decoder - Error opening file %s !!\n", args[1]);
- System.exit(0);
- throw ex; // Silence the compiler.
- }
-
- System.out.printf("Input bitstream file : %s\n",args[0]);
- System.out.printf("Synthesis speech file : %s\n",args[1]);
-
-/*-----------------------------------------------------------------*
- * Initialization of decoder *
- *-----------------------------------------------------------------*/
-
- Decoder decoder = new Decoder();
-
-/*-----------------------------------------------------------------*
- * Loop for each "L_FRAME" speech data *
- *-----------------------------------------------------------------*/
-
- frame =0;
- while(Util.fread(serial, SERIAL_SIZE, f_serial) == SERIAL_SIZE)
- {
- frame++;
- System.out.printf(" Frame: %d\r", frame);
-
- decoder.process(serial, sp16);
-
- Util.fwrite(sp16, L_FRAME, f_syn);
- }
-
- f_syn.close();
- f_serial.close();
-}
-
- /**
- * Process SERIAL_SIZE short of speech.
- *
- * @param serial input : serial array encoded in bits_ld8k
- * @param sp16 output : speech short array
- */
- void process(short[] serial, short[] sp16)
- {
- Bits.bits2prm_ld8k(serial, 2, parm, 1);
-
- /* the hardware detects frame erasures by checking if all bits
- are set to zero
- */
- parm[0] = 0; /* No frame erasure */
- for (int i=2; i < SERIAL_SIZE; i++)
- if (serial[i] == 0 ) parm[0] = 1; /* frame erased */
-
- /* check parity and put 1 in parm[4] if parity error */
-
- parm[4] = PParity.check_parity_pitch(parm[3], parm[4] );
-
- int t0_first = decLd8k.decod_ld8k(parm, voicing, synth, synth_offset, Az_dec); /* Decoder */
-
- /* Post-filter and decision on voicing parameter */
- voicing = 0;
-
- float[] ptr_Az = Az_dec; /* Decoded Az for post-filter */
- int ptr_Az_offset = 0;
-
- for(int i=0; i
- * av_pred_en = 0.0;
- * for (i = 0; i < 4; i++)
- * av_pred_en += past_qua_en[i];
- * av_pred_en = av_pred_en*0.25 - 4.0;
- * if (av_pred_en < -14.0) av_pred_en = -14.0;
- *
- *
- * @param past_qua_en input/output:Past quantized energies
- */
-static void gain_update_erasure(
- float past_qua_en[]
-)
-{
- int i;
- float av_pred_en;
-
- av_pred_en = 0.0f;
- for (i = 0; i < 4; i++)
- av_pred_en += past_qua_en[i];
- av_pred_en = av_pred_en*0.25f - 4.0f;
- if (av_pred_en < -14.0f) av_pred_en = -14.0f;
-
- for (i = 3; i > 0; i--)
- past_qua_en[i] = past_qua_en[i-1];
- past_qua_en[0] = av_pred_en;
-}
-
-}
diff --git a/src/net/java/sip/communicator/impl/neomedia/codec/audio/g729/IntReference.java b/src/net/java/sip/communicator/impl/neomedia/codec/audio/g729/IntReference.java
deleted file mode 100644
index dc35aeca2..000000000
--- a/src/net/java/sip/communicator/impl/neomedia/codec/audio/g729/IntReference.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.impl.neomedia.codec.audio.g729;
-
-/**
- * @author Lubomir Marinov
- */
-class IntReference
-{
- int value;
-}
diff --git a/src/net/java/sip/communicator/impl/neomedia/codec/audio/g729/JavaDecoder.java b/src/net/java/sip/communicator/impl/neomedia/codec/audio/g729/JavaDecoder.java
deleted file mode 100644
index c19fd02ff..000000000
--- a/src/net/java/sip/communicator/impl/neomedia/codec/audio/g729/JavaDecoder.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.impl.neomedia.codec.audio.g729;
-
-import javax.media.*;
-import javax.media.format.*;
-
-import net.java.sip.communicator.impl.neomedia.*;
-import net.java.sip.communicator.impl.neomedia.codec.*;
-import net.sf.fmj.media.*;
-
-/**
- * @author Lubomir Marinov
- */
-public class JavaDecoder
- extends AbstractCodecExt
-{
- private static final short BIT_0 = Ld8k.BIT_0;
-
- private static final short BIT_1 = Ld8k.BIT_1;
-
- private static final int L_FRAME = Ld8k.L_FRAME;
-
- private static final int SERIAL_SIZE = Ld8k.SERIAL_SIZE;
-
- private static final short SIZE_WORD = Ld8k.SIZE_WORD;
-
- private static final short SYNC_WORD = Ld8k.SYNC_WORD;
-
- private static final int INPUT_FRAME_SIZE_IN_BYTES = L_FRAME / 8;
-
- private static final int OUTPUT_FRAME_SIZE_IN_BYTES = 2 * L_FRAME;
-
- private Decoder decoder;
-
- private short[] serial;
-
- private short[] sp16;
-
- /**
- * Initializes a new JavaDecoder instance.
- */
- public JavaDecoder()
- {
- super(
- "G.729 Decoder",
- AudioFormat.class,
- new AudioFormat[]
- {
- new AudioFormat(
- AudioFormat.LINEAR,
- 8000,
- 16,
- 1,
- AudioFormat.LITTLE_ENDIAN,
- AudioFormat.SIGNED)
- });
-
- inputFormats
- = new AudioFormat[]
- {
- new AudioFormat(
- AudioFormat.G729_RTP,
- 8000,
- AudioFormat.NOT_SPECIFIED,
- 1)
- };
- }
-
- private void depacketize(
- byte[] inputFrame,
- int inputFrameOffset,
- short[] serial)
- {
- serial[0] = SYNC_WORD;
- serial[1] = SIZE_WORD;
- for (int s = 0; s < L_FRAME; s++)
- {
- int input = inputFrame[inputFrameOffset + s / 8];
-
- input &= 1 << (7 - (s % 8));
- serial[2 + s] = (0 != input) ? BIT_1 : BIT_0;
- }
- }
-
- /*
- * Implements AbstractCodecExt#doClose().
- */
- protected void doClose()
- {
- serial = null;
- sp16 = null;
- decoder = null;
- }
-
- /**
- * Opens this Codec and acquires the resources that it needs to
- * operate. A call to {@link PlugIn#open()} on this instance will result in
- * a call to doOpen only if {@link AbstractCodec#opened} is
- * false. All required input and/or output formats are assumed to
- * have been set on this Codec before doOpen is called.
- *
- * @throws ResourceUnavailableException if any of the resources that this
- * Codec needs to operate cannot be acquired
- * @see AbstractCodecExt#doOpen()
- */
- protected void doOpen()
- throws ResourceUnavailableException
- {
- serial = new short[SERIAL_SIZE];
- sp16 = new short[L_FRAME];
- decoder = new Decoder();
- }
-
- /*
- * Implements AbstractCodecExt#doProcess(Buffer, Buffer).
- */
- protected int doProcess(Buffer inputBuffer, Buffer outputBuffer)
- {
- byte[] input = (byte[]) inputBuffer.getData();
-
- int inputLength = inputBuffer.getLength();
-
- if (inputLength < INPUT_FRAME_SIZE_IN_BYTES)
- {
- discardOutputBuffer(outputBuffer);
- return BUFFER_PROCESSED_OK | OUTPUT_BUFFER_NOT_FILLED;
- }
-
- int inputOffset = inputBuffer.getOffset();
-
- depacketize(input, inputOffset, serial);
- inputLength -= INPUT_FRAME_SIZE_IN_BYTES;
- inputBuffer.setLength(inputLength);
- inputOffset += INPUT_FRAME_SIZE_IN_BYTES;
- inputBuffer.setOffset(inputOffset);
-
- decoder.process(serial, sp16);
-
- byte[] output
- = validateByteArraySize(
- outputBuffer,
- outputBuffer.getOffset() + OUTPUT_FRAME_SIZE_IN_BYTES);
-
- writeShorts(sp16, output, outputBuffer.getOffset());
- outputBuffer.setLength(OUTPUT_FRAME_SIZE_IN_BYTES);
-
- int processResult = BUFFER_PROCESSED_OK;
-
- if (inputLength > 0)
- processResult |= INPUT_BUFFER_NOT_CONSUMED;
- return processResult;
- }
-
- private static void writeShorts(
- short[] input,
- byte[] output,
- int outputOffset)
- {
- for (int i=0, o=outputOffset; iJavaEncoder instance.
- */
- public JavaEncoder()
- {
- super(
- "G.729 Encoder",
- AudioFormat.class,
- new AudioFormat[]
- {
- new AudioFormat(
- AudioFormat.G729_RTP,
- 8000,
- AudioFormat.NOT_SPECIFIED,
- 1)
- });
-
- inputFormats
- = new AudioFormat[]
- {
- new AudioFormat(
- AudioFormat.LINEAR,
- 8000,
- 16,
- 1,
- AudioFormat.LITTLE_ENDIAN,
- AudioFormat.SIGNED)
- };
- }
-
- /**
- * Get the output format.
- *
- * @return output format
- * @see net.sf.fmj.media.AbstractCodec#getOutputFormat()
- */
- @Override
- public Format getOutputFormat()
- {
- Format outputFormat = super.getOutputFormat();
-
- if ((outputFormat != null)
- && (outputFormat.getClass() == AudioFormat.class))
- {
- AudioFormat outputAudioFormat = (AudioFormat) outputFormat;
-
- outputFormat = setOutputFormat(
- new AudioFormat(
- outputAudioFormat.getEncoding(),
- outputAudioFormat.getSampleRate(),
- outputAudioFormat.getSampleSizeInBits(),
- outputAudioFormat.getChannels(),
- outputAudioFormat.getEndian(),
- outputAudioFormat.getSigned(),
- outputAudioFormat.getFrameSizeInBits(),
- outputAudioFormat.getFrameRate(),
- outputAudioFormat.getDataType())
- {
- private static final long serialVersionUID = 0L;
-
- @Override
- public long computeDuration(long length)
- {
- return JavaEncoder.this.duration;
- }
- });
- }
- return outputFormat;
- }
-
- protected void discardOutputBuffer(Buffer outputBuffer)
- {
- super.discardOutputBuffer(outputBuffer);
-
- outputFrameCount = 0;
- }
-
- /*
- * Implements AbstractCodecExt#doClose().
- */
- protected void doClose()
- {
- prevInput = null;
- prevInputLength = 0;
-
- sp16 = null;
- serial = null;
- coder = null;
- }
-
- /**
- * Opens this Codec and acquires the resources that it needs to
- * operate. A call to {@link PlugIn#open()} on this instance will result in
- * a call to doOpen only if {@link AbstractCodec#opened} is
- * false. All required input and/or output formats are assumed to
- * have been set on this Codec before doOpen is called.
- *
- * @throws ResourceUnavailableException if any of the resources that this
- * Codec needs to operate cannot be acquired
- * @see AbstractCodecExt#doOpen()
- */
- protected void doOpen()
- throws ResourceUnavailableException
- {
- prevInput = new byte[INPUT_FRAME_SIZE_IN_BYTES];
- prevInputLength = 0;
-
- sp16 = new short[L_FRAME];
- serial = new short[SERIAL_SIZE];
- coder = new Coder();
-
- outputFrameCount = 0;
- }
-
- /*
- * Implements AbstractCodecExt#doProcess(Buffer, Buffer).
- */
- protected int doProcess(Buffer inputBuffer, Buffer outputBuffer)
- {
- byte[] input = (byte[]) inputBuffer.getData();
-
- int inputLength = inputBuffer.getLength();
- int inputOffset = inputBuffer.getOffset();
-
- if ((prevInputLength + inputLength) < INPUT_FRAME_SIZE_IN_BYTES)
- {
- System.arraycopy(
- input,
- inputOffset,
- prevInput,
- prevInputLength,
- inputLength);
- prevInputLength += inputLength;
- return BUFFER_PROCESSED_OK | OUTPUT_BUFFER_NOT_FILLED;
- }
-
- int readShorts = 0;
-
- if (prevInputLength > 0)
- {
- readShorts
- += readShorts(prevInput, 0, sp16, 0, prevInputLength / 2);
- prevInputLength = 0;
- }
- readShorts
- = readShorts(
- input,
- inputOffset,
- sp16,
- readShorts,
- sp16.length - readShorts);
-
- int readBytes = 2 * readShorts;
-
- inputLength -= readBytes;
- inputBuffer.setLength(inputLength);
- inputOffset += readBytes;
- inputBuffer.setOffset(inputOffset);
-
- coder.process(sp16, serial);
-
- byte[] output
- = validateByteArraySize(
- outputBuffer,
- outputBuffer.getOffset() + 2 * OUTPUT_FRAME_SIZE_IN_BYTES);
-
- packetize(
- serial,
- output,
- outputBuffer.getOffset()
- + OUTPUT_FRAME_SIZE_IN_BYTES * outputFrameCount);
- outputBuffer.setLength(
- outputBuffer.getLength() + OUTPUT_FRAME_SIZE_IN_BYTES);
-
- outputBuffer.setFormat(outputFormat);
-
- int processResult = BUFFER_PROCESSED_OK;
-
- if (outputFrameCount == 1)
- outputFrameCount = 0;
- else
- {
- outputFrameCount = 1;
- processResult |= OUTPUT_BUFFER_NOT_FILLED;
- }
- if (inputLength > 0)
- processResult |= INPUT_BUFFER_NOT_CONSUMED;
-
- if(processResult == BUFFER_PROCESSED_OK)
- {
- updateOutput(
- outputBuffer,
- getOutputFormat(), outputBuffer.getLength(),
- outputBuffer.getOffset());
- outputBuffer.setDuration(duration);
- }
- return processResult;
- }
-
- private void packetize(
- short[] serial,
- byte[] outputFrame,
- int outputFrameOffset)
- {
- Arrays.fill(
- outputFrame,
- outputFrameOffset,
- outputFrameOffset + L_FRAME / 8,
- (byte) 0);
-
- for (int s = 0; s < L_FRAME; s++)
- if (BIT_1 == serial[2 + s])
- {
- int o = outputFrameOffset + s / 8;
- int output = outputFrame[o];
-
- output |= 1 << (7 - (s % 8));
- outputFrame[o] = (byte) (output & 0xFF);
- }
- }
-
- private static int readShorts(
- byte[] input,
- int inputOffset,
- short[] output,
- int outputOffset,
- int outputLength)
- {
- for (int o=outputOffset, i=inputOffset; o
- * The pitch range for the first subframe is divided as follows:
- * 19 1/3 to 84 2/3 resolution 1/3
- * 85 to 143 resolution 1
- *
- * The period in the first subframe is encoded with 8 bits.
- * For the range with fractions:
- * index = (T-19)*3 + frac - 1; where T=[19..85] and frac=[-1,0,1]
- * and for the integer only range
- * index = (T - 85) + 197; where T=[86..143]
- *----------------------------------------------------------------------
- * For the second subframe a resolution of 1/3 is always used, and the
- * search range is relative to the lag in the first subframe.
- * If t0 is the lag in the first subframe then
- * t_min=t0-5 and t_max=t0+4 and the range is given by
- * t_min - 2/3 to t_max + 2/3
- *
- * The period in the 2nd subframe is encoded with 5 bits:
- * index = (T-(t_min-1))*3 + frac - 1; where T[t_min-1 .. t_max+1]
- *
- *
- * @param T0 input : Pitch delay
- * @param T0_frac input : Fractional pitch delay
- * @param T0_min in/out: Minimum search delay
- * @param T0_max in/out: Maximum search delay
- * @param pit_min input : Minimum pitch delay
- * @param pit_max input : Maximum pitch delay
- * @param pit_flag input : Flag for 1st subframe
- * @return Return index of encoding
- */
-static int enc_lag3(
- int T0,
- int T0_frac,
- IntReference T0_min,
- IntReference T0_max,
- int pit_min,
- int pit_max,
- int pit_flag
-)
-{
- int index;
- int _T0_min = T0_min.value, _T0_max = T0_max.value;
-
- if (pit_flag == 0) /* if 1st subframe */
- {
- /* encode pitch delay (with fraction) */
-
- if (T0 <= 85)
- index = T0*3 - 58 + T0_frac;
- else
- index = T0 + 112;
-
- /* find T0_min and T0_max for second subframe */
-
- _T0_min = T0 - 5;
- if (_T0_min < pit_min) _T0_min = pit_min;
- _T0_max = _T0_min + 9;
- if (_T0_max > pit_max)
- {
- _T0_max = pit_max;
- _T0_min = _T0_max - 9;
- }
- }
-
- else /* second subframe */
- {
- index = T0 - _T0_min;
- index = index*3 + 2 + T0_frac;
- }
- T0_min.value = _T0_min;
- T0_max.value = _T0_max;
- return index;
-}
-
-/**
- * For interpolating the normalized correlation
- *
- * @param x input : function to be interpolated
- * @param x_offset input : function offset
- * @param frac input : fraction value to evaluate
- * @return interpolated value
- */
-private static float interpol_3(
- float[] x,
- int x_offset,
- int frac
-)
-{
- int L_INTER4 = Ld8k.L_INTER4;
- int UP_SAMP = Ld8k.UP_SAMP;
- float[] inter_3 = TabLd8k.inter_3;
-
- int i;
- float s;
- int x1, x2, c1, c2;
-
- if (frac < 0) {
- frac += UP_SAMP;
- x_offset--;
- }
- x1 = x_offset;
- x2 = x_offset + 1;
- c1 = frac;
- c2 = UP_SAMP-frac;
-
- s = 0.0f;
- for(i=0; i< L_INTER4; i++, c1+=UP_SAMP, c2+=UP_SAMP)
- {
- s+= x[x1] * inter_3[c1] + x[x2] * inter_3[c2];
- x1--;
- x2++;
- }
-
- return s;
-}
-
-/**
- * Compute y = 1 / sqrt(x)
- *
- * @param x input : value of x
- * @return output: 1/sqrt(x)
- */
-private static float inv_sqrt(
- float x
-)
-{
- return (1.0f / (float)Math.sqrt((double)x) );
-}
-}
diff --git a/src/net/java/sip/communicator/impl/neomedia/codec/audio/g729/PostPro.java b/src/net/java/sip/communicator/impl/neomedia/codec/audio/g729/PostPro.java
deleted file mode 100644
index 5c9c99e1a..000000000
--- a/src/net/java/sip/communicator/impl/neomedia/codec/audio/g729/PostPro.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-/*
- * WARNING: The use of G.729 may require a license fee and/or royalty fee in
- * some countries and is licensed by
- * SIPRO Lab Telecom.
- */
-package net.java.sip.communicator.impl.neomedia.codec.audio.g729;
-
-/**
- * Post-processing of output speech.
- * 2nd order high pass filter with cut off frequency at 100 Hz.
- * Designed with SPPACK efi command -40 dB att, 0.25 ri.
- *
- * Algorithm:
- *
- * y[i] = b[0]*x[i] + b[1]*x[i-1] + b[2]*x[i-2]
- * + a[1]*y[i-1] + a[2]*y[i-2];
- *
- * b[3] = {0.93980581E+00, -0.18795834E+01, 0.93980581E+00};
- * a[3] = {0.10000000E+01, +0.19330735E+01, -0.93589199E+00};
- *
- *
- * @author Lubomir Marinov (translation of ITU-T C source code to Java)
- */
-class PostPro
-{
-
-/* ITU-T G.729 Software Package Release 2 (November 2006) */
-/*
- ITU-T G.729 Annex C - Reference C code for floating point
- implementation of G.729
- Version 1.01 of 15.September.98
-*/
-
-/*
-----------------------------------------------------------------------
- COPYRIGHT NOTICE
-----------------------------------------------------------------------
- ITU-T G.729 Annex C ANSI C source code
- Copyright (C) 1998, AT&T, France Telecom, NTT, University of
- Sherbrooke. All rights reserved.
-
-----------------------------------------------------------------------
-*/
-
-/*
- File : POST_PRO.C
- Used for the floating point version of both
- G.729 main body and G.729A
-*/
-
-/**
- * High-pass fir memory
- */
-private float x0, x1;
-
-/**
- * High-pass iir memory
- */
-private float y1, y2;
-
-/**
- * Init Post Process.
- */
-void init_post_process()
-{
- x0 = x1 = 0.0f;
- y2 = y1 = 0.0f;
-}
-
-/**
- * Post Process
- *
- * @param signal (i/o) : signal
- * @param lg (i) : lenght of signal
- */
-void post_process(
- float signal[],
- int lg
-)
-{
- float[] a100 = TabLd8k.a100;
- float[] b100 = TabLd8k.b100;
-
- int i;
- float x2;
- float y0;
-
- for(i=0; i
- * Short term postfilter :
- * Hst(z) = Hst0(z) Hst1(z)
- * Hst0(z) = 1/g0 A(gamma2)(z) / A(gamma1)(z)
- * if {hi} = i.r. filter A(gamma2)/A(gamma1) (truncated)
- * g0 = SUM(|hi|) if > 1
- * g0 = 1. else
- * Hst1(z) = 1/(1+ |mu|) (1 + mu z-1)
- * with mu = 1st parcor calculated on {hi}
-
- * Long term postfilter :
- * harmonic postfilter : H0(z) = gl * (1 + b * z-p)
- * b = gamma_g * gain_ltp
- * gl = 1 / 1 + b
- * copmuation of delay on A(gamma2)(z) s(z)
- * sub optimal research
- * 1. search best integer delay
- * 2. search around integer sub multiples (3 val. / sub mult)
- * 3. search around integer with fractionnal delays (1/8)
- *
- *
- * @author Lubomir Marinov (translation of ITU-T C source code to Java)
- */
-class Postfil
- extends Ld8k
-{
-
-/* ITU-T G.729 Software Package Release 2 (November 2006) */
-/*
- ITU-T G.729 Annex C - Reference C code for floating point
- implementation of G.729
- Version 1.01 of 15.September.98
-*/
-
-/*
-----------------------------------------------------------------------
- COPYRIGHT NOTICE
-----------------------------------------------------------------------
- ITU-T G.729 Annex C ANSI C source code
- Copyright (C) 1998, AT&T, France Telecom, NTT, University of
- Sherbrooke. All rights reserved.
-
-----------------------------------------------------------------------
-*/
-
-/*
- File : POSTFIL.C
- Used for the floating point version of G.729 main body
- (not for G.729A)
-*/
-
-/* Static arrays and variables */
-/**
- * s.t. numerator coeff.
- */
-private final float[] apond2 = new float[LONG_H_ST];
-
-/**
- * s.t. postfilter memory
- */
-private final float[] mem_stp = new float[M];
-
-/**
- * null memory to compute h_st
- */
-private final float[] mem_zero = new float[M];
-
-/**
- * A(gamma2) residual
- */
-private final float[] res2 = new float[SIZ_RES2];
-
-/* Static pointers */
-private int res2_ptr;
-private float[] ptr_mem_stp;
-private int ptr_mem_stp_offset;
-
-/**
- * for gain adjustment
- */
-private float gain_prec;
-
-/**
- * Initialize postfilter functions
- */
-void init_post_filter()
-{
- int i;
-
- /* Initialize arrays and pointers */
-
- /* A(gamma2) residual */
- for(i=0; i
- * y[i] = b[0]*x[i] + b[1]*x[i-1] + b[2]*x[i-2]
- * + a[1]*y[i-1] + a[2]*y[i-2];
- *
- * b[3] = {0.92727435E+00, -0.18544941E+01, 0.92727435E+00};
- * a[3] = {0.10000000E+01, 0.19059465E+01, -0.91140240E+00};
- *
- *
- * @author Lubomir Marinov (translation of ITU-T C source code to Java)
- */
-class PreProc
-{
-
-/* ITU-T G.729 Software Package Release 2 (November 2006) */
-/*
- ITU-T G.729 Annex C - Reference C code for floating point
- implementation of G.729
- Version 1.01 of 15.September.98
-*/
-
-/*
-----------------------------------------------------------------------
- COPYRIGHT NOTICE
-----------------------------------------------------------------------
- ITU-T G.729 Annex C ANSI C source code
- Copyright (C) 1998, AT&T, France Telecom, NTT, University of
- Sherbrooke. All rights reserved.
-
-----------------------------------------------------------------------
-*/
-
-/*
- File : PRE_PROC.C
- Used for the floating point version of both
- G.729 main body and G.729A
-*/
-
-/**
- * High-pass fir memory
- */
-private float x0, x1;
-
-/**
- * High-pass iir memory
- */
-private float y1, y2;
-
-/**
- * Init Pre Process
- */
-void init_pre_process()
-{
- x0 = x1 = 0.0f;
- y2 = y1 = 0.0f;
-}
-
-/**
- * Pre Process
- *
- * @param signal (i/o) : signal
- * @param signal_offset (input) : signal offset
- * @param lg (i) : length of signal
- */
-void pre_process(
- float[] signal,
- int signal_offset,
- int lg
-)
-{
- float[] a140 = TabLd8k.a140;
- float[] b140 = TabLd8k.b140;
-
- float x2;
- float y0;
-
- for(int i=signal_offset, toIndex=lg+signal_offset; idata in fp
- *
- * @param data
- * @param length
- * @param fp
- * @throws java.io.IOException
- */
-static void fwrite(short[] data, int length, OutputStream fp)
- throws IOException
-{
- byte[] bytes = new byte[2];
-
- for (int i = 0; i < length; i++)
- {
- int value = data[i];
- bytes[0] = (byte) (value & 0xFF);
- bytes[1] = (byte) (value >> 8);
- fp.write(bytes);
- }
-}
-
-/**
- * Read data from fp.
- *
- * @param data
- * @param length
- * @param fp
- * @return length of resulting data array
- * @throws java.io.IOException
- */
-static int fread(short[] data, int length, InputStream fp)
- throws IOException
-{
- byte[] bytes = new byte[2];
- int readLength = 0;
-
- for (int i = 0; i < length; i++)
- {
- if (fp.read(bytes) != 2)
- break;
- data[i] = (short) ((bytes[1] << 8) | (bytes[0] & 0x00FF));
- readLength++;
- }
- return readLength;
-}
-}
diff --git a/src/net/java/sip/communicator/impl/neomedia/codec/audio/gsm/DePacketizer.java b/src/net/java/sip/communicator/impl/neomedia/codec/audio/gsm/DePacketizer.java
deleted file mode 100644
index c56885dfe..000000000
--- a/src/net/java/sip/communicator/impl/neomedia/codec/audio/gsm/DePacketizer.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.impl.neomedia.codec.audio.gsm;
-
-import javax.media.*;
-import javax.media.format.*;
-
-import net.sf.fmj.media.*;
-
-/**
- *
- * DePacketizer for GSM/RTP. Doesn't have to do much, just copies input
- * to output. Uses buffer-swapping observed in debugging
- * and seen in other open-source DePacketizer implementations.
- * @author Martin Harvan
- * @author Damian Minkov
- */
-public class DePacketizer
- extends AbstractDePacketizer
-{
- @Override
- public String getName()
- {
- return "GSM DePacketizer";
- }
-
- /**
- * Constructs a new DePacketizer.
- */
- public DePacketizer()
- {
- super();
- this.inputFormats = new Format[] {
- new AudioFormat(
- AudioFormat.GSM_RTP,
- 8000,
- 8,
- 1,
- Format.NOT_SPECIFIED,
- AudioFormat.SIGNED,
- 264,
- Format.NOT_SPECIFIED,
- Format.byteArray)};
- }
-
- // TODO: move to base class?
- protected Format[] outputFormats = new Format[] {
- new AudioFormat(
- AudioFormat.GSM,
- 8000,
- 8,
- 1,
- -1,
- AudioFormat.SIGNED,
- 264,
- -1.0,
- Format.byteArray)};
-
- @Override
- public Format[] getSupportedOutputFormats(Format input)
- {
- if (input == null)
- return outputFormats;
- else
- {
- if (!(input instanceof AudioFormat))
- {
- return new Format[] {null};
- }
- final AudioFormat inputCast = (AudioFormat) input;
- if (!inputCast.getEncoding().equals(AudioFormat.GSM_RTP))
- {
- return new Format[] {null};
- }
- final AudioFormat result =
- new AudioFormat(
- AudioFormat.GSM,
- inputCast.getSampleRate(),
- inputCast.getSampleSizeInBits(),
- inputCast.getChannels(),
- inputCast.getEndian(),
- inputCast.getSigned(),
- inputCast.getFrameSizeInBits(),
- inputCast.getFrameRate(),
- inputCast.getDataType());
-
- return new Format[] {result};
- }
- }
-
- @Override
- public void open()
- {
- }
-
- @Override
- public void close()
- {
- }
-
- @Override
- public Format setInputFormat(Format f)
- {
- return super.setInputFormat(f);
- }
-
- @Override
- public Format setOutputFormat(Format f)
- {
- return super.setOutputFormat(f);
- }
-
-
-}
diff --git a/src/net/java/sip/communicator/impl/neomedia/codec/audio/gsm/Decoder.java b/src/net/java/sip/communicator/impl/neomedia/codec/audio/gsm/Decoder.java
deleted file mode 100644
index 94090b273..000000000
--- a/src/net/java/sip/communicator/impl/neomedia/codec/audio/gsm/Decoder.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.impl.neomedia.codec.audio.gsm;
-
-import javax.media.*;
-import javax.media.format.*;
-
-import net.sf.fmj.media.*;
-
-/**
- * GSM to PCM java decoder.
- * Decodes GSM frame (33 bytes long) into 160 16-bit PCM samples (320 bytes).
- *
- * @author Martin Harvan
- * @author Damian Minkov
- */
-public class Decoder
- extends AbstractCodec
-{
- private Buffer innerBuffer = new Buffer();
- private static final int PCM_BYTES = 320;
- private static final int GSM_BYTES = 33;
- private int innerDataLength = 0;
-
- byte[] innerContent;
-
- @Override
- public String getName()
- {
- return "GSM Decoder";
- }
-
- /**
- * Constructs a new Decoder.
- */
- public Decoder()
- {
- super();
- this.inputFormats = new Format[]
- {
- new AudioFormat(
- AudioFormat.GSM,
- 8000,
- 8,
- 1,
- Format.NOT_SPECIFIED,
- AudioFormat.SIGNED,
- 264,
- Format.NOT_SPECIFIED,
- Format.byteArray)
- };
- }
-
- // TODO: move to base class?
- protected Format[] outputFormats = new Format[]
- {
- new AudioFormat(
- AudioFormat.LINEAR,
- 8000,
- 16,
- 1,
- Format.NOT_SPECIFIED,
- AudioFormat.SIGNED,
- Format.NOT_SPECIFIED,
- Format.NOT_SPECIFIED,
- Format.byteArray)
- };
-
- @Override
- public Format setOutputFormat(Format format)
- {
- if (!(format instanceof AudioFormat))
- return null;
-
- final AudioFormat audioFormat = (AudioFormat) format;
- return super.setOutputFormat(
- AudioFormatCompleter.complete(audioFormat));
- }
-
- @Override
- public Format[] getSupportedOutputFormats(Format input)
- {
- if (input == null)
- return outputFormats;
- else
- {
- if (!(input instanceof AudioFormat))
- {
- return new Format[]{null};
- }
-
- final AudioFormat inputCast = (AudioFormat) input;
- if (!inputCast.getEncoding().equals(AudioFormat.GSM)
- || (inputCast.getSampleSizeInBits() != 8
- && inputCast.getSampleSizeInBits() != Format.NOT_SPECIFIED)
- || (inputCast.getChannels() != 1
- && inputCast.getChannels() != Format.NOT_SPECIFIED)
- || (inputCast.getSigned() != AudioFormat.SIGNED
- && inputCast.getSigned() != Format.NOT_SPECIFIED)
- || (inputCast.getFrameSizeInBits() != 264
- && inputCast.getFrameSizeInBits() != Format.NOT_SPECIFIED)
- || (inputCast.getDataType() != null
- && inputCast.getDataType() != Format.byteArray))
- {
- return new Format[] {null};
- }
-
- final AudioFormat result = new AudioFormat(
- AudioFormat.LINEAR,
- inputCast.getSampleRate(),
- 16,
- 1,
- inputCast.getEndian(),
- AudioFormat.SIGNED,
- 16,
- Format.NOT_SPECIFIED,
- Format.byteArray);
-
- return new Format[]{result};
- }
- }
-
- @Override
- public void open()
- {
-
- }
-
- @Override
- public void close()
- {
-
- }
-
- private static final boolean TRACE = false;
-
- @Override
- public int process(Buffer inputBuffer, Buffer outputBuffer)
- {
- byte [] inputContent=new byte[inputBuffer.getLength()];
-
- System.arraycopy(
- inputBuffer.getData(),
- inputBuffer.getOffset(),
- inputContent,
- 0,
- inputContent.length);
-
-
- byte[] mergedContent =
- mergeArrays((byte[]) innerBuffer.getData(), inputContent);
- innerBuffer.setData(mergedContent);
- innerBuffer.setLength(mergedContent.length);
- innerDataLength = innerBuffer.getLength();
-
- if (TRACE) dump("input ", inputBuffer);
-
- if (!checkInputBuffer(inputBuffer))
- {
- return BUFFER_PROCESSED_FAILED;
- }
-
- if (isEOM(inputBuffer))
- {
- propagateEOM(outputBuffer);
- return BUFFER_PROCESSED_OK;
- }
-
- if (TRACE) dump("input ", inputBuffer);
-
- if (!checkInputBuffer(inputBuffer))
- {
- return BUFFER_PROCESSED_FAILED;
- }
-
- if (isEOM(inputBuffer)) {
- propagateEOM(outputBuffer);
- return BUFFER_PROCESSED_OK;
- }
-
- final int result;
- byte[] outputBufferData = (byte[]) outputBuffer.getData();
-
- if (outputBufferData == null
- || outputBufferData.length <
- PCM_BYTES * innerBuffer.getLength() / GSM_BYTES)
- {
- outputBufferData = new byte[
- PCM_BYTES * (innerBuffer.getLength() / GSM_BYTES)];
- outputBuffer.setData(outputBufferData);
- }
-
- if (innerBuffer.getLength() < GSM_BYTES)
- {
- result = OUTPUT_BUFFER_NOT_FILLED;
- } else
- {
- final boolean bigEndian =
- ((AudioFormat) outputFormat).getEndian()
- == AudioFormat.BIG_ENDIAN;
-
- outputBufferData = new byte[
- PCM_BYTES * (innerBuffer.getLength() / GSM_BYTES)];
- outputBuffer.setData(outputBufferData);
- outputBuffer.setLength(
- PCM_BYTES * (innerBuffer.getLength() / GSM_BYTES));
-
- GSMDecoderUtil.gsmDecode(
- bigEndian,
- (byte[]) innerBuffer.getData(),
- inputBuffer.getOffset(),
- innerBuffer.getLength(),
- outputBufferData);
-
- outputBuffer.setFormat(outputFormat);
- result = BUFFER_PROCESSED_OK;
- byte[] temp = new byte[
- innerDataLength - (innerDataLength / GSM_BYTES) * GSM_BYTES];
- innerContent = (byte[]) innerBuffer.getData();
- System.arraycopy(
- innerContent,
- (innerDataLength / GSM_BYTES) * GSM_BYTES,
- temp,
- 0,
- temp.length);
- outputBuffer.setOffset(0);
-
- innerBuffer.setLength(temp.length);
- innerBuffer.setData(temp);
- }
-
- if (TRACE)
- {
- dump("input ", inputBuffer);
- dump("output", outputBuffer);
- }
- return result;
- }
-
- private byte[] mergeArrays(byte[] arr1, byte[] arr2)
- {
- if (arr1 == null) return arr2;
- if (arr2 == null) return arr1;
- byte[] merged = new byte[arr1.length + arr2.length];
- System.arraycopy(arr1, 0, merged, 0, arr1.length);
- System.arraycopy(arr2, 0, merged, arr1.length, arr2.length);
- return merged;
- }
-
- @Override
- public Format setInputFormat(Format arg0)
- {
- // TODO: force sample size, etc
- return super.setInputFormat(arg0);
- }
-}
diff --git a/src/net/java/sip/communicator/impl/neomedia/codec/audio/gsm/Encoder.java b/src/net/java/sip/communicator/impl/neomedia/codec/audio/gsm/Encoder.java
deleted file mode 100644
index fff44b246..000000000
--- a/src/net/java/sip/communicator/impl/neomedia/codec/audio/gsm/Encoder.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.impl.neomedia.codec.audio.gsm;
-
-import net.sf.fmj.media.*;
-
-import javax.media.*;
-import javax.media.Format;
-import javax.media.format.*;
-
-/**
- * GSM encoder Codec. Encodes 160 16-bit PCM samples into array of
- * 33 bytes (GSM frame).
- *
- * @author Martin Harvan
- * @author Damian Minkov
- */
-public class Encoder
- extends AbstractCodec
-{
- private Buffer innerBuffer = new Buffer();
- private static final int PCM_BYTES = 320;
- private static final int GSM_BYTES = 33;
- private int innerDataLength = 0;
- byte[] innerContent;
-
- @Override
- public String getName()
- {
- return "GSM Encoder";
- }
-
- /**
- * Constructs a new Encoder.
- */
- public Encoder()
- {
- super();
- this.inputFormats = new Format[]{
- new AudioFormat(
- AudioFormat.LINEAR,
- 8000,
- 16,
- 1,
- AudioFormat.BIG_ENDIAN,
- AudioFormat.SIGNED,
- Format.NOT_SPECIFIED,
- Format.NOT_SPECIFIED,
- Format.byteArray)
- };
-
- }
-
- // TODO: move to base class?
- protected Format[] outputFormats = new Format[]{
- new AudioFormat(
- AudioFormat.GSM,
- 8000,
- 8,
- 1,
- Format.NOT_SPECIFIED,
- AudioFormat.SIGNED,
- 264,
- Format.NOT_SPECIFIED,
- Format.byteArray)};
-
- @Override
- public Format[] getSupportedOutputFormats(Format input)
- {
- if (input == null)
- {
- return outputFormats;
- } else
- {
- if (!(input instanceof AudioFormat))
- {
- return new Format[]{null};
- }
- final AudioFormat inputCast = (AudioFormat) input;
- final AudioFormat result = new AudioFormat(
- AudioFormat.GSM,
- inputCast.getSampleRate(),
- 8,
- 1,
- inputCast.getEndian(),
- AudioFormat.SIGNED,
- 264,
- inputCast.getFrameRate(),
- Format.byteArray);
-
- return new Format[]{result};
- }
- }
-
- @Override
- public void open()
- {
- }
-
- @Override
- public void close()
- {
- }
-
- private static final boolean TRACE = false;
-
- @Override
- public int process(Buffer inputBuffer, Buffer outputBuffer)
- {
- byte [] inputContent=new byte[inputBuffer.getLength()];
-
- System.arraycopy(
- inputBuffer.getData(),
- inputBuffer.getOffset(),
- inputContent,
- 0,
- inputContent.length);
-
- byte[] mergedContent = mergeArrays(
- (byte[]) innerBuffer.getData(), inputContent);
- innerBuffer.setData(mergedContent);
- innerBuffer.setLength(mergedContent.length);
- innerDataLength = innerBuffer.getLength();
-
- if (TRACE) dump("input ", inputBuffer);
-
- if (!checkInputBuffer(inputBuffer))
- {
- return BUFFER_PROCESSED_FAILED;
- }
-
- if (isEOM(inputBuffer))
- {
- propagateEOM(outputBuffer);
- return BUFFER_PROCESSED_OK;
- }
-
- final int result;
- byte[] outputBufferData = (byte[]) outputBuffer.getData();
-
- if (outputBufferData == null
- || outputBufferData.length <
- GSM_BYTES * innerDataLength / PCM_BYTES)
- {
- outputBufferData = new byte[
- GSM_BYTES * (innerDataLength / PCM_BYTES)];
- outputBuffer.setData(outputBufferData);
- }
-
- if (innerDataLength < PCM_BYTES)
- {
- result = OUTPUT_BUFFER_NOT_FILLED;
- System.out.println("Not filled");
- } else
- {
- final boolean bigEndian = ((AudioFormat) outputFormat).getEndian()
- == AudioFormat.BIG_ENDIAN;
-
- outputBufferData = new byte[
- GSM_BYTES * (innerDataLength / PCM_BYTES)];
- outputBuffer.setData(outputBufferData);
- outputBuffer.setLength(GSM_BYTES * (innerDataLength / PCM_BYTES));
-
- GSMEncoderUtil.gsmEncode(
- bigEndian,
- (byte[])innerBuffer.getData(),
- innerBuffer.getOffset(),
- innerDataLength,
- outputBufferData);
-
- outputBuffer.setFormat(outputFormat);
- outputBuffer.setData(outputBufferData);
- result = BUFFER_PROCESSED_OK;
- byte[] temp = new byte[
- innerDataLength - (innerDataLength / PCM_BYTES) * PCM_BYTES];
- innerContent = (byte[]) innerBuffer.getData();
- System.arraycopy(
- innerContent,
- (innerDataLength / PCM_BYTES) * PCM_BYTES,
- temp,
- 0,
- temp.length);
-
- outputBuffer.setOffset(0);
- innerBuffer.setLength(temp.length);
- innerBuffer.setData(temp);
- }
-
- if (TRACE)
- {
- dump("input ", inputBuffer);
- dump("output", outputBuffer);
- }
- return result;
- }
-
- private byte[] mergeArrays(byte[] arr1, byte[] arr2)
- {
- if (arr1 == null) return arr2;
- if (arr2 == null) return arr1;
- byte[] merged = new byte[arr1.length + arr2.length];
- System.arraycopy(arr1, 0, merged, 0, arr1.length);
- System.arraycopy(arr2, 0, merged, arr1.length, arr2.length);
- return merged;
- }
-
-
- @Override
- public Format setInputFormat(Format f)
- {
- //TODO: force sample size, etc
- return super.setInputFormat(f);
- }
-
- @Override
- public Format setOutputFormat(Format f)
- {
- return super.setOutputFormat(f);
- }
-}
diff --git a/src/net/java/sip/communicator/impl/neomedia/codec/audio/gsm/GSMDecoderUtil.java b/src/net/java/sip/communicator/impl/neomedia/codec/audio/gsm/GSMDecoderUtil.java
deleted file mode 100644
index 56eb32f0b..000000000
--- a/src/net/java/sip/communicator/impl/neomedia/codec/audio/gsm/GSMDecoderUtil.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.impl.neomedia.codec.audio.gsm;
-
-import org.rubycoder.gsm.*;
-
-
-/**
- * GSMDecoderUtil class
- *
- * @author Martin Harvan
- * @author Damian Minkov
- */
-public class GSMDecoderUtil
-{
- private static GSMDecoder decoder = new GSMDecoder();
- private static final int GSM_BYTES = 33;
- private static final int PCM_INTS = 160;
- private static final int PCM_BYTES = 320;
-
- /**
- * Decode GSM data.
- *
- * @param bigEndian if the data are in big endian format
- * @param data the GSM data
- * @param offset offset
- * @param length length of the data
- * @param decoded decoded data array
- */
- public static void gsmDecode(boolean bigEndian,
- byte[] data,
- int offset,
- int length,
- byte[] decoded)
- {
- for (int i = 0; i < length / GSM_BYTES; i++)
- {
- int[] output = new int[PCM_INTS];
- byte[] input = new byte[GSM_BYTES];
- System.arraycopy(data, i * GSM_BYTES, input, 0, GSM_BYTES);
- try
- {
- decoder.decode(input, output);
- } catch (InvalidGSMFrameException e)
- {
- e.printStackTrace();
- }
- for (int j = 0; j < PCM_INTS; j++)
- {
- int index = j << 1;
- if (bigEndian)
- {
- decoded[index + i * PCM_BYTES]
- = (byte) ((output[j] & 0xff00) >> 8);
- decoded[++index + (i * PCM_BYTES)]
- = (byte) ((output[j] & 0x00ff));
- } else
- {
- decoded[index + i * PCM_BYTES]
- = (byte) ((output[j] & 0x00ff));
- decoded[++index + (i * PCM_BYTES)]
- = (byte) ((output[j] & 0xff00) >> 8);
- }
- }
- }
- }
-}
diff --git a/src/net/java/sip/communicator/impl/neomedia/codec/audio/gsm/GSMEncoderUtil.java b/src/net/java/sip/communicator/impl/neomedia/codec/audio/gsm/GSMEncoderUtil.java
deleted file mode 100644
index 701094602..000000000
--- a/src/net/java/sip/communicator/impl/neomedia/codec/audio/gsm/GSMEncoderUtil.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.impl.neomedia.codec.audio.gsm;
-
-import org.rubycoder.gsm.*;
-
-/**
- * GSMEncoderUtil class
- *
- * @author Martin Harvan
- * @author Damian Minkov
- */
-public class GSMEncoderUtil {
-
- private static GSMEncoder encoder = new GSMEncoder();
- /**
- * number of bytes in GSM frame
- */
- private static final int GSM_BYTES = 33;
-
- /**
- * number of PCM bytes needed to encode
- */
- private static final int PCM_BYTES = 320;
-
- /**
- * number of PCM ints needed to encode
- */
- private static final int PCM_INTS = 160;
-
- /**
- * Encode data to GSM.
- *
- * @param bigEndian if the data is in big endian format
- * @param data data to encode
- * @param offset offset
- * @param length length of data
- * @param decoded array of encoded data.
- */
- public static void gsmEncode(
- boolean bigEndian,
- byte[] data,
- int offset,
- int length,
- byte[] decoded)
- {
- for (int i = offset; i < length / PCM_BYTES; i++)
- {
- int[] input = new int[PCM_INTS];
- byte[] output = new byte[GSM_BYTES];
-
- for (int j = 0; j < PCM_INTS; j++) {
- int index = j << 1;
-
- input[j] = data[i * PCM_BYTES + index++];
-
- input[j] <<= 8;
- input[j] |= data[i * PCM_BYTES + index++] & 0xFF;
- }
- encoder.encode(output, input);
- System.arraycopy(output, 0, decoded, i * GSM_BYTES, GSM_BYTES);
- }
- }
-}
diff --git a/src/net/java/sip/communicator/impl/neomedia/codec/audio/gsm/Packetizer.java b/src/net/java/sip/communicator/impl/neomedia/codec/audio/gsm/Packetizer.java
deleted file mode 100644
index 5e34d4b47..000000000
--- a/src/net/java/sip/communicator/impl/neomedia/codec/audio/gsm/Packetizer.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.impl.neomedia.codec.audio.gsm;
-
-import javax.media.*;
-import javax.media.format.*;
-
-import net.sf.fmj.media.*;
-
-/**
- * GSM/RTP packetizer Codec.
- *
- * @author Martin Harvan
- * @author Damian Minkov
- */
-public class Packetizer
- extends AbstractPacketizer
-{
- private static final int PACKET_SIZE = 33;
-
- @Override
- public String getName()
- {
- return "GSM Packetizer";
- }
-
- /**
- * Constructs a new Packetizer.
- */
- public Packetizer()
- {
- super();
- this.inputFormats = new Format[]{
- new AudioFormat(
- AudioFormat.GSM,
- 8000,
- 8,
- 1,
- Format.NOT_SPECIFIED,
- AudioFormat.SIGNED,
- 264,
- Format.NOT_SPECIFIED,
- Format.byteArray)};
- }
-
- // TODO: move to base class?
- protected Format[] outputFormats = new Format[]{
- new AudioFormat(
- AudioFormat.GSM_RTP,
- 8000,
- 8,
- 1,
- Format.NOT_SPECIFIED,
- AudioFormat.SIGNED,
- 264,
- Format.NOT_SPECIFIED,
- Format.byteArray)};
-
- @Override
- public Format[] getSupportedOutputFormats(Format input)
- {
- if (input == null)
- return outputFormats;
- else
- {
- if (!(input instanceof AudioFormat))
- {
- return new Format[]{null};
- }
- final AudioFormat inputCast = (AudioFormat) input;
- if (!inputCast.getEncoding().equals(AudioFormat.GSM)
- || (inputCast.getSampleSizeInBits() != 8
- && inputCast.getSampleSizeInBits() != Format.NOT_SPECIFIED)
- || (inputCast.getChannels() != 1
- && inputCast.getChannels() != Format.NOT_SPECIFIED)
- || (inputCast.getFrameSizeInBits() != 264
- && inputCast.getFrameSizeInBits() != Format.NOT_SPECIFIED)
- )
- {
- return new Format[]{null};
- }
- final AudioFormat result =
- new AudioFormat(
- AudioFormat.GSM_RTP,
- inputCast.getSampleRate(),
- 8,
- 1,
- inputCast.getEndian(),
- inputCast.getSigned(),
- 264,
- inputCast.getFrameRate(),
- inputCast.getDataType());
-
- return new Format[]{result};
- }
- }
-
- @Override
- public void open()
- {
- setPacketSize(PACKET_SIZE);
- }
-
- @Override
- public void close()
- {
- }
-
- @Override
- public Format setInputFormat(Format f)
- {
- return super.setInputFormat(f);
- }
-
- @Override
- public Format setOutputFormat(Format f)
- {
- return super.setOutputFormat(f);
- }
-}
diff --git a/src/net/java/sip/communicator/impl/neomedia/codec/audio/ilbc/JavaDecoder.java b/src/net/java/sip/communicator/impl/neomedia/codec/audio/ilbc/JavaDecoder.java
deleted file mode 100644
index 1943b9c8c..000000000
--- a/src/net/java/sip/communicator/impl/neomedia/codec/audio/ilbc/JavaDecoder.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.impl.neomedia.codec.audio.ilbc;
-
-import java.util.*;
-
-import javax.media.*;
-import javax.media.format.*;
-
-import net.java.sip.communicator.impl.neomedia.codec.*;
-
-/**
- * Implements an iLBC decoder and RTP depacketizer as a {@link Codec}.
- *
- * @author Damian Minkov
- * @author Lyubomir Marinov
- */
-public class JavaDecoder
- extends AbstractCodecExt
-{
-
- /**
- * The ilbc_decoder adapted to Codec by this instance.
- */
- private ilbc_decoder dec;
-
- /**
- * The input length in bytes with which {@link #dec} has been initialized.
- */
- private int inputLength;
-
- /**
- * List of offsets for a "more than one" iLBC frame per RTP packet.
- */
- private List