From 9705865983cea6fda585c5c795174fd9e41bfee8 Mon Sep 17 00:00:00 2001 From: Damian Minkov Date: Fri, 18 Dec 2009 16:31:12 +0000 Subject: [PATCH] Stop building media bundler. Remove media bundle from starting in client and in tests. Comment all code that access media service in jabber protocol. --- build.xml | 2 +- lib/felix.client.run.properties | 1 - lib/felix.unit.test.properties | 3 +- ...icator_impl_neomedia_portaudio_PortAudio.h | 6 ++ .../impl/protocol/jabber/CallJabberImpl.java | 20 ++--- .../impl/protocol/jabber/JabberActivator.java | 34 ++++----- .../ProtocolProviderServiceJabberImpl.java | 36 ++++----- .../jabber/jabber.provider.manifest.mf | 2 - .../jabber/mediamgr/AudioMediaSession.java | 74 +++++++++---------- .../jabber/mediamgr/JingleScMediaManager.java | 24 +++--- .../protocol/OperationSetVideoTelephony.java | 4 +- 11 files changed, 103 insertions(+), 103 deletions(-) diff --git a/build.xml b/build.xml index 6d48bb20a..3282d9369 100644 --- a/build.xml +++ b/build.xml @@ -807,7 +807,7 @@ bundle-callhistory, bundle-callhistory-slick, bundle-popupmessagehandler-slick, bundle-netaddr,bundle-netaddr-slick,bundle-slickless, bundle-slick-runner,bundle-sip,bundle-sip-slick,bundle-fileaccess, - bundle-fileaccess-slick,bundle-media,bundle-neomedia,bundle-media-slick, + bundle-fileaccess-slick,bundle-neomedia, bundle-resource-manager,bundle-resources-defaultpack, bundle-protocol,bundle-icq,bundle-icq-slick,bundle-mock,bundle-smacklib, bundle-jabber,bundle-jabber-slick,bundle-swing-ui,bundle-ui-service, diff --git a/lib/felix.client.run.properties b/lib/felix.client.run.properties index 4ce0a0082..d345ffb24 100644 --- a/lib/felix.client.run.properties +++ b/lib/felix.client.run.properties @@ -104,7 +104,6 @@ felix.auto.start.50= \ reference:file:sc-bundles/contactlist.jar felix.auto.start.52= \ - reference:file:sc-bundles/media.jar \ reference:file:sc-bundles/neomedia.jar \ reference:file:sc-bundles/protocol-icq.jar \ reference:file:sc-bundles/protocol-sip.jar \ diff --git a/lib/felix.unit.test.properties b/lib/felix.unit.test.properties index 1a834e230..8800cd3f4 100644 --- a/lib/felix.unit.test.properties +++ b/lib/felix.unit.test.properties @@ -106,7 +106,7 @@ felix.auto.start.6= \ reference:file:sc-bundles/protocol-icq.jar \ reference:file:sc-bundles/smacklib.jar \ reference:file:sc-bundles/protocol-rss.jar \ - reference:file:sc-bundles/media.jar \ + reference:file:sc-bundles/neomedia.jar \ reference:file:sc-bundles/protocol-jabber.jar \ reference:file:sc-bundles/protocol-msn.jar \ reference:file:sc-bundles/protocol-sip.jar \ @@ -125,7 +125,6 @@ felix.auto.start.6= \ felix.auto.start.7= \ reference:file:sc-bundles/slickless.jar \ reference:file:sc-bundles/configuration-slick.jar \ - reference:file:sc-bundles/media-slick.jar \ reference:file:sc-bundles/netaddr-slick.jar \ reference:file:sc-bundles/fileaccess-slick.jar \ reference:file:sc-bundles/history-slick.jar \ diff --git a/src/native/portaudio/net_java_sip_communicator_impl_neomedia_portaudio_PortAudio.h b/src/native/portaudio/net_java_sip_communicator_impl_neomedia_portaudio_PortAudio.h index 1847fbb0a..662b360a7 100644 --- a/src/native/portaudio/net_java_sip_communicator_impl_neomedia_portaudio_PortAudio.h +++ b/src/native/portaudio/net_java_sip_communicator_impl_neomedia_portaudio_PortAudio.h @@ -7,6 +7,12 @@ #ifdef __cplusplus extern "C" { #endif +#undef net_java_sip_communicator_impl_neomedia_portaudio_PortAudio_LATENCY_UNSPECIFIED +#define net_java_sip_communicator_impl_neomedia_portaudio_PortAudio_LATENCY_UNSPECIFIED 0.0 +#undef net_java_sip_communicator_impl_neomedia_portaudio_PortAudio_LATENCY_HIGH +#define net_java_sip_communicator_impl_neomedia_portaudio_PortAudio_LATENCY_HIGH -1.0 +#undef net_java_sip_communicator_impl_neomedia_portaudio_PortAudio_LATENCY_LOW +#define net_java_sip_communicator_impl_neomedia_portaudio_PortAudio_LATENCY_LOW -2.0 /* * Class: net_java_sip_communicator_impl_neomedia_portaudio_PortAudio * Method: setEchoCancelParams diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/CallJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/CallJabberImpl.java index f634d2ef4..94ef0e501 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/CallJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/CallJabberImpl.java @@ -8,7 +8,7 @@ import java.util.*; -import net.java.sip.communicator.service.media.*; +//import net.java.sip.communicator.service.media.*; import net.java.sip.communicator.service.protocol.*; import net.java.sip.communicator.service.protocol.event.*; import net.java.sip.communicator.util.*; @@ -40,7 +40,7 @@ public class CallJabberImpl * The CallSession that the media service has created for this * call. */ - private CallSession mediaCallSession = null; +// private CallSession mediaCallSession = null; /** * Crates a CallJabberImpl instance belonging to sourceProvider and @@ -238,10 +238,10 @@ public CallPeerJabberImpl findCallPeer(JingleSession session) * @param callSession the CallSession that the media service has * created for this call. */ - public void setMediaCallSession(CallSession callSession) - { - this.mediaCallSession = callSession; - } +// public void setMediaCallSession(CallSession callSession) +// { +// this.mediaCallSession = callSession; +// } /** * Sets the CallSession that the media service has created for this @@ -251,10 +251,10 @@ public void setMediaCallSession(CallSession callSession) * created for this call or null if no call session has been created so * far. */ - public CallSession getMediaCallSession() - { - return this.mediaCallSession; - } +// public CallSession getMediaCallSession() +// { +// return this.mediaCallSession; +// } /** * Gets the indicator which determines whether the local peer represented by diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/JabberActivator.java b/src/net/java/sip/communicator/impl/protocol/jabber/JabberActivator.java index cf3babb9a..21f8bb1e5 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/JabberActivator.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/JabberActivator.java @@ -10,7 +10,7 @@ import net.java.sip.communicator.service.configuration.*; import net.java.sip.communicator.service.gui.*; -import net.java.sip.communicator.service.media.*; +//import net.java.sip.communicator.service.media.*; import net.java.sip.communicator.service.protocol.*; import net.java.sip.communicator.service.resources.*; @@ -45,7 +45,7 @@ public class JabberActivator /** * Media service. */ - private static MediaService mediaService = null; +// private static MediaService mediaService = null; /** * The Jabber protocol provider factory. @@ -150,21 +150,21 @@ static ProtocolProviderFactoryJabberImpl getProtocolProviderFactory() * @return a reference to a MediaService implementation currently registered * in the bundle context or null if no such implementation was found. */ - public static MediaService getMediaService() - { - if(mediaService == null) - { - ServiceReference mediaServiceReference - = bundleContext.getServiceReference( - MediaService.class.getName()); - - if (mediaServiceReference != null) { - mediaService = (MediaService) - bundleContext.getService(mediaServiceReference); - } - } - return mediaService; - } +// public static MediaService getMediaService() +// { +// if(mediaService == null) +// { +// ServiceReference mediaServiceReference +// = bundleContext.getServiceReference( +// MediaService.class.getName()); +// +// if (mediaServiceReference != null) { +// mediaService = (MediaService) +// bundleContext.getService(mediaServiceReference); +// } +// } +// return mediaService; +// } /** * Called when this bundle is stopped so the Framework can perform the diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java index ae6b2fe37..558c04b74 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java @@ -665,24 +665,24 @@ protected void initialize(String screenname, //check if we are supposed to start telephony //initialize the telephony opset - boolean enableJingle - = JabberActivator - .getConfigurationService() - .getBoolean(PNAME_ENABLE_JINGLE, false); - if(enableJingle && JabberActivator.getMediaService() != null) - { - addSupportedOperationSet( - OperationSetBasicTelephony.class, - new OperationSetBasicTelephonyJabberImpl(this)); - - // Add Jingle features to supported features. - supportedFeatures.add("urn:xmpp:jingle:1"); - supportedFeatures.add("urn:xmpp:jingle:apps:rtp:1"); - supportedFeatures.add("urn:xmpp:jingle:apps:rtp:audio"); - - //one day: - //supportedFeatures.add("urn:xmpp:jingle:apps:rtp:video"); - } +// boolean enableJingle +// = JabberActivator +// .getConfigurationService() +// .getBoolean(PNAME_ENABLE_JINGLE, false); +// if(enableJingle && JabberActivator.getMediaService() != null) +// { +// addSupportedOperationSet( +// OperationSetBasicTelephony.class, +// new OperationSetBasicTelephonyJabberImpl(this)); +// +// // Add Jingle features to supported features. +// supportedFeatures.add("urn:xmpp:jingle:1"); +// supportedFeatures.add("urn:xmpp:jingle:apps:rtp:1"); +// supportedFeatures.add("urn:xmpp:jingle:apps:rtp:audio"); +// +// //one day: +// //supportedFeatures.add("urn:xmpp:jingle:apps:rtp:video"); +// } isInitialized = true; } diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/jabber.provider.manifest.mf b/src/net/java/sip/communicator/impl/protocol/jabber/jabber.provider.manifest.mf index 4faeb4338..6c0b831d9 100755 --- a/src/net/java/sip/communicator/impl/protocol/jabber/jabber.provider.manifest.mf +++ b/src/net/java/sip/communicator/impl/protocol/jabber/jabber.provider.manifest.mf @@ -31,8 +31,6 @@ Import-Package: org.osgi.framework, net.java.sip.communicator.service.protocol.whiteboardobjects, net.java.sip.communicator.service.argdelegation, net.java.sip.communicator.service.gui, - net.java.sip.communicator.service.media, - net.java.sip.communicator.service.media.event, org.xmlpull.v1, org.xmlpull.mxp1, javax.xml.parsers, diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/mediamgr/AudioMediaSession.java b/src/net/java/sip/communicator/impl/protocol/jabber/mediamgr/AudioMediaSession.java index d65dbfe9c..6e423095c 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/mediamgr/AudioMediaSession.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/mediamgr/AudioMediaSession.java @@ -9,8 +9,8 @@ import java.util.*; import net.java.sip.communicator.impl.protocol.jabber.*; -import net.java.sip.communicator.service.media.*; -import net.java.sip.communicator.service.media.event.*; +//import net.java.sip.communicator.service.media.*; +//import net.java.sip.communicator.service.media.event.*; import net.java.sip.communicator.util.*; import org.jivesoftware.smackx.jingle.*; @@ -27,7 +27,7 @@ */ public class AudioMediaSession extends JingleMediaSession - implements MediaListener +// implements MediaListener { /** * the logger used by this class @@ -38,7 +38,7 @@ public class AudioMediaSession /** * An audio media session encapsulate a RtpFlow which handle media transfer */ - private RtpFlow rtpFlow = null; +// private RtpFlow rtpFlow = null; /** * Creates an AudioMediaSession with defined payload type, @@ -111,25 +111,25 @@ public void initialize() Map> mediaEncoding = MediaUtils.getAudioEncoding(getPayloadType().getId()); - try - { - rtpFlow = JabberActivator.getMediaService(). - createRtpFlow( - localIp, localPort, - remoteIp, remotePort, - mediaEncoding); - } - catch (MediaException ex) - { - logger.error("failed to create a RtpFlow between " + - localIp + ":" + localPort + " and " + - remoteIp + ":" + remotePort, ex); - rtpFlow = null; - throw new RuntimeException("failed to create a RtpFlow between " - + localIp + ":" + localPort + " and " - + remoteIp + ":" + remotePort, - ex); - } +// try +// { +// rtpFlow = JabberActivator.getMediaService(). +// createRtpFlow( +// localIp, localPort, +// remoteIp, remotePort, +// mediaEncoding); +// } +// catch (MediaException ex) +// { +// logger.error("failed to create a RtpFlow between " + +// localIp + ":" + localPort + " and " + +// remoteIp + ":" + remotePort, ex); +// rtpFlow = null; +// throw new RuntimeException("failed to create a RtpFlow between " +// + localIp + ":" + localPort + " and " +// + remoteIp + ":" + remotePort, +// ex); +// } } /** @@ -137,7 +137,7 @@ public void initialize() */ public void startTrasmit() { - rtpFlow.start(); +// rtpFlow.start(); } /** @@ -153,10 +153,10 @@ public void startReceive() */ public void setTrasmit(boolean active) { - if (active) - rtpFlow.resume(); - else - rtpFlow.pause(); +// if (active) +// rtpFlow.resume(); +// else +// rtpFlow.pause(); } /** @@ -165,7 +165,7 @@ public void setTrasmit(boolean active) public void stopTrasmit() { //if (rtpFlow != null) - rtpFlow.stop(); +// rtpFlow.stop(); } /** @@ -220,12 +220,12 @@ public void stopReceive() * Implementation of receivedMediaStream from * RtpFlow. */ - public void receivedMediaStream(MediaEvent evt) - { - mediaReceived(evt.getFrom()); - } - - public void mediaServiceStatusChanged() - { - } +// public void receivedMediaStream(MediaEvent evt) +// { +// mediaReceived(evt.getFrom()); +// } +// +// public void mediaServiceStatusChanged() +// { +// } } diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/mediamgr/JingleScMediaManager.java b/src/net/java/sip/communicator/impl/protocol/jabber/mediamgr/JingleScMediaManager.java index a362743c9..2dcd5ba31 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/mediamgr/JingleScMediaManager.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/mediamgr/JingleScMediaManager.java @@ -77,19 +77,19 @@ private void setupPayloads() * situations i.e. in most of the cases the allocation will immediately * be thrown away as garbage. Checking for null is faster. */ - String[] audioEnc; + String[] audioEnc = null; - try - { - audioEnc = JabberActivator.getMediaService(). - getSupportedAudioEncodings(); - } - catch (Exception e) - { - audioEnc = null; - - logger.warn("Cannot get Audio encodings!", e); - } +// try +// { +// audioEnc = JabberActivator.getMediaService(). +// getSupportedAudioEncodings(); +// } +// catch (Exception e) +// { +// audioEnc = null; +// +// logger.warn("Cannot get Audio encodings!", e); +// } if (audioEnc != null) { diff --git a/src/net/java/sip/communicator/service/protocol/OperationSetVideoTelephony.java b/src/net/java/sip/communicator/service/protocol/OperationSetVideoTelephony.java index 528f6507f..6c7a4443c 100644 --- a/src/net/java/sip/communicator/service/protocol/OperationSetVideoTelephony.java +++ b/src/net/java/sip/communicator/service/protocol/OperationSetVideoTelephony.java @@ -8,7 +8,6 @@ import java.awt.*; -import net.java.sip.communicator.service.media.*; import net.java.sip.communicator.service.protocol.event.*; import net.java.sip.communicator.util.*; @@ -136,8 +135,7 @@ public void setLocalVideoAllowed(Call call, boolean allowed) * The property which indicates whether a specific Call is * currently streaming the local video (to a remote destination). */ - public static final String LOCAL_VIDEO_STREAMING - = CallSession.LOCAL_VIDEO_STREAMING; + public static final String LOCAL_VIDEO_STREAMING = "LOCAL_VIDEO_STREAMING"; /** * Gets the indicator which determines whether a specific Call