[asterisk-scf-commits] asterisk-scf/release/media_rtp_pjmedia.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Mon Sep 19 14:38:40 CDT 2011


branch "master" has been updated
       via  e8bce571fe3f100190ecdb614af33aba32baa504 (commit)
      from  34d0513bcbe9db15aed100eb38635f7d7de7eb20 (commit)

Summary of changes:
 .../{test_component.config => test_component.conf} |   80 +++++++++----------
 ..._component_v6.config => test_component_v6.conf} |   80 +++++++++----------
 config/test_media_rtp_pjmedia.conf                 |   17 ----
 config/{test_rtp_ice.config => test_rtp_ice.conf}  |    0
 src/Component.cpp                                  |    5 +-
 src/RtpStateReplicatorApp.cpp                      |   13 ++--
 test/CMakeLists.txt                                |    6 +-
 7 files changed, 89 insertions(+), 112 deletions(-)
 rename config/{test_component.config => test_component.conf} (65%)
 rename config/{test_component_v6.config => test_component_v6.conf} (65%)
 delete mode 100644 config/test_media_rtp_pjmedia.conf
 rename config/{test_rtp_ice.config => test_rtp_ice.conf} (100%)


- Log -----------------------------------------------------------------
commit e8bce571fe3f100190ecdb614af33aba32baa504
Author: Joshua Colp <jcolp at digium.com>
Date:   Mon Sep 19 16:44:51 2011 -0300

    Make the rtp media service component conform to the configuration file in the examples repo.

diff --git a/config/test_component.config b/config/test_component.conf
similarity index 65%
rename from config/test_component.config
rename to config/test_component.conf
index d507786..b0c6d4f 100644
--- a/config/test_component.config
+++ b/config/test_component.conf
@@ -5,70 +5,66 @@
 #
 
 IceBox.InheritProperties=1
-IceBox.LoadOrder=ServiceDiscovery,RtpStateReplicator,MediaRTPpjmedia,MediaRTPpjmediaTest
+IceBox.LoadOrder=ServiceDiscovery,RtpStateReplicator,MediaServiceRTP,MediaRTPpjmediaTest
 
 Ice.Override.Timeout=5000
 
+#
+# Service Locator Configuration
+#
+
+IceBox.Service.ServiceDiscovery=service_locator:create
+
+AsteriskSCFIceStorm.InstanceName=AsteriskSCFIceStorm
+AsteriskSCFIceStorm.TopicManager.Endpoints=tcp -p 4421
+AsteriskSCFIceStorm.Publish.Endpoints=tcp -p 4423
+AsteriskSCFIceStorm.Trace.TopicManager=2
+AsteriskSCFIceStorm.Transient=1
+AsteriskSCFIceStorm.Flush.Timeout=2000
+TopicManager.Proxy=AsteriskSCFIceStorm/TopicManager:tcp -p 4421
+
+ServiceLocatorManagementAdapter.Endpoints=tcp -p 4422
+ServiceLocatorAdapter.Endpoints=tcp -p 4411
+ServiceLocatorLocalAdapter.Endpoints=tcp -p 4412
+
+#
 # RtpStateReplicator Configuration
+#
 IceBox.Service.RtpStateReplicator=RtpStateReplicator:create
 
 # Adapter parameters for this component
-RtpStateReplicator.Endpoints=tcp:udp
+RtpStateReplicator.Adapter.Endpoints=tcp:udp
 
-# A proxy to the service locator management service
-LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4422
-
-# A proxy to the service locator service
-LocatorService.Proxy=LocatorService:tcp -p 4411
+# IceStorm parameters for the RTP state replicator
+RtpStateReplicatorIceStorm.InstanceName=RtpStateReplicatorIceStorm
+RtpStateReplicatorIceStorm.TopicManager.Endpoints=default -p 10005
+RtpStateReplicatorIceStorm.Publish.Endpoints=default -p 10006
+RtpStateReplicatorIceStorm.Trace.TopicManager=2
+RtpStateReplicatorIceStorm.Transient=1
+RtpStateReplicatorIceStorm.Flush.Timeout=2000
+RtpStateReplicatorTopicManager.Proxy=RtpStateReplicatorIceStorm/TopicManager:default -p 10005
 
 #
 # media_rtp_pjmedia Configuration
 #
 
-IceBox.Service.MediaRTPpjmedia=media_rtp_pjmedia:create
+IceBox.Service.MediaServiceRTP=media_rtp_pjmedia:create
+
+# Name of this service
+MediaServiceRTP.ServiceName=test
 
 # Adapter parameters for this component
-MediaRTPpjmediaAdapter.Endpoints=default
-MediaRTPpjmediaAdapterLocal.Endpoints=default
-MediaRTPpjmediaAdapterLogger.Endpoints=default
+MediaServiceRTP.ServiceAdapter.Endpoints=tcp -p 4471
+MediaServiceRTP.BackplaneAdapter.Endpoints=tcp -p 4472
 
 # A proxy to the service locator management service
-ServiceLocatorManagementProxy=LocatorServiceManagement:tcp -p 4422
+LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4422
 
 # A proxy to the service locator service
-ServiceLocatorProxy=LocatorService:tcp -p 4411
+LocatorService.Proxy=LocatorService:tcp -p 4411
 
 #
 # media_rtp_pjmedia_test Configuration
 #
 
 IceBox.Service.MediaRTPpjmediaTest=media_rtp_pjmedia_test:create
-
-#
-# Service Locator Configuration
-#
-
-IceBox.Service.ServiceDiscovery=service_locator:create
-
-AsteriskSCFIceStorm.InstanceName=AsteriskSCFIceStorm
-AsteriskSCFIceStorm.TopicManager.Endpoints=default -p 10000
-AsteriskSCFIceStorm.Publish.Endpoints=tcp -p 10001:udp -p 10001
-AsteriskSCFIceStorm.Trace.TopicManager=2
-AsteriskSCFIceStorm.Transient=1
-AsteriskSCFIceStorm.Flush.Timeout=2000
-TopicManager.Proxy=AsteriskSCFIceStorm/TopicManager:default -p 10000
-
-RtpStateReplicatorIceStorm.InstanceName=RtpStateReplicatorIceStorm
-RtpStateReplicatorIceStorm.TopicManager.Endpoints=default -p 10005
-RtpStateReplicatorIceStorm.Publish.Endpoints=default -p 10006
-RtpStateReplicatorIceStorm.Trace.TopicManager=2
-RtpStateReplicatorIceStorm.Transient=1
-RtpStateReplicatorIceStorm.Flush.Timeout=2000
-RtpStateReplicatorTopicManager.Proxy=RtpStateReplicatorIceStorm/TopicManager:default -p 10005
-
-ServiceLocatorManagementAdapter.Endpoints=tcp -p 4422
-ServiceLocatorAdapter.Endpoints=tcp -p 4411
-ServiceLocatorLocalAdapter.Endpoints=tcp -p 4412
-LocatorService.Proxy=LocatorService:tcp -p 4411
-
-LoggerAdapter.Endpoints=default
diff --git a/config/test_component_v6.config b/config/test_component_v6.conf
similarity index 65%
rename from config/test_component_v6.config
rename to config/test_component_v6.conf
index 7349902..31a76e5 100644
--- a/config/test_component_v6.config
+++ b/config/test_component_v6.conf
@@ -5,70 +5,66 @@
 #
 
 IceBox.InheritProperties=1
-IceBox.LoadOrder=ServiceDiscovery,RtpStateReplicator,MediaRTPpjmedia,MediaRTPpjmediaTest
+IceBox.LoadOrder=ServiceDiscovery,RtpStateReplicator,MediaServiceRTP,MediaRTPpjmediaTest
 
 Ice.Override.Timeout=5000
 
+#
+# Service Locator Configuration
+#
+
+IceBox.Service.ServiceDiscovery=service_locator:create
+
+AsteriskSCFIceStorm.InstanceName=AsteriskSCFIceStorm
+AsteriskSCFIceStorm.TopicManager.Endpoints=tcp -p 4421
+AsteriskSCFIceStorm.Publish.Endpoints=tcp -p 4423
+AsteriskSCFIceStorm.Trace.TopicManager=2
+AsteriskSCFIceStorm.Transient=1
+AsteriskSCFIceStorm.Flush.Timeout=2000
+TopicManager.Proxy=AsteriskSCFIceStorm/TopicManager:tcp -p 4421
+
+ServiceLocatorManagementAdapter.Endpoints=tcp -p 4422
+ServiceLocatorAdapter.Endpoints=tcp -p 4411
+ServiceLocatorLocalAdapter.Endpoints=tcp -p 4412
+
+#
 # RtpStateReplicator Configuration
+#
 IceBox.Service.RtpStateReplicator=RtpStateReplicator:create
 
 # Adapter parameters for this component
-RtpStateReplicator.Endpoints=tcp:udp
+RtpStateReplicator.Adapter.Endpoints=tcp:udp
 
-# A proxy to the service locator management service
-LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4422
-
-# A proxy to the service locator service
-LocatorService.Proxy=LocatorService:tcp -p 4411
+# IceStorm parameters for the RTP state replicator
+RtpStateReplicatorIceStorm.InstanceName=RtpStateReplicatorIceStorm
+RtpStateReplicatorIceStorm.TopicManager.Endpoints=default -p 10005
+RtpStateReplicatorIceStorm.Publish.Endpoints=default -p 10006
+RtpStateReplicatorIceStorm.Trace.TopicManager=2
+RtpStateReplicatorIceStorm.Transient=1
+RtpStateReplicatorIceStorm.Flush.Timeout=2000
+RtpStateReplicatorTopicManager.Proxy=RtpStateReplicatorIceStorm/TopicManager:default -p 10005
 
 #
 # media_rtp_pjmedia Configuration
 #
 
-IceBox.Service.MediaRTPpjmedia=media_rtp_pjmedia:create
+IceBox.Service.MediaServiceRTP=media_rtp_pjmedia:create
+
+# Name of this service
+MediaServiceRTP.ServiceName=test
 
 # Adapter parameters for this component
-MediaRTPpjmediaAdapter.Endpoints=default
-MediaRTPpjmediaAdapterLocal.Endpoints=default
-MediaRTPpjmediaAdapterLogger.Endpoints=default
+MediaServiceRTP.ServiceAdapter.Endpoints=tcp -p 4471
+MediaServiceRTP.BackplaneAdapter.Endpoints=tcp -p 4472
 
 # A proxy to the service locator management service
-ServiceLocatorManagementProxy=LocatorServiceManagement:tcp -p 4422
+LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4422
 
 # A proxy to the service locator service
-ServiceLocatorProxy=LocatorService:tcp -p 4411
+LocatorService.Proxy=LocatorService:tcp -p 4411
 
 #
 # media_rtp_pjmedia_test Configuration
 #
 
 IceBox.Service.MediaRTPpjmediaTest=media_rtp_pjmedia_test_v6:create
-
-#
-# Service Locator Configuration
-#
-
-IceBox.Service.ServiceDiscovery=service_locator:create
-
-AsteriskSCFIceStorm.InstanceName=AsteriskSCFIceStorm
-AsteriskSCFIceStorm.TopicManager.Endpoints=default -p 10000
-AsteriskSCFIceStorm.Publish.Endpoints=tcp -p 10001:udp -p 10001
-AsteriskSCFIceStorm.Trace.TopicManager=2
-AsteriskSCFIceStorm.Transient=1
-AsteriskSCFIceStorm.Flush.Timeout=2000
-TopicManager.Proxy=AsteriskSCFIceStorm/TopicManager:default -p 10000
-
-RtpStateReplicatorIceStorm.InstanceName=RtpStateReplicatorIceStorm
-RtpStateReplicatorIceStorm.TopicManager.Endpoints=default -p 10005
-RtpStateReplicatorIceStorm.Publish.Endpoints=default -p 10006
-RtpStateReplicatorIceStorm.Trace.TopicManager=2
-RtpStateReplicatorIceStorm.Transient=1
-RtpStateReplicatorIceStorm.Flush.Timeout=2000
-RtpStateReplicatorTopicManager.Proxy=RtpStateReplicatorIceStorm/TopicManager:default -p 10005
-
-ServiceLocatorManagementAdapter.Endpoints=tcp -p 4422
-ServiceLocatorAdapter.Endpoints=tcp -p 4411
-ServiceLocatorLocalAdapter.Endpoints=tcp -p 4412
-LocatorService.Proxy=LocatorService:tcp -p 4411
-
-LoggerAdapter.Endpoints=default
diff --git a/config/test_media_rtp_pjmedia.conf b/config/test_media_rtp_pjmedia.conf
deleted file mode 100644
index 480a7ae..0000000
--- a/config/test_media_rtp_pjmedia.conf
+++ /dev/null
@@ -1,17 +0,0 @@
-# This is a configuration file used in conjunction with the pjmedia rtp component test driver
-IceBox.InheritProperties=1
-IceBox.Service.MediaRTPpjmedia=media_rtp_pjmedia:create
-
-# Adapter parameters for this component
-MediaRTPpjmediaAdapter.Endpoints=tcp -p 4423
-MediaRTPpjmediaAdapterLogger.Endpoints=default -h 127.0.0.1
-MediaRTPpjmediaAdapterLocal.Endpoints=tcp -p 4424
-
-# A proxy to the service locator management service
-ServiceLocatorManagementProxy=LocatorServiceManagement:tcp -p 4422
-
-# A proxy to the service locator service
-ServiceLocatorProxy=LocatorService:tcp -p 4411
-LocatorService.Proxy=LocatorService:tcp -p 4411
-
-TopicManager.Proxy=AsteriskSCFIceStorm/TopicManager:default -p 10000
diff --git a/config/test_rtp_ice.config b/config/test_rtp_ice.conf
similarity index 100%
rename from config/test_rtp_ice.config
rename to config/test_rtp_ice.conf
diff --git a/src/Component.cpp b/src/Component.cpp
index 9530a1f..2b4b3a2 100644
--- a/src/Component.cpp
+++ b/src/Component.cpp
@@ -397,6 +397,9 @@ void Component::createPrimaryServices()
 
         mRtpOverIceLocatorParams = new RTPOverICEServiceLocatorParams;
         mRtpOverIceLocatorParams->category = "rtp";
+        mRtpOverIceLocatorParams->service =
+            getCommunicator()->getProperties()->getPropertyWithDefault(getName() + ".ServiceName", "default");
+        mRtpOverIceLocatorParams->id = getName();
         PJMediaEnvironmentPtr mediaEnvironment = mRtpMediaServicePtr->getEnvironment();
 
         //
@@ -461,7 +464,7 @@ void Component::findRemoteServices()
     ServiceLocatorParamsPtr replicatorParams = new ServiceLocatorParams();
     replicatorParams->category = StateReplicatorDiscoveryCategory;
     replicatorParams->service =
-        getCommunicator()->getProperties()->getPropertyWithDefault("Rtp.StateReplicatorService", "default");
+        getCommunicator()->getProperties()->getPropertyWithDefault(getName() + ".StateReplicatorService", "default");
 
     try
     {
diff --git a/src/RtpStateReplicatorApp.cpp b/src/RtpStateReplicatorApp.cpp
index 4de161e..d7fb661 100644
--- a/src/RtpStateReplicatorApp.cpp
+++ b/src/RtpStateReplicatorApp.cpp
@@ -170,7 +170,7 @@ void RtpStateReplicatorService::registerWithServiceLocator(const Ice::Communicat
         // Add category as a parameter to enable other components look this component up.
         ServiceLocatorParamsPtr genericparams = new ServiceLocatorParams();
         genericparams->category = AsteriskSCF::Replication::MediaRTPPJMedia::V1::StateReplicatorComponentCategory;
-        genericparams->service =  ic->getProperties()->getPropertyWithDefault("RtpStateReplicator.Service", "default");
+        genericparams->service =  ic->getProperties()->getPropertyWithDefault(mAppName + ".ServiceName", "default");
         genericparams->id = mAppName;
         mComponentServiceManagement->addLocatorParams(genericparams, "");
 
@@ -183,7 +183,7 @@ void RtpStateReplicatorService::registerWithServiceLocator(const Ice::Communicat
 
         ServiceLocatorParamsPtr discoveryParams = new ServiceLocatorParams;
         discoveryParams->category = AsteriskSCF::Replication::MediaRTPPJMedia::V1::StateReplicatorDiscoveryCategory;
-        discoveryParams->service = ic->getProperties()->getPropertyWithDefault("RtpStateReplicator.Service", "default");
+        discoveryParams->service = ic->getProperties()->getPropertyWithDefault(mAppName + ".ServiceName", "default");
         discoveryParams->id = mAppName;
         mStateReplicationManagement->addLocatorParams(discoveryParams, "");
 
@@ -194,7 +194,7 @@ void RtpStateReplicatorService::registerWithServiceLocator(const Ice::Communicat
         // Populate the configuration parameters with details so we can be found
         ServiceLocatorParamsPtr configurationParams = new ServiceLocatorParams();
         configurationParams->category = ConfigurationDiscoveryCategory;
-        configurationParams->service = ic->getProperties()->getPropertyWithDefault("RtpConfiguration.Service", "default");
+        configurationParams->service = ic->getProperties()->getPropertyWithDefault(mAppName + ".ServiceName", "default");
         configurationParams->id = mAppName;
         mConfigurationManagement->addLocatorParams(configurationParams, "");
 
@@ -226,10 +226,9 @@ void RtpStateReplicatorService::deregisterFromServiceLocator()
 
 void RtpStateReplicatorService::initialize(const string& appName, const Ice::CommunicatorPtr& ic)
 {
-    mIceStorm = new CollocatedIceStorm("RtpStateReplicatorIceStorm", ic->getProperties());
+    mIceStorm = new CollocatedIceStorm(appName, ic->getProperties());
 
-    IceStorm::TopicManagerPrx topicManager = IceStorm::TopicManagerPrx::checkedCast(
-    ic->propertyToProxy("RtpStateReplicatorTopicManager.Proxy"));
+    IceStorm::TopicManagerPrx topicManager = mIceStorm->createTopicManagerProxy(ic);
 
     IceStorm::TopicPrx topic;
 
@@ -260,7 +259,7 @@ void RtpStateReplicatorService::initialize(const string& appName, const Ice::Com
         lg(Info) << "IceStorm topic manager proxy not present, unable to perform configuration replication.";
     }
 
-    mAdapter = ic->createObjectAdapter("RtpStateReplicator");
+    mAdapter = ic->createObjectAdapter(appName + ".Adapter");
 
     // setup logging client
     mIceLogger = createIceLogger(mAdapter);
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index f5195f5..024dbe6 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -28,6 +28,6 @@ astscf_component_add_slice_collection_libraries(media_rtp_pjmedia_ice_test ASTSC
 astscf_component_build_icebox(media_rtp_pjmedia_ice_test)
 pjproject_link(media_rtp_pjmedia_ice_test pjlib)
 
-astscf_test_icebox(media_rtp_pjmedia_test config/test_component.config)
-astscf_test_icebox(media_rtp_pjmedia_test_v6 config/test_component_v6.config)
-astscf_test_icebox(media_rtp_pjmedia_ice_test config/test_rtp_ice.config)
+astscf_test_icebox(media_rtp_pjmedia_test config/test_component.conf)
+astscf_test_icebox(media_rtp_pjmedia_test_v6 config/test_component_v6.conf)
+astscf_test_icebox(media_rtp_pjmedia_ice_test config/test_rtp_ice.conf)

-----------------------------------------------------------------------


-- 
asterisk-scf/release/media_rtp_pjmedia.git



More information about the asterisk-scf-commits mailing list