[asterisk-scf-commits] asterisk-scf/integration/media_rtp_pjmedia.git branch "replication" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Wed Dec 8 17:06:34 CST 2010
branch "replication" has been updated
via 6534181ea193e0e6c614ea14a71f10c84cbeed5a (commit)
via 160856a3f0f05b6f23580f7f591d638510012775 (commit)
via e16ddb6f9a4951516501ab16aa305f8d09dc88aa (commit)
via 3780d6e57b210e6aac21c29de3b77ea757c416a3 (commit)
via f7c52d1d025e2d08634d593567ef72c21effa69e (commit)
from c19ee91ad54021f1842572f83640587604aa4266 (commit)
Summary of changes:
config/test_media_rtp_pjmedia.conf | 3 ++-
src/MediaRTPpjmedia.cpp | 4 ++--
src/RTPSession.cpp | 12 ++++++++++--
src/RtpStateReplicatorListener.cpp | 2 +-
4 files changed, 15 insertions(+), 6 deletions(-)
- Log -----------------------------------------------------------------
commit 6534181ea193e0e6c614ea14a71f10c84cbeed5a
Author: Joshua Colp <jcolp at digium.com>
Date: Wed Dec 8 19:05:45 2010 -0400
Pass the global adapter to the state listener since that is where sessions/sources/sinks should be added to.
diff --git a/src/MediaRTPpjmedia.cpp b/src/MediaRTPpjmedia.cpp
index c95c96c..407ffb3 100644
--- a/src/MediaRTPpjmedia.cpp
+++ b/src/MediaRTPpjmedia.cpp
@@ -419,7 +419,7 @@ void MediaRTPpjmediaApp::start(const std::string& name, const Ice::CommunicatorP
if (mStateReplicator)
{
- mReplicatorListener = new RtpStateReplicatorListenerI(mLocalAdapter, rtpmediaservice->getPoolFactory());
+ mReplicatorListener = new RtpStateReplicatorListenerI(mGlobalAdapter, rtpmediaservice->getPoolFactory());
mReplicatorListenerProxy = RtpStateReplicatorListenerPrx::uncheckedCast(mLocalAdapter->addWithUUID(mReplicatorListener));
if (mCommunicator->getProperties()->getPropertyWithDefault("Rtp.StateReplicatorListener", "no") == "yes")
commit 160856a3f0f05b6f23580f7f591d638510012775
Author: Joshua Colp <jcolp at digium.com>
Date: Wed Dec 8 18:46:50 2010 -0400
Specify a port for replication purposes, and use a specific adapter for the logger.
diff --git a/config/test_media_rtp_pjmedia.conf b/config/test_media_rtp_pjmedia.conf
index 2d75ff3..f7015b2 100644
--- a/config/test_media_rtp_pjmedia.conf
+++ b/config/test_media_rtp_pjmedia.conf
@@ -3,7 +3,8 @@ IceBox.InheritProperties = 1
IceBox.Service.MediaRTPpjmedia=media_rtp_pjmedia:create
# Adapter parameters for this component
-MediaRTPpjmediaAdapter.Endpoints=default
+MediaRTPpjmediaAdapter.Endpoints=tcp -p 4423
+MediaRTPpjmediaAdapterLogger.Endpoints=default
MediaRTPpjmediaAdapterLocal.Endpoints=default
# A proxy to the service locator management service
diff --git a/src/MediaRTPpjmedia.cpp b/src/MediaRTPpjmedia.cpp
index 1b2db05..c95c96c 100644
--- a/src/MediaRTPpjmedia.cpp
+++ b/src/MediaRTPpjmedia.cpp
@@ -345,7 +345,7 @@ void MediaRTPpjmediaApp::start(const std::string& name, const Ice::CommunicatorP
// 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(
- "MediaRTPpjmediaAdapter");
+ "MediaRTPpjmediaAdapterLogger");
ConfiguredIceLoggerPtr iceLogger = createIceLogger(mLoggerAdapter);
getLoggerFactory().setLogOutput(iceLogger->getLogger());
mLoggerAdapter->activate();
commit e16ddb6f9a4951516501ab16aa305f8d09dc88aa
Author: Joshua Colp <jcolp at digium.com>
Date: Wed Dec 8 18:35:37 2010 -0400
Move setting of localitem. This is close to working! Yahoo!
diff --git a/src/RtpStateReplicatorListener.cpp b/src/RtpStateReplicatorListener.cpp
index 423f8ef..23e0d33 100644
--- a/src/RtpStateReplicatorListener.cpp
+++ b/src/RtpStateReplicatorListener.cpp
@@ -80,8 +80,8 @@ public:
if (i == mStateItems.end())
{
boost::shared_ptr<RtpStateReplicatorItem> newitem(new RtpStateReplicatorItem());
- mStateItems.insert(std::make_pair<std::string, boost::shared_ptr<RtpStateReplicatorItem> >((*item)->mSessionId, newitem));
localitem = newitem;
+ mStateItems.insert(std::make_pair<std::string, boost::shared_ptr<RtpStateReplicatorItem> >((*item)->mSessionId, newitem));
RTPSessionImplPtr localSession = new RTPSessionImpl(mAdapter, mPoolFactory, session->mSessionIdentity, session->mSinkIdentity,
session->mSourceIdentity, session->mPort, session->mFormats);
commit 3780d6e57b210e6aac21c29de3b77ea757c416a3
Author: Joshua Colp <jcolp at digium.com>
Date: Wed Dec 8 18:18:57 2010 -0400
We actually want these to exist but just be empty...
diff --git a/src/RTPSession.cpp b/src/RTPSession.cpp
index 218bc8a..15633ef 100644
--- a/src/RTPSession.cpp
+++ b/src/RTPSession.cpp
@@ -189,10 +189,10 @@ RTPSessionImpl::RTPSessionImpl(Ice::ObjectAdapterPtr adapter, pj_pool_factory* f
// TODO: This is also bad, something is using the port */
}
- mImpl->mStreamSource = new StreamSourceRTPImpl(this, 0);
+ mImpl->mStreamSource = new StreamSourceRTPImpl(this, "");
mImpl->mStreamSourceProxy = StreamSourceRTPPrx::uncheckedCast(mImpl->mAdapter->add(mImpl->mStreamSource, sourceIdentity));
- mImpl->mStreamSink = new StreamSinkRTPImpl(this, 0);
+ mImpl->mStreamSink = new StreamSinkRTPImpl(this, "");
mImpl->mStreamSinkProxy = StreamSinkRTPPrx::uncheckedCast(mImpl->mAdapter->add(mImpl->mStreamSink, sinkIdentity));
}
commit f7c52d1d025e2d08634d593567ef72c21effa69e
Author: Joshua Colp <jcolp at digium.com>
Date: Wed Dec 8 18:05:16 2010 -0400
Add checks for replicating or removing state only when running in an active state and when a state replicator is present.
diff --git a/src/RTPSession.cpp b/src/RTPSession.cpp
index a3d1543..218bc8a 100644
--- a/src/RTPSession.cpp
+++ b/src/RTPSession.cpp
@@ -391,6 +391,10 @@ StreamSinkRTPPtr RTPSessionImpl::getSink()
void RTPSessionImpl::replicateState(RtpSessionStateItemPtr session, RtpStreamSinkStateItemPtr sink, RtpStreamSourceStateItemPtr source)
{
// If state replication has been disabled do nothing
+ if (!mImpl->mStateReplicator || mImpl->mReplicaService->isActive() == false)
+ {
+ return;
+ }
RtpStateItemSeq items;
@@ -430,6 +434,10 @@ void RTPSessionImpl::replicateState(RtpSessionStateItemPtr session, RtpStreamSin
void RTPSessionImpl::removeState(RtpSessionStateItemPtr session, RtpStreamSinkStateItemPtr sink, RtpStreamSourceStateItemPtr source)
{
// If state replication has been disabled do nothing
+ if (!mImpl->mStateReplicator || mImpl->mReplicaService->isActive() == false)
+ {
+ return;
+ }
Ice::StringSeq items;
-----------------------------------------------------------------------
--
asterisk-scf/integration/media_rtp_pjmedia.git
More information about the asterisk-scf-commits
mailing list