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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Jun 3 09:12:03 CDT 2011


branch "master" has been updated
       via  29d4f2f06467b3b03b09b79588d37ab7c5b452ca (commit)
      from  bc789938cc49587975f97a60d7bcb1a681ec981c (commit)

Summary of changes:
 src/MediaSplicer.cpp |   24 ++++++++++++++++++++----
 1 files changed, 20 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit 29d4f2f06467b3b03b09b79588d37ab7c5b452ca
Author: Brent Eagles <beagles at digium.com>
Date:   Fri Jun 3 11:41:26 2011 -0230

    Resolve a silly media connection issue where audio would not be connected properly.

diff --git a/src/MediaSplicer.cpp b/src/MediaSplicer.cpp
index 4bdcdae..7812b64 100755
--- a/src/MediaSplicer.cpp
+++ b/src/MediaSplicer.cpp
@@ -31,6 +31,10 @@
 // * Cleanup of MediaConnectorI.
 // * Conference bridging.
 //
+// NOTES: I suspect there is a lot of unnecessary work being done here if some reasonable distributed object
+// protocols are followed throughout. The incoming and outgoing pairings and the disconnect/reconnect
+// logic is also likely fraught with race conditions. I will be looking at this more detail IMMEDIATELY.
+//
 using namespace AsteriskSCF::System::Logging;
 using namespace AsteriskSCF::Media::V1;
 using namespace AsteriskSCF::Bridge::V1;
@@ -452,6 +456,10 @@ public:
     MediaConnectorPtr createConnector(const SessionWrapperPtr& session, const MediaConnectorBuilderPtr& data)
     {
         MediaConnectorIPtr connector(new MediaConnectorI(data, mBridgeId, session->id(), mReplicator, mLogger));
+
+        //
+        // TODO: check to make sure this isn't mirroring!
+        //
         if (data->peer)
         {
             data->peer->update(connector, data->outgoingPairings, data->incomingPairings);
@@ -533,7 +541,7 @@ public:
         return result;
     }
 
-    vector<OutgoingPairing> findCompatiblePairings(const StreamSinkSeq& sinks)
+    vector<OutgoingPairing> findCompatiblePairings(const AsteriskSCF::Media::V1::SessionPrx& sessionToBeConnected, const StreamSinkSeq& sinks)
     {
         vector<StreamSourceSeq> allSources;
 
@@ -545,6 +553,10 @@ public:
             //
             for (MediaSessions::iterator i = mSessions.begin(); i != mSessions.end(); ++i)
             {
+                if (i->mediaSession->ice_getIdentity() == sessionToBeConnected->ice_getIdentity())
+                {
+                    continue;
+                }
                 allSources.push_back(i->mediaSession->getSources());
             }
         }
@@ -578,7 +590,7 @@ public:
         return result;
     }
 
-    vector<IncomingPairing> findCompatiblePairings(const StreamSourceSeq& sources)
+    vector<IncomingPairing> findCompatiblePairings(const AsteriskSCF::Media::V1::SessionPrx& sessionToBeConnected, const StreamSourceSeq& sources)
     {
         vector<StreamSinkSeq> allSinks;
         {
@@ -589,6 +601,10 @@ public:
             //
             for (MediaSessions::iterator i = mSessions.begin(); i != mSessions.end(); ++i)
             {
+                if (i->mediaSession->ice_getIdentity() == sessionToBeConnected->ice_getIdentity())
+                {
+                    continue;
+                }
                 allSinks.push_back(i->mediaSession->getSinks());
             }
         }
@@ -791,8 +807,8 @@ public:
 protected:
     bool executeImpl()
     {
-        mMaterials->incomingPairings = mSplicer->findCompatiblePairings(mMaterials->sources);
-        mMaterials->outgoingPairings = mSplicer->findCompatiblePairings(mMaterials->sinks);
+        mMaterials->incomingPairings = mSplicer->findCompatiblePairings(mMaterials->mediaSession, mMaterials->sources);
+        mMaterials->outgoingPairings = mSplicer->findCompatiblePairings(mMaterials->mediaSession, mMaterials->sinks);
         return true;
     }
 

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


-- 
asterisk-scf/release/bridging.git



More information about the asterisk-scf-commits mailing list