[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
Wed Sep 28 13:42:29 CDT 2011
branch "master" has been updated
via 9cbd638d2c5620be9c1822374024b07705d4b268 (commit)
from ca14499ac6e6bf66f3eb5a33bfc4d1a12f6452d2 (commit)
Summary of changes:
src/MediaRTPpjmedia.cpp | 724 -----------------------------------------------
1 files changed, 0 insertions(+), 724 deletions(-)
delete mode 100644 src/MediaRTPpjmedia.cpp
- Log -----------------------------------------------------------------
commit 9cbd638d2c5620be9c1822374024b07705d4b268
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Wed Sep 28 13:42:26 2011 -0500
Remove file leftover from Component base class conversion.
diff --git a/src/MediaRTPpjmedia.cpp b/src/MediaRTPpjmedia.cpp
deleted file mode 100644
index 8f9b4e7..0000000
--- a/src/MediaRTPpjmedia.cpp
+++ /dev/null
@@ -1,724 +0,0 @@
-/*
- * Asterisk SCF -- An open-source communications framework.
- *
- * Copyright (C) 2010, Digium, Inc.
- *
- * See http://www.asterisk.org for more information about
- * the Asterisk SCF project. Please do not directly contact
- * any of the maintainers of this project for assistance;
- * the project provides a web site, mailing lists and IRC
- * channels for your use.
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License Version 2. See the LICENSE.txt file
- * at the top of the source tree.
- */
-
-#include <pjlib.h>
-#include <pjmedia.h>
-
-#include <Ice/Ice.h>
-#include <IceBox/IceBox.h>
-#include <IceUtil/UUID.h>
-
-#include <boost/shared_ptr.hpp>
-
-#include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
-#include <AsteriskSCF/Media/MediaIf.h>
-#include <AsteriskSCF/Media/RTP/MediaRTPIf.h>
-#include <AsteriskSCF/System/Component/ConfigurationIf.h>
-#include <AsteriskSCF/System/Component/ComponentServiceIf.h>
-#include <AsteriskSCF/System/Component/ReplicaIf.h>
-#include <AsteriskSCF/Logger/IceLogger.h>
-#include <AsteriskSCF/logger.h>
-#include <AsteriskSCF/Discovery/SmartProxy.h>
-
-#include "RtpStateReplicationIf.h"
-
-#include "RTPSession.h"
-#include "RtpStateReplicator.h"
-#include "RTPConfiguration.h"
-#include "RtpConfigurationIf.h"
-
-#include "PJMediaEnvironment.h"
-
-using namespace std;
-using namespace AsteriskSCF::Core::Discovery::V1;
-using namespace AsteriskSCF::Media::V1;
-using namespace AsteriskSCF::Media::RTP::V1;
-using namespace AsteriskSCF::Replication::MediaRTPPJMedia::V1;
-using namespace AsteriskSCF::Configuration::MediaRTPPJMedia::V1;
-using namespace AsteriskSCF::System::Configuration::V1;
-using namespace AsteriskSCF::System::Component::V1;
-using namespace AsteriskSCF::System::Logging;
-using namespace AsteriskSCF::Discovery;
-using namespace AsteriskSCF::PJMediaRTP;
-
-namespace
-{
-Logger lg = getLoggerFactory().getLogger("AsteriskSCF.MediaRTP");
-}
-
-static const string ReplicaServiceId("MediaRtpReplica");
-static const string MediaServiceId("RTPMediaService");
-static const string MediaComparatorServiceId("RTPMediaServiceComparator");
-
-/**
- * Implementation of the RTPMediaService interface as defined in MediaRTPIf.ice
- */
-class RTPMediaServiceImpl : public RTPMediaService
-{
-public:
- RTPMediaServiceImpl(const Ice::ObjectAdapterPtr&, const ReplicaPrx&,
- const AsteriskSCF::Discovery::SmartProxy<RtpStateReplicatorPrx>&,
- const ConfigurationServiceImplPtr&);
- RTPSessionPrx allocate(
- const RTPServiceLocatorParamsPtr&,
- const RTPOptionsPtr&,
- RTPAllocationOutputsPtr&,
- const Ice::Current&);
- pj_pool_factory *getPoolFactory() { return mEnvironment->poolFactory(); };
-
- PJMediaEnvironmentPtr getEnvironment()
- {
- return mEnvironment;
- }
-
-private:
- /**
- * A pointer to the object adapter that objects should be added to.
- */
- Ice::ObjectAdapterPtr mAdapter;
-
- /**
- * The media environment object.
- */
- PJMediaEnvironmentPtr mEnvironment;
-
- /**
- * A proxy for the replica service
- */
- ReplicaPrx mReplicaServicePrx;
-
- /**
- * A pointer to the configuration service.
- */
- ConfigurationServiceImplPtr mConfigurationService;
-
- /**
- * A proxy to the state replicator.
- */
- AsteriskSCF::Discovery::SmartProxy<RtpStateReplicatorPrx> mStateReplicator;
-
-#if CONTROL_POINTS_ENABLED
- AsteriskSCF::PJMediaRTPTesting mMediaServiceSwitchBoard;
-#endif
-};
-
-/**
- * Typedef which gives us a smart pointer type for RTPMediaServiceImpl class.
- */
-typedef IceUtil::Handle<RTPMediaServiceImpl> RTPMediaServiceImplPtr;
-
-/**
- * This class provides implementation for the Replica interface.
- */
-class ReplicaImpl : public Replica
-{
-public:
- ReplicaImpl(const Ice::ObjectAdapterPtr& adapter) : mAdapter(adapter), mPaused(false), mActive(true) { }
-
- bool isActive(const Ice::Current&)
- {
- return mActive;
- }
-
- bool activate(const Ice::Current&)
- {
- mActive = true;
-
- for (vector<AsteriskSCF::System::Component::V1::ReplicaListenerPrx>::const_iterator listener =
- mListeners.begin(); listener != mListeners.end(); ++listener)
- {
- (*listener)->activated(ReplicaPrx::uncheckedCast(
- mAdapter->createDirectProxy(mAdapter->getCommunicator()->stringToIdentity(ReplicaServiceId))));
- }
-
- return true;
- }
-
- void standby(const Ice::Current&)
- {
- mActive = false;
-
- for (vector<AsteriskSCF::System::Component::V1::ReplicaListenerPrx>::const_iterator listener =
- mListeners.begin(); listener != mListeners.end(); ++listener)
- {
- (*listener)->onStandby(ReplicaPrx::uncheckedCast(
- mAdapter->createDirectProxy(mAdapter->getCommunicator()->stringToIdentity(ReplicaServiceId))));
- }
- }
-
- void addListener(const AsteriskSCF::System::Component::V1::ReplicaListenerPrx& listener, const Ice::Current&)
- {
- mListeners.push_back(listener);
- }
-
- void removeListener(const AsteriskSCF::System::Component::V1::ReplicaListenerPrx& listener, const Ice::Current&)
- {
- mListeners.erase(std::remove(mListeners.begin(), mListeners.end(), listener), mListeners.end());
- }
-
-private:
- /**
- * Pointer to the object adapter we exist on.
- */
- Ice::ObjectAdapterPtr mAdapter;
-
- /**
- * Listeners that we need to push state change notifications out to.
- */
- vector<AsteriskSCF::System::Component::V1::ReplicaListenerPrx> mListeners;
-
- bool mPaused;
-
- bool mActive;
-};
-
-/**
- * Implementation of the ServiceLocatorParamsCompare class
- */
-class RTPMediaServiceCompareServiceImpl : public ServiceLocatorParamsCompare
-{
-public:
- RTPMediaServiceCompareServiceImpl(const ConfigurationServiceImplPtr& config) :
- mConfig(config)
- {
- }
-
- bool isSupported(const ServiceLocatorParamsPtr& locatorParams, const Ice::Current&)
- {
- RTPServiceLocatorParamsPtr params;
-
- if (!(params = RTPServiceLocatorParamsPtr::dynamicCast(locatorParams)))
- {
- return false;
- }
-
- bool result = true;
-
- // This is done on purpose for additional checks in the future
- if (params->ipv6 == true)
- {
-#if defined(PJ_HAS_IPV6) && PJ_HAS_IPV6!=0
- result = true;
-#else
- result = false;
-#endif
- }
- //
- // We can ignore the SRTP criteria since we support it one way or the other.
- //
- if (!result)
- {
- return false;
- }
-
- RTPOverICEServiceLocatorParamsPtr iceParams = RTPOverICEServiceLocatorParamsPtr::dynamicCast(locatorParams);
- if (iceParams)
- {
- if (iceParams->enableRTPOverICE)
- {
- NATConfigPtr natConfig = mConfig->natConfig();
-
- if (natConfig && natConfig->isSTUNEnabled())
- {
- if (iceParams->enableTURN)
- {
- if (!natConfig->isTURNEnabled())
- {
- result = false;
- }
- }
- }
- else
- {
- result = false;
- }
- }
- //
- // We ignore the else case because we can definitely do non-ICE related stuff... its not clear
- // that negative matches in this case should be exclusionary. Actual ICE usage will be specified
- // when the RTP session is allocated.
- //
- }
-
- return result;
- };
-
-private:
- ConfigurationServiceImplPtr mConfig;
-};
-
-/**
- * Implementation of the IceBox::Service class
- */
-class MediaRTPpjmediaApp : public IceBox::Service
-{
-public:
- MediaRTPpjmediaApp() : mGeneralState(new RtpGeneralStateItem()) { mGeneralState->key = IceUtil::generateUUID(); };
- void start(const std::string&, const Ice::CommunicatorPtr&, const Ice::StringSeq&);
- void stop();
-
-private:
- /**
- * Ice Communicator used for this service.
- */
- Ice::CommunicatorPtr mCommunicator;
-
- /**
- * Object adapter that global stuff is associated with.
- */
- Ice::ObjectAdapterPtr mGlobalAdapter;
-
- /**
- * Object adapter that local stuff is associated with.
- */
- Ice::ObjectAdapterPtr mLocalAdapter;
-
- /**
- * The object adapter for the Logger.
- */
- Ice::ObjectAdapterPtr mLoggerAdapter;
-
- /**
- * A proxy to the service locator manager for the component service.
- */
- ServiceManagementPrx mComponentServiceManagement;
-
- /**
- * Instance of our replica implementation.
- */
- ReplicaPtr mReplicaService;
-
- /**
- * A proxy to the replica control object.
- */
- ReplicaPrx mReplicaServicePrx;
-
- /**
- * Instance of our configuration service implementation.
- */
- ConfigurationServiceImplPtr mConfigurationService;
-
- /**
- * Instance of our state replicator listener.
- */
- RtpStateReplicatorListenerPtr mReplicatorListener;
-
- /**
- * A proxy to our state replicator listener.
- */
- RtpStateReplicatorListenerPrx mReplicatorListenerProxy;
-
- /**
- * A proxy to the state replicator.
- */
- AsteriskSCF::Discovery::SmartProxy<RtpStateReplicatorPrx> mStateReplicator;
-
- /**
- * An instance of the general state information class.
- */
- RtpGeneralStateItemPtr mGeneralState;
-
- /**
- * A proxy to the service locator management service.
- */
- ServiceLocatorManagementPrx mManagement;
-
- /**
- * A proxy to the service locator manager for the configuration service.
- */
- ServiceManagementPrx mConfigurationManagement;
-
- /**
- * Unique guid for configuration service name comparator.
- */
- std::string mConfigCompareGuid;
-};
-
-/**
- * Implementation of the ComponentService interface as defined in ComponentServiceIf.ice
- */
-class ComponentServicepjmediaImpl : public ComponentService
-{
-public:
- /**
- * A constructor for this implementation which just sets a few variables, nothing extreme.
- */
- ComponentServicepjmediaImpl(MediaRTPpjmediaApp& app, const RtpGeneralStateItemPtr& generalState) :
- mApplication(app), mGeneralState(generalState) { };
-
- /**
- * An implementation of the suspend method which actually suspends ourselves
- * from the service locator.
- */
- virtual void suspend(const ::Ice::Current&)
- {
- mGeneralState->serviceManagement->suspend();
- }
-
- /**
- * An implementation of the resume method which actually unsuspends ourselves
- * from the service locator.
- */
- virtual void resume(const ::Ice::Current&)
- {
- mGeneralState->serviceManagement->unsuspend();
- }
-
- /**
- * An implementation of the shutdown method which really does shut us down.
- * Goodbye cruel world.
- */
- virtual void shutdown(const ::Ice::Current&)
- {
- // TODO - Actually support this
- }
-
-private:
- /**
- * Our application instance, used for shutting the component down.
- */
- MediaRTPpjmediaApp& mApplication;
-
- /**
- * Pointer to general state information.
- */
- RtpGeneralStateItemPtr mGeneralState;
-};
-
-/**
- * Wrapper class around pj_thread_desc.
- */
-class ThreadDescWrapper
-{
-public:
- /**
- * pjthread thread description information, must persist for the life of the thread
- */
- pj_thread_desc mDesc;
-};
-
-/**
- * Type definition used to create a smart pointer for the above.
- */
-typedef boost::shared_ptr<ThreadDescWrapper> ThreadDescWrapperPtr;
-
-/**
- * Implementation of the Ice::ThreadNotification class.
- */
-class pjlibHook : public Ice::ThreadNotification
-{
-public:
- /**
- * Implementation of the start function which is called when a thread starts.
- */
- void start()
- {
- ThreadDescWrapperPtr wrapper = ThreadDescWrapperPtr(new ThreadDescWrapper());
- pj_thread_t *thread;
- pj_thread_register("ICE Thread", wrapper->mDesc, &thread);
- boost::lock_guard<boost::mutex> lock(mLock);
- pjThreads.insert(make_pair(thread, wrapper));
- }
-
- /**
- * Implementation of the stop function which is called when a thread stops.
- */
- void stop()
- {
- if (pj_thread_is_registered())
- {
- boost::lock_guard<boost::mutex> lock(mLock);
- pjThreads.erase(pj_thread_this());
- }
- }
-private:
- /**
- * A map containing thread lifetime persistent data.
- */
- map<pj_thread_t*, ThreadDescWrapperPtr> pjThreads;
-
- /**
- * Mutex to protect the map
- */
- boost::mutex mLock;
-};
-
-/**
- * Comparator implementation for name based configuration service locating
- */
-class RtpConfigurationCompare : public ServiceLocatorParamsCompare
-{
-public:
- RtpConfigurationCompare(const string& name) : mName(name) {}
- bool isSupported(const ServiceLocatorParamsPtr ¶ms, const Ice::Current &)
- {
- RtpConfigurationParamsPtr configParams = RtpConfigurationParamsPtr::dynamicCast(params);
- if (configParams->name == mName)
- {
- return true;
- }
- return false;
- }
-private:
- string mName;
-};
-
-typedef IceUtil::Handle<RtpConfigurationCompare> RtpConfigurationComparePtr;
-
-/**
- * Constructor for the RTPMediaServiceImpl class.
- */
-RTPMediaServiceImpl::RTPMediaServiceImpl(const Ice::ObjectAdapterPtr& adapter, const ReplicaPrx& replicaService,
- const AsteriskSCF::Discovery::SmartProxy<RtpStateReplicatorPrx>& stateReplicator,
- const ConfigurationServiceImplPtr& configurationService) :
- mAdapter(adapter),
- mEnvironment(PJMediaEnvironment::create(adapter->getCommunicator()->getProperties(), configurationService)),
- mReplicaServicePrx(replicaService),
- mConfigurationService(configurationService),
- mStateReplicator(stateReplicator)
-{
-}
-
-/**
- * Implementation of the allocate method as defined in MediaRTPIf.ice
- */
-RTPSessionPrx RTPMediaServiceImpl::allocate(
- const RTPServiceLocatorParamsPtr& params,
- const RTPOptionsPtr& options,
- RTPAllocationOutputsPtr& outputs,
- const Ice::Current&)
-{
- return AsteriskSCF::PJMediaRTP::RTPSession::create(mAdapter, IceUtil::generateUUID(), params, mEnvironment,
- mReplicaServicePrx, mStateReplicator, mConfigurationService, options, outputs);
-}
-
-/**
- * Implementation of the IceBox::Service::start method.
- */
-void MediaRTPpjmediaApp::start(const std::string&, const Ice::CommunicatorPtr& communicator,
- const Ice::StringSeq&)
-{
- // we need a logger before we're ready to build the real communicator.
- // use the one we're provided to create the IceLogger.
- mLoggerAdapter = communicator->createObjectAdapter("MediaRTPpjmediaAdapterLogger");
- ConfiguredIceLoggerPtr iceLogger = createIceLogger(mLoggerAdapter);
- getLoggerFactory().setLogOutput(iceLogger->getLogger());
- mLoggerAdapter->activate();
-
- /* Initialize pjlib as pjmedia will be using it */
- pj_status_t status = pj_init();
- if (status != PJ_SUCCESS)
- {
- lg(Error) << "PJ library initialization failed.";
- return;
- }
-
- if ((status = pjlib_util_init()) != PJ_SUCCESS)
- {
- lg(Error) << "PJ Utility library initialization failed.";
- return;
- }
-
- lg(Info) << "Initializing pjmedia rtp component" << endl;
-
- Ice::InitializationData id;
- id.threadHook = new pjlibHook();
- id.properties = communicator->getProperties();
-
- mCommunicator = Ice::initialize(id);
-
- mLocalAdapter = mCommunicator->createObjectAdapter("MediaRTPpjmediaAdapterLocal");
-
- mReplicaService = new ReplicaImpl(mLocalAdapter);
- mReplicaServicePrx = ReplicaPrx::uncheckedCast(mLocalAdapter->add(mReplicaService, mCommunicator->stringToIdentity(ReplicaServiceId)));
-
- mConfigurationService = ConfigurationServiceImpl::create();
- ConfigurationServicePrx mConfigurationServiceProxy = mConfigurationService->activate(mLocalAdapter, IceUtil::generateUUID());
- mLocalAdapter->activate();
-
- mGlobalAdapter = mCommunicator->createObjectAdapter("MediaRTPpjmediaAdapter");
-
- mGlobalAdapter->activate();
-
- lg(Info) << "Activated pjmedia rtp component media service." << endl;
-
- mManagement = ServiceLocatorManagementPrx::checkedCast(mCommunicator->propertyToProxy("ServiceLocatorManagementProxy"));
-
- // The service locator is required for state replicator operation, so go ahead and find it
- ServiceLocatorPrx locator = ServiceLocatorPrx::checkedCast(mCommunicator->propertyToProxy("LocatorService.Proxy"));
-
- // Look for the configured state replicator or default one
- RtpStateReplicatorParamsPtr replicatorParams = new RtpStateReplicatorParams();
- replicatorParams->category = StateReplicatorDiscoveryCategory;
- replicatorParams->name =
- mCommunicator->getProperties()->getPropertyWithDefault("Rtp.StateReplicatorName", "default");
-
- try
- {
- AsteriskSCF::Discovery::SmartProxy<RtpStateReplicatorPrx> pw(locator, replicatorParams, lg);
- mStateReplicator = pw;
- }
- catch (...)
- {
- lg(Error) << "State replicator could not be found, operating without.";
- }
-
- RTPMediaServiceImplPtr rtpmediaservice =
- new RTPMediaServiceImpl(mGlobalAdapter, mReplicaServicePrx, mStateReplicator, mConfigurationService);
-
- if (mCommunicator->getProperties()->getPropertyWithDefault("Rtp.Standalone", "false") == "true")
- {
- // Publish the configuration service IceStorm topic so everybody gets configuration
- mConfigurationManagement = ServiceManagementPrx::uncheckedCast(
- mManagement->addService(mConfigurationServiceProxy, ""));
-
- // Populate the configuration parameters with details so we can be found
- RtpConfigurationParamsPtr configurationParams = new RtpConfigurationParams();
- configurationParams->category = ConfigurationDiscoveryCategory;
- configurationParams->name = mCommunicator->getProperties()->getPropertyWithDefault("RtpConfiguration.Name", "");
-
- // Add our custom comparator so we can support multiple simultaneous configuration sinks
- RtpConfigurationComparePtr configNameCompare = new RtpConfigurationCompare(configurationParams->name);
- ServiceLocatorParamsComparePrx configCompareProxy = ServiceLocatorParamsComparePrx::uncheckedCast(
- mLocalAdapter->addWithUUID(configNameCompare));
-
- mConfigCompareGuid = IceUtil::generateUUID();
- mManagement->addCompare(mConfigCompareGuid, configCompareProxy);
- mConfigurationManagement->addLocatorParams(configurationParams, mConfigCompareGuid);
- }
- else if (mStateReplicator)
- {
- ConfigurationReplicatorPrx configurationReplicator = ConfigurationReplicatorPrx::checkedCast(
- mStateReplicator.initialize(), ReplicatorFacet);
- configurationReplicator->registerConfigurationService(mConfigurationServiceProxy);
- }
-
- if (mStateReplicator)
- {
- mReplicatorListener =
- new RtpStateReplicatorListenerI(mGlobalAdapter, rtpmediaservice->getEnvironment(), mGeneralState,
- mConfigurationService);
- mReplicatorListenerProxy =
- RtpStateReplicatorListenerPrx::uncheckedCast(mLocalAdapter->addWithUUID(mReplicatorListener));
-
- if (mCommunicator->getProperties()->getPropertyWithDefault("Rtp.StateReplicatorListener", "no") == "yes")
- {
- mStateReplicator->addListener(mReplicatorListenerProxy);
- mReplicaService->standby();
- lg(Info) << "Operating as a standby replica." << endl;
- }
- else
- {
- lg(Info) << "Operating in an active state." << endl;
- }
- }
-
- ServiceLocatorParamsComparePtr rtpmediacomparatorservice = new RTPMediaServiceCompareServiceImpl(mConfigurationService);
- ServiceLocatorParamsComparePrx RTPMediaComparatorServiceProxy = ServiceLocatorParamsComparePrx::uncheckedCast(
- mGlobalAdapter->add(rtpmediacomparatorservice, mCommunicator->stringToIdentity(MediaComparatorServiceId)));
-
- if (mReplicaService->isActive() == true)
- {
- mGeneralState->comparatorId = IceUtil::generateUUID();
- mManagement->addCompare(mGeneralState->comparatorId, RTPMediaComparatorServiceProxy);
- }
-
-
- RTPMediaServicePrx RTPMediaServiceProxy = RTPMediaServicePrx::uncheckedCast(mGlobalAdapter->add(rtpmediaservice,
- mCommunicator->stringToIdentity(MediaServiceId)));
-
- RTPOverICEServiceLocatorParamsPtr rtpparams = new RTPOverICEServiceLocatorParams;
- rtpparams->category = "rtp";
- PJMediaEnvironmentPtr mediaEnvironment = rtpmediaservice->getEnvironment();
-
- //
- // Service wide configuration is done through properties allowing certain features
- // to be completely disabled.
- //
- NATConfigPtr natConfig = mediaEnvironment->natConfig();
- if (natConfig && natConfig->isSTUNEnabled())
- {
- rtpparams->enableRTPOverICE = true;
- rtpparams->enableTURN = natConfig->isTURNEnabled();
- }
- else
- {
- rtpparams->enableRTPOverICE = false;
- rtpparams->enableTURN = false;
- }
-
- if (mReplicaService->isActive() == true)
- {
- mGeneralState->serviceManagement = ServiceManagementPrx::uncheckedCast(
- mManagement->addService(RTPMediaServiceProxy, "media_rtp_pjmedia"));
- /* Now we can add some parameters to help find us. */
- mGeneralState->serviceManagement->addLocatorParams(rtpparams, mGeneralState->comparatorId);
- }
-
- ServiceLocatorParamsPtr genericparams = new ServiceLocatorParams();
-
- /* One must provide a component service to manage us, if someone wants to */
- ComponentServicePtr ComponentService = new ComponentServicepjmediaImpl(*this, mGeneralState);
- ComponentServicePrx ComponentServiceProxy =
- ComponentServicePrx::uncheckedCast(mLocalAdapter->addWithUUID(ComponentService));
-
- /* Let's add the component service to the service locator first */
- mComponentServiceManagement =
- ServiceManagementPrx::uncheckedCast(mManagement->addService(ComponentServiceProxy, "media_rtp_pjmedia.component"));
- genericparams->category = "Component/media_rtp_pjmedia";
- mComponentServiceManagement->addLocatorParams(genericparams, "");
-
- // Replicate general state information so the backup is ready
- if (mStateReplicator && mReplicaService->isActive() == true)
- {
- RtpStateItemSeq items;
- items.push_back(mGeneralState);
- RtpStateReplicatorPrx oneway = RtpStateReplicatorPrx::uncheckedCast(mStateReplicator->ice_oneway());
- oneway->setState(items);
- }
-}
-
-/**
- * Implementation of the IceBox::Service::stop method.
- */
-void MediaRTPpjmediaApp::stop()
-{
- mComponentServiceManagement->unregister();
- if (mReplicaService->isActive() == true)
- {
- mGeneralState->serviceManagement->unregister();
- }
- if (mConfigurationManagement)
- {
- mConfigurationManagement->unregister();
- }
- if (!mConfigCompareGuid.empty())
- {
- mManagement->removeCompare(mConfigCompareGuid);
- ServiceLocatorManagementPrx management =
- ServiceLocatorManagementPrx::checkedCast(mCommunicator->propertyToProxy("ServiceLocatorManagementProxy"));
- management->removeCompare(mGeneralState->comparatorId);
- }
- mCommunicator->destroy();
-}
-
-extern "C"
-{
-ASTSCF_DLL_EXPORT IceBox::Service* create(Ice::CommunicatorPtr)
-{
- return new MediaRTPpjmediaApp;
-}
-}
-----------------------------------------------------------------------
--
asterisk-scf/release/media_rtp_pjmedia.git
More information about the asterisk-scf-commits
mailing list