[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
Sun May 15 12:49:56 CDT 2011


branch "master" has been updated
       via  d0f0dfa8e7260ee3d7bf94fe4edc7e9cf7cb858a (commit)
      from  123ea2768f3372ba6ff51e2b60f147eb218b0097 (commit)

Summary of changes:
 src/CMakeLists.txt                 |    3 +--
 src/MediaRTPpjmedia.cpp            |   20 ++++++++++----------
 src/RTPSession.cpp                 |   17 ++++++++---------
 src/RTPSession.h                   |    3 ++-
 src/RTPSink.cpp                    |    7 +++----
 src/RTPSource.cpp                  |    6 ++----
 src/RtpStateReplicator.h           |   26 ++++++++++++++++----------
 src/RtpStateReplicatorApp.cpp      |    4 ++--
 src/RtpStateReplicatorListener.cpp |   11 +++--------
 9 files changed, 47 insertions(+), 50 deletions(-)


- Log -----------------------------------------------------------------
commit d0f0dfa8e7260ee3d7bf94fe4edc7e9cf7cb858a
Author: Brent Eagles <beagles at digium.com>
Date:   Sun May 15 15:19:47 2011 -0230

    Apply changes for ice-util-cpp restructuring

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 259dcdb..b3396d3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,5 +1,4 @@
-include_directories(${utils_dir}/StateReplicator/include)
-include_directories(${utils_dir}/SmartProxy/include)
+include_directories(${utils_dir}/include)
 include_directories(${API_INCLUDE_DIR})
 if(NOT logger_dir)
   message(FATAL_ERROR "The logger directory could not be found ${logger_dir}")
diff --git a/src/MediaRTPpjmedia.cpp b/src/MediaRTPpjmedia.cpp
index 3c1343e..ab63f28 100644
--- a/src/MediaRTPpjmedia.cpp
+++ b/src/MediaRTPpjmedia.cpp
@@ -14,13 +14,13 @@
  * 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 <pjlib.h>
-#include <pjmedia.h>
-
 #include <boost/shared_ptr.hpp>
 
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
@@ -30,7 +30,7 @@
 #include <AsteriskSCF/System/Component/ReplicaIf.h>
 #include <AsteriskSCF/Logger/IceLogger.h>
 #include <AsteriskSCF/logger.h>
-#include <AsteriskSCF/SmartProxy.h>
+#include <AsteriskSCF/Discovery/SmartProxy.h>
 
 #include "RtpStateReplicationIf.h"
 
@@ -43,7 +43,7 @@ using namespace AsteriskSCF::Media::V1;
 using namespace AsteriskSCF::Media::RTP::V1;
 using namespace AsteriskSCF::System::Component::V1;
 using namespace AsteriskSCF::System::Logging;
-using namespace AsteriskSCF::SmartProxy;
+using namespace AsteriskSCF::Discovery;
 
 namespace
 {
@@ -60,7 +60,7 @@ class RTPMediaServiceImpl : public RTPMediaService
 {
 public:
     RTPMediaServiceImpl(const Ice::ObjectAdapterPtr&, const ReplicaPtr&,
-            const AsteriskSCF::SmartProxy::SmartProxy<RtpStateReplicatorPrx>&);
+            const AsteriskSCF::Discovery::SmartProxy<RtpStateReplicatorPrx>&);
     RTPSessionPrx allocate(const FormatSeq&, const Ice::Current&);
     pj_pool_factory *getPoolFactory() { return &mCachingPool.factory; };
 private:
@@ -87,7 +87,7 @@ private:
     /**
      * A proxy to the state replicator.
      */
-    AsteriskSCF::SmartProxy::SmartProxy<RtpStateReplicatorPrx> mStateReplicator;
+    AsteriskSCF::Discovery::SmartProxy<RtpStateReplicatorPrx> mStateReplicator;
 };
 
 /**
@@ -214,7 +214,7 @@ private:
     /**
      * A proxy to the state replicator.
      */
-    AsteriskSCF::SmartProxy::SmartProxy<RtpStateReplicatorPrx> mStateReplicator;
+    AsteriskSCF::Discovery::SmartProxy<RtpStateReplicatorPrx> mStateReplicator;
 
     /**
      * An instance of the general state information class.
@@ -328,7 +328,7 @@ private:
  * Constructor for the RTPMediaServiceImpl class.
  */
 RTPMediaServiceImpl::RTPMediaServiceImpl(const Ice::ObjectAdapterPtr& adapter, const ReplicaPtr& replicaService,
-        const AsteriskSCF::SmartProxy::SmartProxy<RtpStateReplicatorPrx>& stateReplicator) :
+        const AsteriskSCF::Discovery::SmartProxy<RtpStateReplicatorPrx>& stateReplicator) :
     mAdapter(adapter), mReplicaService(replicaService), mStateReplicator(stateReplicator)
 {
     /* Initialize the memory caching pool using default policy as specified by pjlib. */
@@ -410,7 +410,7 @@ void MediaRTPpjmediaApp::start(const std::string&, const Ice::CommunicatorPtr& c
 
     try
     {  
-	AsteriskSCF::SmartProxy::SmartProxy<RtpStateReplicatorPrx> pw(locator, replicatorParams, lg);
+	AsteriskSCF::Discovery::SmartProxy<RtpStateReplicatorPrx> pw(locator, replicatorParams, lg);
         mStateReplicator = pw;
     }
     catch (...)
diff --git a/src/RTPSession.cpp b/src/RTPSession.cpp
index 2ab6074..2cddb39 100644
--- a/src/RTPSession.cpp
+++ b/src/RTPSession.cpp
@@ -14,16 +14,15 @@
  * at the top of the source tree.
  */
 
-#include <Ice/Ice.h>
-#include <IceUtil/UUID.h>
-
 #include <pjlib.h>
 #include <pjmedia.h>
 
+#include <Ice/Ice.h>
+#include <IceUtil/UUID.h>
+
 #include <AsteriskSCF/Media/MediaIf.h>
 #include <AsteriskSCF/Media/RTP/MediaRTPIf.h>
 #include <AsteriskSCF/System/Component/ReplicaIf.h>
-#include <AsteriskSCF/SmartProxy.h>
 
 #include "RtpStateReplicationIf.h"
 
@@ -36,7 +35,7 @@ using namespace AsteriskSCF::Core::Discovery::V1;
 using namespace AsteriskSCF::Media::V1;
 using namespace AsteriskSCF::Media::RTP::V1;
 using namespace AsteriskSCF::System::Component::V1;
-using namespace AsteriskSCF::SmartProxy;
+using namespace AsteriskSCF::Discovery;
 
 /**
  * Default value for where we should start allocating RTP and RTCP ports from.
@@ -56,7 +55,7 @@ class RTPSessionImplPriv
 public:
     RTPSessionImplPriv(const Ice::ObjectAdapterPtr& adapter, const FormatSeq& formats,
             const ReplicaPtr& replicaService,
-            const AsteriskSCF::SmartProxy::SmartProxy<RtpStateReplicatorPrx>& stateReplicator) :
+            const AsteriskSCF::Discovery::SmartProxy<RtpStateReplicatorPrx>& stateReplicator) :
 	mAdapter(adapter), mFormats(formats),
         mSessionStateItem(new RtpSessionStateItem()),
         mReplicaService(replicaService), mStateReplicator(stateReplicator) { };
@@ -125,7 +124,7 @@ public:
     /**
      * A proxy to the state replicator where we are sending updates to.
      */
-    AsteriskSCF::SmartProxy::SmartProxy<RtpStateReplicatorPrx> mStateReplicator;
+    AsteriskSCF::Discovery::SmartProxy<RtpStateReplicatorPrx> mStateReplicator;
 };
 
 /**
@@ -133,7 +132,7 @@ public:
  */
 RTPSessionImpl::RTPSessionImpl(const Ice::ObjectAdapterPtr& adapter, const FormatSeq& formats,
         pj_pool_factory* factory, const ReplicaPtr& replicaService,
-        const AsteriskSCF::SmartProxy::SmartProxy<RtpStateReplicatorPrx>& stateReplicator) : 
+        const AsteriskSCF::Discovery::SmartProxy<RtpStateReplicatorPrx>& stateReplicator) : 
     mImpl(new RTPSessionImplPriv(adapter, formats, replicaService, stateReplicator))
 {
     /* Add ourselves to the ICE ASM so we can be used. */
@@ -183,7 +182,7 @@ RTPSessionImpl::RTPSessionImpl(const Ice::ObjectAdapterPtr& adapter, const Forma
 RTPSessionImpl::RTPSessionImpl(const Ice::ObjectAdapterPtr& adapter, pj_pool_factory* factory,
         const Ice::Identity& sessionIdentity, const Ice::Identity& sinkIdentity, const Ice::Identity& sourceIdentity,
         Ice::Int port, const FormatSeq& formats) :
-    mImpl(new RTPSessionImplPriv(adapter, formats, 0, *(new AsteriskSCF::SmartProxy::SmartProxy<RtpStateReplicatorPrx>)))
+    mImpl(new RTPSessionImplPriv(adapter, formats, 0, *(new AsteriskSCF::Discovery::SmartProxy<RtpStateReplicatorPrx>)))
 {
     mImpl->mProxy = RTPSessionPrx::uncheckedCast(adapter->add(this, sessionIdentity));
 
diff --git a/src/RTPSession.h b/src/RTPSession.h
index a8e4b7a..1703cd0 100644
--- a/src/RTPSession.h
+++ b/src/RTPSession.h
@@ -9,6 +9,7 @@
 #pragma once
 
 #include <boost/shared_ptr.hpp>
+#include <AsteriskSCF/Discovery/SmartProxy.h>
 
 /**
  * Forward definition for our private implementation of RTPSession.
@@ -43,7 +44,7 @@ class RTPSessionImpl : public AsteriskSCF::Media::RTP::V1::RTPSession
 public:
     RTPSessionImpl(const Ice::ObjectAdapterPtr&, const AsteriskSCF::Media::V1::FormatSeq&,
             pj_pool_factory*, const AsteriskSCF::System::Component::V1::ReplicaPtr&, 
-            const AsteriskSCF::SmartProxy::SmartProxy<AsteriskSCF::Media::RTP::V1::RtpStateReplicatorPrx>&);
+            const AsteriskSCF::Discovery::SmartProxy<AsteriskSCF::Media::RTP::V1::RtpStateReplicatorPrx>&);
     RTPSessionImpl(const Ice::ObjectAdapterPtr&, pj_pool_factory*, const Ice::Identity&, const Ice::Identity&,
             const Ice::Identity&, Ice::Int, const AsteriskSCF::Media::V1::FormatSeq&);
     AsteriskSCF::Media::V1::StreamSourceSeq getSources(const Ice::Current&);
diff --git a/src/RTPSink.cpp b/src/RTPSink.cpp
index fb612cb..5c591b3 100644
--- a/src/RTPSink.cpp
+++ b/src/RTPSink.cpp
@@ -14,16 +14,15 @@
  * at the top of the source tree.
  */
 
-#include <Ice/Ice.h>
-#include <IceUtil/UUID.h>
-
 #include <pjlib.h>
 #include <pjmedia.h>
 
+#include <Ice/Ice.h>
+#include <IceUtil/UUID.h>
+
 #include <AsteriskSCF/Media/MediaIf.h>
 #include <AsteriskSCF/Media/RTP/MediaRTPIf.h>
 #include <AsteriskSCF/System/Component/ReplicaIf.h>
-#include <AsteriskSCF/SmartProxy.h>
 
 #include "RtpStateReplicationIf.h"
 
diff --git a/src/RTPSource.cpp b/src/RTPSource.cpp
index 3c0539a..6a8e1a7 100644
--- a/src/RTPSource.cpp
+++ b/src/RTPSource.cpp
@@ -14,17 +14,15 @@
  * at the top of the source tree.
  */
 
-#include <Ice/Ice.h>
-#include <IceUtil/UUID.h>
-
 #include <pjlib.h>
 #include <pjmedia.h>
+#include <Ice/Ice.h>
+#include <IceUtil/UUID.h>
 
 #include <AsteriskSCF/Media/MediaIf.h>
 #include <AsteriskSCF/Media/RTP/MediaRTPIf.h>
 #include <AsteriskSCF/logger.h>
 #include <AsteriskSCF/System/Component/ReplicaIf.h>
-#include <AsteriskSCF/SmartProxy.h>
 
 #include "RtpStateReplicationIf.h"
 
diff --git a/src/RtpStateReplicator.h b/src/RtpStateReplicator.h
index b2db101..4ab9e64 100644
--- a/src/RtpStateReplicator.h
+++ b/src/RtpStateReplicator.h
@@ -18,24 +18,30 @@
 
 #include <Ice/Ice.h>
 
-#include <AsteriskSCF/StateReplicator.h>
-
+#include <AsteriskSCF/Replication/StateReplicator.h>
 #include "RtpStateReplicationIf.h"
+#include <boost/shared_ptr.hpp>
 
-using namespace AsteriskSCF::Media::RTP::V1;
+typedef AsteriskSCF::Replication::StateReplicator<
+    AsteriskSCF::Media::RTP::V1::RtpStateReplicator, 
+    AsteriskSCF::Media::RTP::V1::RtpStateItemPtr, 
+    std::string, AsteriskSCF::Media::RTP::V1::RtpStateReplicatorListenerPrx> RtpStateReplicatorI;
 
-typedef AsteriskSCF::StateReplication::StateReplicator<RtpStateReplicator, RtpStateItemPtr, std::string,
-                                                       RtpStateReplicatorListenerPrx> RtpStateReplicatorI;
 typedef IceUtil::Handle<RtpStateReplicatorI> RtpStateReplicatorIPtr;
 
-class RtpStateReplicatorListenerI : public RtpStateReplicatorListener
+//
+// Forward declaration.
+//
+struct RtpStateReplicatorListenerImpl;
+
+class RtpStateReplicatorListenerI : public AsteriskSCF::Media::RTP::V1::RtpStateReplicatorListener
 {
 public:
-    RtpStateReplicatorListenerI(const Ice::ObjectAdapterPtr&, pj_pool_factory*, const RtpGeneralStateItemPtr&);
-    ~RtpStateReplicatorListenerI();
+    RtpStateReplicatorListenerI(const Ice::ObjectAdapterPtr&, pj_pool_factory*, 
+      const AsteriskSCF::Media::RTP::V1::RtpGeneralStateItemPtr&);
     void stateRemoved(const Ice::StringSeq&, const Ice::Current&);
-    void stateSet(const RtpStateItemSeq&, const Ice::Current&);
+    void stateSet(const AsteriskSCF::Media::RTP::V1::RtpStateItemSeq&, const Ice::Current&);
     bool operator==(const RtpStateReplicatorListenerI &rhs);
 private:
-    struct RtpStateReplicatorListenerImpl *mImpl;
+    boost::shared_ptr<RtpStateReplicatorListenerImpl> mImpl;
 };
diff --git a/src/RtpStateReplicatorApp.cpp b/src/RtpStateReplicatorApp.cpp
index 78e8ae1..5c4476e 100644
--- a/src/RtpStateReplicatorApp.cpp
+++ b/src/RtpStateReplicatorApp.cpp
@@ -14,13 +14,13 @@
  * at the top of the source tree.
  */
 
+#include <pjlib.h>
+
 #include <Ice/Ice.h>
 #include <IceUtil/UUID.h>
 #include <IceStorm/IceStorm.h>
 #include <IceBox/IceBox.h>
 
-#include <pjlib.h>
-
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
 #include <AsteriskSCF/System/Component/ComponentServiceIf.h>
 #include <AsteriskSCF/Logger/IceLogger.h>
diff --git a/src/RtpStateReplicatorListener.cpp b/src/RtpStateReplicatorListener.cpp
index a42c7b5..fd5694c 100644
--- a/src/RtpStateReplicatorListener.cpp
+++ b/src/RtpStateReplicatorListener.cpp
@@ -13,17 +13,15 @@
  * 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 <IceUtil/UUID.h>
 
 #include <boost/thread.hpp>
 #include <boost/shared_ptr.hpp>
 
-#include <pjlib.h>
-#include <pjmedia.h>
-
 #include <AsteriskSCF/System/Component/ReplicaIf.h>
-#include <AsteriskSCF/SmartProxy.h>
 
 #include "RtpStateReplicator.h"
 #include "RTPSession.h"
@@ -149,11 +147,8 @@ public:
 
 RtpStateReplicatorListenerI::RtpStateReplicatorListenerI(const Ice::ObjectAdapterPtr& adapter,
         pj_pool_factory *poolFactory, const RtpGeneralStateItemPtr& generalState)
-    : mImpl(new RtpStateReplicatorListenerImpl(adapter, poolFactory, generalState)) {}
-
-RtpStateReplicatorListenerI::~RtpStateReplicatorListenerI()
+    : mImpl(new RtpStateReplicatorListenerImpl(adapter, poolFactory, generalState)) 
 {
-    delete mImpl;
 }
 
 void RtpStateReplicatorListenerI::stateRemoved(const Ice::StringSeq& itemKeys, const Ice::Current&)

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


-- 
asterisk-scf/release/media_rtp_pjmedia.git



More information about the asterisk-scf-commits mailing list