[asterisk-scf-commits] asterisk-scf/integration/media_operations_core.git branch "jitterbuffer" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Sun Oct 16 20:21:07 CDT 2011


branch "jitterbuffer" has been updated
       via  ecd1510bc370e373f273e2860d249c57c4579c82 (commit)
       via  1f7a1e6540dd75847488884036582733fab82442 (commit)
       via  c70e9875a17c5986de78f8443e23ab3f793d8a23 (commit)
      from  ae3b5349290dd8cfced62b86dcc779cc52f0596a (commit)

Summary of changes:
 src/BufferedTranslator.cpp    |    4 +---
 src/JitterBufferOperation.cpp |    2 +-
 src/MediaOperationsCore.cpp   |    5 +++++
 src/NetEqWrapper.cpp          |    7 ++-----
 src/NetEqWrapper.h            |    6 ++++++
 5 files changed, 15 insertions(+), 9 deletions(-)


- Log -----------------------------------------------------------------
commit ecd1510bc370e373f273e2860d249c57c4579c82
Author: Joshua Colp <jcolp at digium.com>
Date:   Sun Oct 16 21:12:32 2011 -0300

    Actually buffer frames.

diff --git a/src/BufferedTranslator.cpp b/src/BufferedTranslator.cpp
index 0c3dad2..7abe85b 100644
--- a/src/BufferedTranslator.cpp
+++ b/src/BufferedTranslator.cpp
@@ -42,9 +42,7 @@ BufferedTranslator::~BufferedTranslator()
 
 void BufferedTranslator::translateFrames(const FrameSeq& frames)
 {
-    FrameSeq translated;
-    translated.resize(frames.size());
-  //  std::for_each(frames.begin(), frames.end(), );
+    std::for_each(frames.begin(), frames.end(), std::bind1st(std::mem_fun(&BufferedTranslator::buffer), this));
 }
 
 }

commit 1f7a1e6540dd75847488884036582733fab82442
Author: Joshua Colp <jcolp at digium.com>
Date:   Sun Oct 16 19:43:15 2011 -0300

    Actually create and register the jitterbuffer operation factory when the component starts.

diff --git a/src/MediaOperationsCore.cpp b/src/MediaOperationsCore.cpp
index edaec40..46222f2 100644
--- a/src/MediaOperationsCore.cpp
+++ b/src/MediaOperationsCore.cpp
@@ -27,6 +27,7 @@
 #include "ulaw_alaw.h"
 #include "resample.h"
 #include "g722.h"
+#include "JitterBufferOperation.h"
 
 using namespace AsteriskSCF::System::Logging;
 
@@ -135,6 +136,10 @@ private:
         lg(Debug) << "Creating G.722 Factory";
         createAndRegisterFactory(new G722Factory(getServiceAdapter(), lg,
                     boost::static_pointer_cast<MediaOperationReplicationContext>(getReplicationContext())));
+
+        lg(Debug) << "Creating JitterBufferOperationFactory";
+        createAndRegisterFactory(new JitterBufferOperationFactory(getServiceAdapter(), lg,
+                    boost::static_pointer_cast<MediaOperationReplicationContext>(getReplicationContext()), false));
     }
 
     void locateStateReplicator()

commit c70e9875a17c5986de78f8443e23ab3f793d8a23
Author: Joshua Colp <jcolp at digium.com>
Date:   Sun Oct 16 19:38:35 2011 -0300

    Fix things so it will build on 64-bit Linux.

diff --git a/src/JitterBufferOperation.cpp b/src/JitterBufferOperation.cpp
index 06113e0..3e2a570 100644
--- a/src/JitterBufferOperation.cpp
+++ b/src/JitterBufferOperation.cpp
@@ -167,7 +167,7 @@ private:
                 WebRtcNetEQ_RecInRTPStruct(netEqInstance, 
                                            &rtpInfo, 
                                            (WebRtc_UWord8*)&inPayload->payload.front(),
-                                           mInAudioFormat->frameSize,
+                                           (WebRtc_Word16)mInAudioFormat->frameSize,
                                            (WebRtc_UWord32)IceUtil::Time::now().toMilliSeconds());
             }
             mFrameCount++;
diff --git a/src/NetEqWrapper.cpp b/src/NetEqWrapper.cpp
index c18bcc0..c046882 100644
--- a/src/NetEqWrapper.cpp
+++ b/src/NetEqWrapper.cpp
@@ -70,10 +70,7 @@ NetEqWrapperImpl::NetEqWrapperImpl(int sampleRate, bool forFax)
         throw NetEqInitException("WebRtcNetEQ returned error assigning memory for our instance: " + resultCode);
     }
 
-    // Initial sample rate in Hz (may change with payload)
-    int rate = SAMPLERATE_PCMB;  
-
-    if((resultCode = WebRtcNetEQ_Init(mNetEqInstance, sampleRate)) < 0)
+    if((resultCode = WebRtcNetEQ_Init(mNetEqInstance, (WebRtc_Word16)sampleRate)) < 0)
     {
         std::string msg = "WebRtcNetEQ returned error initializing our instance: " + resultCode;
         msg += (" with a sampleRate of " + sampleRate);
@@ -121,7 +118,7 @@ NetEqWrapperImpl::NetEqWrapperImpl(int sampleRate, bool forFax)
     /**
      * Set the codec to use. 
      */
-    SET_CODEC_PAR(mCodecDef,defaultDecoder,NETEQ_CODEC_PCM16B_PT,NULL,sampleRate); 
+    SET_CODEC_PAR(mCodecDef,defaultDecoder,NETEQ_CODEC_PCM16B_PT,NULL,(WebRtc_Word16)sampleRate); 
     SET_PCM16B_FUNCTIONS(mCodecDef);
     WebRtcNetEQ_CodecDbAdd(mNetEqInstance, &mCodecDef);
 
diff --git a/src/NetEqWrapper.h b/src/NetEqWrapper.h
index 080402c..a911035 100644
--- a/src/NetEqWrapper.h
+++ b/src/NetEqWrapper.h
@@ -15,6 +15,8 @@
  */
 #pragma once
 
+#include <string>
+
 #include <boost/shared_ptr.hpp>
 
 #include "mcu_dsp_common.h"
@@ -40,6 +42,10 @@ public:
         return mWhat.c_str();
     }
 
+    ~NetEqInitException() throw()
+    {
+    }
+
 private:
     std::string mWhat;
 };

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


-- 
asterisk-scf/integration/media_operations_core.git



More information about the asterisk-scf-commits mailing list