[asterisk-scf-commits] asterisk-scf/integration/media_rtp_pjmedia.git branch "single-build-dir" created.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Tue Apr 26 09:06:16 CDT 2011
branch "single-build-dir" has been created
at 46adbee014c9cccafd5b2442bfb7e11468b78b33 (commit)
- Log -----------------------------------------------------------------
commit 46adbee014c9cccafd5b2442bfb7e11468b78b33
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Mon Apr 25 17:48:25 2011 -0500
Changes to work with new single-build-directory CMake script.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a60eae4..b74377d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,9 +26,6 @@ if(NOT integrated_build STREQUAL "true")
pjproject_build(pjmedia)
pjproject_build(third_party)
- # This project is C++ based and requires a minimum of 3.4
- asterisk_scf_project(media_rtp_pjmedia 3.4 CXX)
-
# Knock out slice definitions
add_subdirectory(slice EXCLUDE_FROM_ALL)
@@ -38,6 +35,7 @@ if(NOT integrated_build STREQUAL "true")
set(integrated_build false)
endif()
+asterisk_scf_project(media_rtp_pjmedia 3.4)
+
add_subdirectory(src)
-add_subdirectory(config)
add_subdirectory(test)
diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt
deleted file mode 100644
index 6d62851..0000000
--- a/config/CMakeLists.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# Asterisk Scalable Communications Framework
-#
-# Copyright (C) 2010 -- Digium, Inc.
-#
-# All rights reserved.
-#
-
-configure_file(test_component.config.in test_component.config)
diff --git a/config/test_component.config.in b/config/test_component.config
similarity index 80%
rename from config/test_component.config.in
rename to config/test_component.config
index f4c470d..d6f9481 100644
--- a/config/test_component.config.in
+++ b/config/test_component.config
@@ -8,7 +8,7 @@ IceBox.InheritProperties=1
IceBox.LoadOrder=ServiceDiscovery,RtpStateReplicator,MediaRTPpjmedia,MediaRTPpjmediaTest
# RtpStateReplicator Configuration
-IceBox.Service.RtpStateReplicator=../src at RtpStateReplicator:create
+IceBox.Service.RtpStateReplicator=RtpStateReplicator:create
# Adapter parameters for this component
RtpStateReplicator.Endpoints=tcp:udp
@@ -23,7 +23,7 @@ LocatorService.Proxy=LocatorService:tcp -p 4411
# media_rtp_pjmedia Configuration
#
-IceBox.Service.MediaRTPpjmedia=../src at media_rtp_pjmedia:create
+IceBox.Service.MediaRTPpjmedia=media_rtp_pjmedia:create
# Adapter parameters for this component
MediaRTPpjmediaAdapter.Endpoints=default
@@ -40,13 +40,13 @@ ServiceLocatorProxy=LocatorService:tcp -p 4411
# media_rtp_pjmedia_test Configuration
#
-IceBox.Service.MediaRTPpjmediaTest=../test at media_rtp_pjmedia_test:create --report_sink=${CMAKE_BINARY_DIR}/media_rtp_pjmedia_test-result.xml --report_format=XML --report_level=detailed
+IceBox.Service.MediaRTPpjmediaTest=media_rtp_pjmedia_test:create
#
# Service Locator Configuration
#
-IceBox.Service.ServiceDiscovery=${service_locator_bindir}/src at service_locator:create
+IceBox.Service.ServiceDiscovery=service_locator:create
AsteriskSCFIceStorm.InstanceName=AsteriskSCFIceStorm
AsteriskSCFIceStorm.TopicManager.Endpoints=default -p 10000
diff --git a/config/test_media_rtp_pjmedia.conf b/config/test_media_rtp_pjmedia.conf
index f7015b2..3a451da 100644
--- a/config/test_media_rtp_pjmedia.conf
+++ b/config/test_media_rtp_pjmedia.conf
@@ -1,5 +1,5 @@
# This is a configuration file used in conjunction with the pjmedia rtp component test driver
-IceBox.InheritProperties = 1
+IceBox.InheritProperties=1
IceBox.Service.MediaRTPpjmedia=media_rtp_pjmedia:create
# Adapter parameters for this component
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 5ca2576..117f097 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -18,5 +18,5 @@ target_link_libraries(media_rtp_pjmedia_test asterisk-scf-api)
# integration test
if(integrated_build STREQUAL "true")
- icebox_add_test(media_rtp_pjmedia_test ../config/test_component.config)
+ asterisk_scf_test_icebox(media_rtp_pjmedia_test config/test_component.config)
endif()
commit 8f8692cd47c17cbfac081f3c69ab3f270acddcc6
Author: Brent Eagles <beagles at digium.com>
Date: Fri Apr 22 14:56:20 2011 -0230
Add ASTERISK_SCF_ICEBOX_EXPORT specification to the service entry point.
diff --git a/test/TestRTPpjmedia.cpp b/test/TestRTPpjmedia.cpp
index 211297c..a13f157 100644
--- a/test/TestRTPpjmedia.cpp
+++ b/test/TestRTPpjmedia.cpp
@@ -1069,7 +1069,7 @@ void MediaRTPpjmediaTest::stop()
extern "C"
{
-IceBox::Service* create(Ice::CommunicatorPtr)
+ASTERISK_SCF_ICEBOX_EXPORT IceBox::Service* create(Ice::CommunicatorPtr)
{
return new MediaRTPpjmediaTest;
}
commit 6359f9d3d8edea8e3b27dfa59bc81deb1a9d2fc0
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Thu Apr 14 14:42:03 2011 -0500
Resolve another unused variable warning.
diff --git a/src/RTPSource.cpp b/src/RTPSource.cpp
index 8bebcb7..3c0539a 100644
--- a/src/RTPSource.cpp
+++ b/src/RTPSource.cpp
@@ -218,7 +218,7 @@ static void receiveRTP(void *userdata, void *packet, pj_ssize_t size)
{
source->mImpl->mSourceStateItem->mSink->write(frames);
}
- catch (const Ice::Exception& ex)
+ catch (const Ice::Exception&)
{
lg(Error) << "Exception caught while attempting to write media to an RTP sink";
}
commit d49f78113d8222ec5b2a7a530332ec78962c9031
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Thu Apr 14 13:25:27 2011 -0500
Minor fixes for various code constructs that trip up GCC with new warning
options enabled (-Wextra, -Wconversion, -Wformat, and others).
diff --git a/src/MediaRTPpjmedia.cpp b/src/MediaRTPpjmedia.cpp
index f041e4f..3c1343e 100644
--- a/src/MediaRTPpjmedia.cpp
+++ b/src/MediaRTPpjmedia.cpp
@@ -351,8 +351,8 @@ RTPSessionPrx RTPMediaServiceImpl::allocate(const FormatSeq& formats, const Ice:
/**
* Implementation of the IceBox::Service::start method.
*/
-void MediaRTPpjmediaApp::start(const std::string& name, const Ice::CommunicatorPtr& communicator,
- const Ice::StringSeq& args)
+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.
@@ -490,7 +490,7 @@ void MediaRTPpjmediaApp::stop()
extern "C"
{
-ASTERISK_SCF_ICEBOX_EXPORT IceBox::Service* create(Ice::CommunicatorPtr communicator)
+ASTERISK_SCF_ICEBOX_EXPORT IceBox::Service* create(Ice::CommunicatorPtr)
{
return new MediaRTPpjmediaApp;
}
diff --git a/src/RTPSession.cpp b/src/RTPSession.cpp
index d4e0381..2ab6074 100644
--- a/src/RTPSession.cpp
+++ b/src/RTPSession.cpp
@@ -342,7 +342,7 @@ FormatSeq RTPSessionImpl::getFormats()
/**
* API call which calls into RTPSourceImpl in order to setup transport.
*/
-void RTPSessionImpl::setRemoteDetails(const string& address, int port)
+void RTPSessionImpl::setRemoteDetails(const string& address, Ice::Int port)
{
mImpl->mStreamSource->setRemoteDetails(address, port);
}
diff --git a/src/RTPSession.h b/src/RTPSession.h
index 4929906..a8e4b7a 100644
--- a/src/RTPSession.h
+++ b/src/RTPSession.h
@@ -56,7 +56,7 @@ public:
pjmedia_transport* getTransport();
AsteriskSCF::Media::V1::FormatSeq getFormats();
void associatePayloads(const AsteriskSCF::Media::RTP::V1::PayloadMap&, const Ice::Current&);
- void setRemoteDetails(const std::string& address, int port);
+ void setRemoteDetails(const std::string& address, Ice::Int port);
AsteriskSCF::Media::V1::FormatPtr getFormat(int payload);
int getPayload(const AsteriskSCF::Media::V1::FormatPtr& mediaformat);
StreamSourceRTPImplPtr getSource();
diff --git a/src/RTPSink.cpp b/src/RTPSink.cpp
index 2324799..fb612cb 100644
--- a/src/RTPSink.cpp
+++ b/src/RTPSink.cpp
@@ -115,8 +115,8 @@ void StreamSinkRTPImpl::write(const AsteriskSCF::Media::V1::FrameSeq& frames, co
/* Using the available information construct an RTP header that we can place at the front of our packet */
pj_status_t status = pjmedia_rtp_encode_rtp(&mImpl->mOutgoingSession,
- mImpl->mSession->getPayload((*frame)->mediaformat), 0, (*frame)->payload.size(),
- (*frame)->payload.size(), &header, &header_len);
+ mImpl->mSession->getPayload((*frame)->mediaformat), 0, (int) (*frame)->payload.size(),
+ (int) (*frame)->payload.size(), &header, &header_len);
if (status != PJ_SUCCESS)
{
diff --git a/src/RTPSource.cpp b/src/RTPSource.cpp
index 9d45920..8bebcb7 100644
--- a/src/RTPSource.cpp
+++ b/src/RTPSource.cpp
@@ -176,7 +176,10 @@ static void receiveRTP(void *userdata, void *packet, pj_ssize_t size)
Ice::Byte* payload;
unsigned int payload_size;
- pj_status_t status = pjmedia_rtp_decode_rtp(&source->mImpl->mIncomingSession, packet, size, &header,
+ /* We have to cast 'size' to an 'int' here so the compiler won't warn about
+ * doing it implicitly.
+ */
+ pj_status_t status = pjmedia_rtp_decode_rtp(&source->mImpl->mIncomingSession, packet, (int) size, &header,
(const void**)&payload, &payload_size);
if (status != PJ_SUCCESS)
@@ -229,7 +232,7 @@ static void receiveRTP(void *userdata, void *packet, pj_ssize_t size)
/**
* API call which sets up our pjmedia transport and allows media to be sent and received.
*/
-void StreamSourceRTPImpl::setRemoteDetails(const string& address, int port)
+void StreamSourceRTPImpl::setRemoteDetails(const string& address, Ice::Int port)
{
pj_sockaddr_in sin;
@@ -238,7 +241,7 @@ void StreamSourceRTPImpl::setRemoteDetails(const string& address, int port)
pj_strset(&tmpAddress, (char*)address.c_str(), address.size());
/* Now for the next trick - convert into a pj_sockaddr_in so we can pass it to pjmedia_transport_attach */
- pj_sockaddr_in_init(&sin, &tmpAddress, port);
+ pj_sockaddr_in_init(&sin, &tmpAddress, (pj_uint16_t) port);
/* In case we were already attached go ahead and detach */
pjmedia_transport_detach(mImpl->mSession->getTransport(), this);
diff --git a/src/RTPSource.h b/src/RTPSource.h
index d7373e7..d12bc48 100644
--- a/src/RTPSource.h
+++ b/src/RTPSource.h
@@ -29,7 +29,7 @@ public:
void requestFormat(const AsteriskSCF::Media::V1::FormatPtr&, const Ice::Current&);
std::string getLocalAddress(const Ice::Current&);
Ice::Int getLocalPort(const Ice::Current&);
- void setRemoteDetails(const std::string& address, int port);
+ void setRemoteDetails(const std::string& address, Ice::Int port);
AsteriskSCF::Media::RTP::V1::RtpStreamSourceStateItemPtr getStateItem();
/**
diff --git a/src/RtpStateReplicatorApp.cpp b/src/RtpStateReplicatorApp.cpp
index 91c0e37..78e8ae1 100644
--- a/src/RtpStateReplicatorApp.cpp
+++ b/src/RtpStateReplicatorApp.cpp
@@ -213,7 +213,7 @@ void RtpStateReplicatorService::initialize(const string& appName, const Ice::Com
mAdapter->activate();
}
-void RtpStateReplicatorService::start(const string &name, const Ice::CommunicatorPtr& ic, const Ice::StringSeq& args)
+void RtpStateReplicatorService::start(const string &name, const Ice::CommunicatorPtr& ic, const Ice::StringSeq&)
{
initialize(name, ic);
// Plug into the Asterisk SCF discovery system so that the interfaces we provide
@@ -229,7 +229,7 @@ void RtpStateReplicatorService::stop()
extern "C"
{
-ASTERISK_SCF_ICEBOX_EXPORT IceBox::Service* create(Ice::CommunicatorPtr communicator)
+ASTERISK_SCF_ICEBOX_EXPORT IceBox::Service* create(Ice::CommunicatorPtr)
{
return new RtpStateReplicatorService;
}
diff --git a/test/TestRTPpjmedia.cpp b/test/TestRTPpjmedia.cpp
index 7432c04..211297c 100644
--- a/test/TestRTPpjmedia.cpp
+++ b/test/TestRTPpjmedia.cpp
@@ -135,7 +135,7 @@ public:
};
static SharedTestData Testbed;
-void TestRtpReplicatorListener::stateRemoved(const Ice::StringSeq& items, const Ice::Current&)
+void TestRtpReplicatorListener::stateRemoved(const Ice::StringSeq&, const Ice::Current&)
{
}
@@ -1041,9 +1041,9 @@ BOOST_AUTO_TEST_CASE(ReleaseRTPSession)
BOOST_CHECK(released);
}
-void MediaRTPpjmediaTest::start(std::string const &name,
- Ice::CommunicatorPtr const &communicator,
- Ice::StringSeq const &args)
+void MediaRTPpjmediaTest::start(std::string const& name,
+ Ice::CommunicatorPtr const&,
+ Ice::StringSeq const& args)
{
std::vector<char const *> argv;
argv.push_back(name.c_str());
@@ -1052,11 +1052,11 @@ void MediaRTPpjmediaTest::start(std::string const &name,
++i)
{
argv.push_back(i->c_str());
+ mCachedArgs.argc++;
}
// null terminated list
argv.push_back((const char *) 0);
- mCachedArgs.argc = argv.size() - 1;
mCachedArgs.argv = (char**)&argv[0];
int r = ::boost::unit_test::unit_test_main(&init_unit_test, mCachedArgs.argc, mCachedArgs.argv);
@@ -1069,7 +1069,7 @@ void MediaRTPpjmediaTest::stop()
extern "C"
{
-IceBox::Service* create(Ice::CommunicatorPtr communicator)
+IceBox::Service* create(Ice::CommunicatorPtr)
{
return new MediaRTPpjmediaTest;
}
commit 85553b42ab3952da5bc79b551aa1f1010b0c6f85
Author: Mark Michelson <mmichelson at digium.com>
Date: Thu Apr 14 09:32:41 2011 -0500
Add try-catch block around RTPSink::write() operation.
When testing RTP state replication, this will throw an exception
on startup. This is harmless and just needs to be caught.
diff --git a/src/RTPSource.cpp b/src/RTPSource.cpp
index 7e0450b..9d45920 100644
--- a/src/RTPSource.cpp
+++ b/src/RTPSource.cpp
@@ -211,7 +211,14 @@ static void receiveRTP(void *userdata, void *packet, pj_ssize_t size)
frames.push_back(frame);
}
- source->mImpl->mSourceStateItem->mSink->write(frames);
+ try
+ {
+ source->mImpl->mSourceStateItem->mSink->write(frames);
+ }
+ catch (const Ice::Exception& ex)
+ {
+ lg(Error) << "Exception caught while attempting to write media to an RTP sink";
+ }
}
}
commit 70bd6106cdd277a8994b27d62c836deb2c83ed81
Author: Joshua Colp <jcolp at digium.com>
Date: Wed Apr 13 22:46:52 2011 -0300
Fix RTP state replication and unit test.
diff --git a/src/RtpStateReplicatorListener.cpp b/src/RtpStateReplicatorListener.cpp
index b342b7f..a42c7b5 100644
--- a/src/RtpStateReplicatorListener.cpp
+++ b/src/RtpStateReplicatorListener.cpp
@@ -80,12 +80,12 @@ public:
private:
RtpStateReplicatorListenerImpl *mImpl;
- void visitGeneral(const RtpGeneralStateItemPtr &item, const Ice::Current &)
+ void visitRtpGeneralStateItem(const RtpGeneralStateItemPtr &item)
{
mImpl->mGeneralState->mServiceManagement = item->mServiceManagement;
}
- void visitSession(const RtpSessionStateItemPtr &item, const Ice::Current &)
+ void visitRtpSessionStateItem(const RtpSessionStateItemPtr &item)
{
map<string, boost::shared_ptr<RtpStateReplicatorItem> >::iterator i = mImpl->mStateItems.find(item->mSessionId);
boost::shared_ptr<RtpStateReplicatorItem> localitem;
@@ -109,7 +109,7 @@ public:
localitem->getSession()->associatePayloads(item->mPayloadstoFormats, Ice::Current());
}
- void visitStreamSink(const RtpStreamSinkStateItemPtr &item, const Ice::Current &)
+ void visitRtpStreamSinkStateItem(const RtpStreamSinkStateItemPtr &item)
{
map<string, boost::shared_ptr<RtpStateReplicatorItem> >::iterator i =
mImpl->mStateItems.find(item->mSessionId);
@@ -121,7 +121,7 @@ public:
}
}
- void visitStreamSource(const RtpStreamSourceStateItemPtr &item, const Ice::Current &)
+ void visitRtpStreamSourceStateItem(const RtpStreamSourceStateItemPtr &item)
{
map<string, boost::shared_ptr<RtpStateReplicatorItem> >::iterator i =
mImpl->mStateItems.find(item->mSessionId);
diff --git a/test/TestRTPpjmedia.cpp b/test/TestRTPpjmedia.cpp
index 2195a90..7432c04 100644
--- a/test/TestRTPpjmedia.cpp
+++ b/test/TestRTPpjmedia.cpp
@@ -151,32 +151,32 @@ void TestRtpReplicatorListener::stateSet(const RtpStateItemSeq& items, const Ice
private:
TestRtpReplicatorListener *mListener;
- void visitGeneral(const RtpGeneralStateItemPtr &item, const Ice::Current &)
+ void visitRtpGeneralStateItem(const RtpGeneralStateItemPtr &item)
{
- mListener->mGeneral = item;
- boost::mutex::scoped_lock lock(Testbed.mLock);
- Testbed.mCondition.notify_one();
+ boost::mutex::scoped_lock lock(Testbed.mLock);
+ mListener->mGeneral = item;
+ Testbed.mCondition.notify_one();
}
- void visitSession(const RtpSessionStateItemPtr &item, const Ice::Current &)
+ void visitRtpSessionStateItem(const RtpSessionStateItemPtr &item)
{
- mListener->mSession = item;
- boost::mutex::scoped_lock lock(Testbed.mLock);
- Testbed.mCondition.notify_one();
+ boost::mutex::scoped_lock lock(Testbed.mLock);
+ mListener->mSession = item;
+ Testbed.mCondition.notify_one();
}
- void visitStreamSink(const RtpStreamSinkStateItemPtr &item, const Ice::Current &)
+ void visitRtpStreamSinkStateItem(const RtpStreamSinkStateItemPtr &item)
{
- mListener->mSink = item;
- boost::mutex::scoped_lock lock(Testbed.mLock);
- Testbed.mCondition.notify_one();
+ boost::mutex::scoped_lock lock(Testbed.mLock);
+ mListener->mSink = item;
+ Testbed.mCondition.notify_one();
}
- void visitStreamSource(const RtpStreamSourceStateItemPtr &item, const Ice::Current &)
+ void visitRtpStreamSourceStateItem(const RtpStreamSourceStateItemPtr &item)
{
- mListener->mSource = item;
- boost::mutex::scoped_lock lock(Testbed.mLock);
- Testbed.mCondition.notify_one();
+ boost::mutex::scoped_lock lock(Testbed.mLock);
+ mListener->mSource = item;
+ Testbed.mCondition.notify_one();
}
};
@@ -197,9 +197,9 @@ public:
*/
void write(const AsteriskSCF::Media::V1::FrameSeq& frames, const Ice::Current&)
{
- Testbed.frames = frames;
- boost::mutex::scoped_lock lock(Testbed.mLock);
- Testbed.mCondition.notify_one();
+ boost::mutex::scoped_lock lock(Testbed.mLock);
+ Testbed.frames = frames;
+ Testbed.mCondition.notify_one();
}
/**
@@ -388,8 +388,12 @@ BOOST_AUTO_TEST_CASE(AddListenertoStateReplicator)
BOOST_AUTO_TEST_CASE(CheckReplicatedGeneralStateItem)
{
// Since the RTP component is using a oneway invocation we wait here to ensure that the packet has been sent and processed
- boost::mutex::scoped_lock lock(Testbed.mLock);
+ boost::mutex::scoped_lock lock(Testbed.mLock);
+
+ if (!Testbed.mListener->mGeneral)
+ {
Testbed.mCondition.wait(lock);
+ }
BOOST_CHECK(Testbed.mListener->mGeneral);
}
@@ -415,11 +419,13 @@ BOOST_AUTO_TEST_CASE(AllocateRTPSession)
FormatSeq formats;
formats.push_back(format);
+ // You might think "geez, this should deadlock due to state replication" but no, we use one ways for that
+ boost::mutex::scoped_lock lock(Testbed.mLock);
+
Testbed.session = service->allocate(formats);
// Give the RTP component time to replicate this session
- boost::mutex::scoped_lock lock(Testbed.mLock);
- Testbed.mCondition.wait(lock);
+ Testbed.mCondition.wait(lock);
allocated = true;
}
@@ -776,12 +782,14 @@ BOOST_AUTO_TEST_CASE(SetupLoopback)
/* Okay, changing the remote details of the first sink should have it send media to the above. */
StreamSinkSeq sinks = Testbed.session->getSinks();
StreamSinkRTPPrx sink = StreamSinkRTPPrx::uncheckedCast(sinks.front());
+
+ boost::mutex::scoped_lock lock(Testbed.mLock);
+
sink->setRemoteDetails(address, port);
looped = true;
- boost::mutex::scoped_lock lock(Testbed.mLock);
- Testbed.mCondition.wait(lock);
+ Testbed.mCondition.wait(lock);
}
catch (const Ice::Exception &e)
{
@@ -849,12 +857,14 @@ BOOST_AUTO_TEST_CASE(TransmitandReceiveFrame)
StreamSinkSeq sinks = Testbed.session->getSinks();
StreamSinkRTPPrx sink = StreamSinkRTPPrx::uncheckedCast(sinks.front());
+
+ boost::mutex::scoped_lock lock(Testbed.mLock);
+
sink->write(frames);
/* It takes time for the packet to get sent and received so we wait until we get it here.
*/
- boost::mutex::scoped_lock lock(Testbed.mLock);
- Testbed.mCondition.wait(lock);
+ Testbed.mCondition.wait(lock);
/* We only sent a single frame, so we should only get a single frame. */
AudioFramePtr received_frame;
commit 7e3d172b518669dff018e3177ceb2b13cf80a3b8
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Tue Apr 12 16:35:19 2011 -0500
Resolve some variable shadowing warnings.
diff --git a/src/RtpStateReplicatorListener.cpp b/src/RtpStateReplicatorListener.cpp
index b47f408..b342b7f 100644
--- a/src/RtpStateReplicatorListener.cpp
+++ b/src/RtpStateReplicatorListener.cpp
@@ -73,31 +73,31 @@ public:
class visitor : public AsteriskSCF::Media::RTP::V1::RtpStateItemVisitor
{
public:
- visitor(RtpStateReplicatorListenerImpl *impl) : impl(impl)
+ visitor(RtpStateReplicatorListenerImpl *impl) : mImpl(impl)
{
}
private:
- RtpStateReplicatorListenerImpl *impl;
+ RtpStateReplicatorListenerImpl *mImpl;
void visitGeneral(const RtpGeneralStateItemPtr &item, const Ice::Current &)
{
- impl->mGeneralState->mServiceManagement = item->mServiceManagement;
+ mImpl->mGeneralState->mServiceManagement = item->mServiceManagement;
}
void visitSession(const RtpSessionStateItemPtr &item, const Ice::Current &)
{
- map<string, boost::shared_ptr<RtpStateReplicatorItem> >::iterator i = impl->mStateItems.find(item->mSessionId);
+ map<string, boost::shared_ptr<RtpStateReplicatorItem> >::iterator i = mImpl->mStateItems.find(item->mSessionId);
boost::shared_ptr<RtpStateReplicatorItem> localitem;
- if (i == impl->mStateItems.end())
+ if (i == mImpl->mStateItems.end())
{
boost::shared_ptr<RtpStateReplicatorItem> newitem(new RtpStateReplicatorItem());
localitem = newitem;
- impl->mStateItems.insert(make_pair(item->mSessionId, newitem));
+ mImpl->mStateItems.insert(make_pair(item->mSessionId, newitem));
RTPSessionImplPtr localSession =
- new RTPSessionImpl(impl->mAdapter, impl->mPoolFactory, item->mSessionIdentity,
+ new RTPSessionImpl(mImpl->mAdapter, mImpl->mPoolFactory, item->mSessionIdentity,
item->mSinkIdentity, item->mSourceIdentity, item->mPort, item->mFormats);
localitem->setSession(localSession);
}
@@ -112,8 +112,8 @@ public:
void visitStreamSink(const RtpStreamSinkStateItemPtr &item, const Ice::Current &)
{
map<string, boost::shared_ptr<RtpStateReplicatorItem> >::iterator i =
- impl->mStateItems.find(item->mSessionId);
- if (i != impl->mStateItems.end())
+ mImpl->mStateItems.find(item->mSessionId);
+ if (i != mImpl->mStateItems.end())
{
i->second->getSession()->getSink()->setSource(item->mSource, Ice::Current());
i->second->getSession()->getSink()->setRemoteDetails(item->mRemoteAddress, item->mRemotePort,
@@ -124,8 +124,8 @@ public:
void visitStreamSource(const RtpStreamSourceStateItemPtr &item, const Ice::Current &)
{
map<string, boost::shared_ptr<RtpStateReplicatorItem> >::iterator i =
- impl->mStateItems.find(item->mSessionId);
- if (i != impl->mStateItems.end())
+ mImpl->mStateItems.find(item->mSessionId);
+ if (i != mImpl->mStateItems.end())
{
i->second->getSession()->getSource()->setSink(item->mSink, Ice::Current());
}
diff --git a/test/TestRTPpjmedia.cpp b/test/TestRTPpjmedia.cpp
index f03cb72..2195a90 100644
--- a/test/TestRTPpjmedia.cpp
+++ b/test/TestRTPpjmedia.cpp
@@ -144,37 +144,37 @@ void TestRtpReplicatorListener::stateSet(const RtpStateItemSeq& items, const Ice
class visitor : public AsteriskSCF::Media::RTP::V1::RtpStateItemVisitor
{
public:
- visitor(TestRtpReplicatorListener *listener) : listener(listener)
+ visitor(TestRtpReplicatorListener *listener) : mListener(listener)
{
}
private:
- TestRtpReplicatorListener *listener;
+ TestRtpReplicatorListener *mListener;
void visitGeneral(const RtpGeneralStateItemPtr &item, const Ice::Current &)
{
- listener->mGeneral = item;
+ mListener->mGeneral = item;
boost::mutex::scoped_lock lock(Testbed.mLock);
Testbed.mCondition.notify_one();
}
void visitSession(const RtpSessionStateItemPtr &item, const Ice::Current &)
{
- listener->mSession = item;
+ mListener->mSession = item;
boost::mutex::scoped_lock lock(Testbed.mLock);
Testbed.mCondition.notify_one();
}
void visitStreamSink(const RtpStreamSinkStateItemPtr &item, const Ice::Current &)
{
- listener->mSink = item;
+ mListener->mSink = item;
boost::mutex::scoped_lock lock(Testbed.mLock);
Testbed.mCondition.notify_one();
}
void visitStreamSource(const RtpStreamSourceStateItemPtr &item, const Ice::Current &)
{
- listener->mSource = item;
+ mListener->mSource = item;
boost::mutex::scoped_lock lock(Testbed.mLock);
Testbed.mCondition.notify_one();
}
commit bd6452ec09f440b872d99b2b56b818d0b816ff78
Merge: c62a171 5a8aa0e
Author: Brent Eagles <beagles at digium.com>
Date: Fri Apr 1 13:18:35 2011 -0230
Merge branch 'code-conventions'.
commit c62a171fb8baea2a25b3fc817d96aa186e98db32
Author: Brent Eagles <beagles at digium.com>
Date: Thu Mar 31 11:07:51 2011 -0230
Add unsliceable keyword where appropriate.
diff --git a/local-slice/RtpStateReplicationIf.ice b/local-slice/RtpStateReplicationIf.ice
index 46a5014..254b50e 100644
--- a/local-slice/RtpStateReplicationIf.ice
+++ b/local-slice/RtpStateReplicationIf.ice
@@ -38,7 +38,7 @@ module V1
const string StateReplicatorComponentCategory = "RtpStateReplicatorComponent";
const string StateReplicatorDiscoveryCategory = "RtpStateReplicator";
- class RtpStateReplicatorParams extends AsteriskSCF::Core::Discovery::V1::ServiceLocatorParams
+ unsliceable class RtpStateReplicatorParams extends AsteriskSCF::Core::Discovery::V1::ServiceLocatorParams
{
string mName;
};
-----------------------------------------------------------------------
--
asterisk-scf/integration/media_rtp_pjmedia.git
More information about the asterisk-scf-commits
mailing list