[asterisk-scf-commits] asterisk-scf/integration/bridging.git branch "mediamixer" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Nov 11 13:09:57 CST 2011


branch "mediamixer" has been updated
       via  d7ebb5f95baf3733230ff58738a53cbc8af88367 (commit)
      from  d93a04d0936e9db8c967d6106d3b06586493bc67 (commit)

Summary of changes:
 src/MediaMixer.cpp   |    4 ++--
 src/MediaSplicer.cpp |   28 ++++++++++++++--------------
 2 files changed, 16 insertions(+), 16 deletions(-)


- Log -----------------------------------------------------------------
commit d7ebb5f95baf3733230ff58738a53cbc8af88367
Author: Joshua Colp <jcolp at digium.com>
Date:   Fri Nov 11 15:10:59 2011 -0400

    Incorporate review feedback.

diff --git a/src/MediaMixer.cpp b/src/MediaMixer.cpp
index a9be6c9..4237041 100755
--- a/src/MediaMixer.cpp
+++ b/src/MediaMixer.cpp
@@ -492,10 +492,10 @@ void MediaMixer::runTimerTask()
 
             ShortSeqPayloadPtr sinkPayload = ShortSeqPayloadPtr::dynamicCast(sinkFrame->payload);
 
+            // Remove the participants own media so they do not hear themselves
             ShortSeqPayloadPtr payload = new ShortSeqPayload();
             payload->payload.resize(mixedPayload->payload.size());
-            std::copy(mixedPayload->payload.begin(), mixedPayload->payload.end(), payload->payload.begin());
-            std::transform(payload->payload.begin(), payload->payload.end(),
+	    std::transform(mixedPayload->payload.begin(), mixedPayload->payload.end(),
                            sinkPayload->payload.begin(), payload->payload.begin(),
                            saturatedSignedLinearSubtract);
             theirFrame->payload = payload;
diff --git a/src/MediaSplicer.cpp b/src/MediaSplicer.cpp
index aa9476b..27411cc 100755
--- a/src/MediaSplicer.cpp
+++ b/src/MediaSplicer.cpp
@@ -400,7 +400,7 @@ public:
         mBridgeId(bridgeId),
         mReplicator(replicator),
         mLogger(logger),
-        mMixer(false),
+        mUsingMixer(false),
 	mAdapter(adapter)
     {
     }
@@ -464,7 +464,7 @@ public:
         // An alternative is to pass back the queued tasks to the caller and let them start and stop the process.
         //
         ExecutorPtr taskExecutor(new Executor(createMediaConnectTasks(session, sessionPrx, existing, 
-                                                                      shared_from_this(), mMixer), mLogger));
+                                                                      shared_from_this(), mUsingMixer), mLogger));
         taskExecutor->start();
     }
 
@@ -499,12 +499,12 @@ public:
 
     void enableMixing()
     {
-        mMixer = true;
+        mUsingMixer = true;
     }
 
     void disableMixing()
     {
-        if (mMixer == false)
+        if (mUsingMixer == false)
         {
             return;
         }
@@ -518,7 +518,7 @@ public:
 
         mMediaMixers.clear();
 
-        mMixer = false;
+        mUsingMixer = false;
     }
 
     void update(const AsteriskSCF::Replication::BridgeService::V1::SessionPairingPtr& pairing)
@@ -534,7 +534,7 @@ public:
             return;
         }
 
-	mMixer = true;
+	mUsingMixer = true;
 
         vector<OutgoingPairing> outgoing;
         vector<IncomingPairing> incoming;
@@ -560,7 +560,7 @@ public:
             }
 
 	    MediaMixerPtr mixer;
-            bool disallowed = false;
+            bool allowed = true;
 
             // Only allow signed linear formats to create or find a mixer
             for (FormatSeq::const_iterator format = stream->second->formats.begin();
@@ -571,20 +571,20 @@ public:
 
                 if (!slin)
                 {
-                    disallowed = true;
+                    allowed = false;
                     break;
                 }
             }
 
             // If the stream contains an unsupported format do not go further, do not pass go
-            if (disallowed == true)
+            if (allowed == false)
             {
                 continue;
             }
 
             // Look for a mixer based on the format on this stream
             std::string format = stream->second->formats.front()->name;
-            MediaMixers::const_iterator existingMixer = mixers.find(format);
+            MediaMixers::const_iterator existingMixer = mixers.end();
 
             if (existingMixer == mixers.end())
             {
@@ -713,7 +713,7 @@ private:
     string mBridgeId;
     ReplicatorSmartPrx mReplicator;
     Logger mLogger;
-    bool mMixer;
+    bool mUsingMixer;
     Ice::ObjectAdapterPtr mAdapter;
 
     typedef vector<MediaConnectorIPtr> MediaConnectors;
@@ -813,7 +813,7 @@ public:
         QueuedTask("GetCompatiblePairings"),
         mSplicer(splicer),
         mMaterials(materials),
-        mMixer(mixer)
+        mUsingMixer(mixer)
     {
     }
 
@@ -826,7 +826,7 @@ protected:
             return true;
         }
 
-        if (mMixer == true)
+        if (mUsingMixer == true)
         {
             mSplicer->findCompatiblePairings(mMaterials->streams, mMaterials->outgoingPairings, mMaterials->incomingPairings);
         }
@@ -842,7 +842,7 @@ protected:
 private:
     MediaSplicerIPtr mSplicer;
     MediaConnectorBuilderPtr mMaterials;
-    bool mMixer;
+    bool mUsingMixer;
 };
 
 //

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


-- 
asterisk-scf/integration/bridging.git



More information about the asterisk-scf-commits mailing list