[asterisk-scf-commits] asterisk-scf/integration/mediaformatgeneric.git branch "telephony-events" created.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Aug 10 17:49:30 CDT 2011


branch "telephony-events" has been created
        at  ecc91b3748720e6d95cfd0022ebe583c85f9efbd (commit)

- Log -----------------------------------------------------------------
commit ecc91b3748720e6d95cfd0022ebe583c85f9efbd
Author: Mark Michelson <mmichelson at digium.com>
Date:   Wed Aug 10 09:49:05 2011 -0500

    Use a slice-defined constant for the name of the RFC4733 format.

diff --git a/src/MediaFormatGeneric.cpp b/src/MediaFormatGeneric.cpp
index 37c1872..6711705 100644
--- a/src/MediaFormatGeneric.cpp
+++ b/src/MediaFormatGeneric.cpp
@@ -296,7 +296,7 @@ void MediaFormatGenericApp::start(const std::string&, const Ice::CommunicatorPtr
 
     // Add the RFC 4733 telephone event audio format
     RFC4733Ptr rfc4733(new RFC4733());
-    rfc4733->name = "rfc4733";
+    rfc4733->name = RFC4733Name;
     SDPDescriptorPtr rfc4733SDP = new SDPDescriptor();
     rfc4733SDP->payload = 101;
     rfc4733SDP->type = "audio";

commit 7573e843f8139c25427136c7fe007d0118991980
Author: Mark Michelson <mmichelson at digium.com>
Date:   Mon Aug 8 17:07:01 2011 -0500

    Add fmtp stuff for SDP.

diff --git a/src/MediaFormatGeneric.cpp b/src/MediaFormatGeneric.cpp
index 3763478..37c1872 100644
--- a/src/MediaFormatGeneric.cpp
+++ b/src/MediaFormatGeneric.cpp
@@ -302,6 +302,12 @@ void MediaFormatGenericApp::start(const std::string&, const Ice::CommunicatorPtr
     rfc4733SDP->type = "audio";
     rfc4733SDP->subtype = "telephone-event";
     rfc4733SDP->samplerate = 8000;
+    //Since we only support DTMF and flash over
+    //RFC 4733 at the moment, we can just hardcode
+    //the parameters here. If we start supporting
+    //other event types, this will need to become
+    //more dynamic.
+    rfc4733SDP->parameters.push_back("0-16");
     descriptorService->addFormat(rfc4733->name, rfc4733, rfc4733SDP);
     comparatorService->addFormat(rfc4733->name);
 

commit fa69f8247ce92f26a46cceafe4130fc7db795239
Author: Mark Michelson <mmichelson at digium.com>
Date:   Fri Aug 5 09:34:00 2011 -0500

    Add RFC 4733 format descriptor.

diff --git a/src/MediaFormatGeneric.cpp b/src/MediaFormatGeneric.cpp
index 33c84e6..3763478 100644
--- a/src/MediaFormatGeneric.cpp
+++ b/src/MediaFormatGeneric.cpp
@@ -22,6 +22,7 @@
 #include <AsteriskSCF/Media/MediaIf.h>
 #include <AsteriskSCF/Media/SDP/MediaSDPIf.h>
 #include <AsteriskSCF/Media/Formats/AudioFormats.h>
+#include <AsteriskSCF/Media/Formats/OtherFormats.h>
 #include <AsteriskSCF/System/Component/ComponentServiceIf.h>
 #include <AsteriskSCF/Logger/IceLogger.h>
 #include <AsteriskSCF/logger.h>
@@ -35,6 +36,7 @@ using namespace AsteriskSCF::Core::Discovery::V1;
 using namespace AsteriskSCF::Media::V1;
 using namespace AsteriskSCF::Media::SDP::V1;
 using namespace AsteriskSCF::Media::Formats::Audio::V1;
+using namespace AsteriskSCF::Media::Formats::Other::V1;
 using namespace AsteriskSCF::Configuration::FormatGeneric::V1;
 using namespace AsteriskSCF::System::Component::V1;
 using namespace AsteriskSCF::System::Logging;
@@ -292,6 +294,17 @@ void MediaFormatGenericApp::start(const std::string&, const Ice::CommunicatorPtr
     descriptorService->addFormat(alaw->name, alaw, alawSDP);
     comparatorService->addFormat(alaw->name);
 
+    // Add the RFC 4733 telephone event audio format
+    RFC4733Ptr rfc4733(new RFC4733());
+    rfc4733->name = "rfc4733";
+    SDPDescriptorPtr rfc4733SDP = new SDPDescriptor();
+    rfc4733SDP->payload = 101;
+    rfc4733SDP->type = "audio";
+    rfc4733SDP->subtype = "telephone-event";
+    rfc4733SDP->samplerate = 8000;
+    descriptorService->addFormat(rfc4733->name, rfc4733, rfc4733SDP);
+    comparatorService->addFormat(rfc4733->name);
+
     // Register our custom comparator with the service locator
     ServiceLocatorParamsComparePrx comparatorServicePrx = ServiceLocatorParamsComparePrx::uncheckedCast(
 	mAdapter->addWithUUID(comparatorService));

commit f487411d8aab56dce4a78fcc766d4d543040c343
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Tue Jul 19 13:32:22 2011 -0500

    Resolve compiler warning about unused parameters.

diff --git a/src/MediaFormatGeneric.cpp b/src/MediaFormatGeneric.cpp
index 5ed2304..33c84e6 100644
--- a/src/MediaFormatGeneric.cpp
+++ b/src/MediaFormatGeneric.cpp
@@ -128,7 +128,7 @@ void SDPDescriptorCompareServiceImpl::removeAllFormats()
     mSupportedFormats.clear();
 }
 
-FormatPtr SDPDescriptorServiceImpl::getNamedFormat(const std::string& name, int sampleRate, int frameSize, const Ice::StringSeq&, const Ice::Current&)
+FormatPtr SDPDescriptorServiceImpl::getNamedFormat(const std::string& name, int, int, const Ice::StringSeq&, const Ice::Current&)
 {
     boost::shared_lock<boost::shared_mutex> lock(mLock);
     std::map<std::string, FormatPtr>::const_iterator format = mNamedFormats.find(name);

commit 77597181c991ae2aa6f47328eafdcf04fef58731
Author: Joshua Colp <jcolp at digium.com>
Date:   Tue Jul 19 14:45:19 2011 -0300

    Add a fix for a bug where a configured format with a dynamic payload would be stored in the wrong place.

diff --git a/src/MediaFormatGeneric.cpp b/src/MediaFormatGeneric.cpp
index c54e8f6..5ed2304 100644
--- a/src/MediaFormatGeneric.cpp
+++ b/src/MediaFormatGeneric.cpp
@@ -194,7 +194,7 @@ void SDPDescriptorServiceImpl::addFormat(const std::string& name, const FormatPt
     mNamedFormats.insert(make_pair(name, format));
     mFormatDescriptors.insert(make_pair(format->name, descriptor));
 
-    if (descriptor->payload < 96)
+    if (descriptor->payload >= 0 && descriptor->payload < 96)
     {
         /*
          * If this is a static payload we store solely on the payload number itself
@@ -225,7 +225,7 @@ void SDPDescriptorServiceImpl::removeFormat(const std::string& name)
     std::map<std::string, AsteriskSCF::Media::SDP::V1::SDPDescriptorPtr>::iterator descriptor = mFormatDescriptors.find(
         format->second->name);
 
-    if (descriptor->second->payload < 96)
+    if (descriptor->second->payload >= 0 && descriptor->second->payload < 96)
     {
         std::map<int, AsteriskSCF::Media::V1::FormatPtr>::iterator number = mPayloadNumberFormats.find(descriptor->second->payload);
         mPayloadNumberFormats.erase(number);

commit 3750d070df816e9afb44cf0550693839b55e3c30
Author: Joshua Colp <jcolp at digium.com>
Date:   Sun Jul 10 11:31:19 2011 -0300

    Remove unneeded test directory.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a1ab178..8a47aeb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,5 @@
 astscf_project(mediaformatgeneric 3.4)
 
 add_subdirectory(src)
-if(BUILD_TESTING)
-  add_subdirectory(test)
-endif()
+
 astscf_slice_collection_install(PROJECT)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
deleted file mode 100644
index e69de29..0000000

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


-- 
asterisk-scf/integration/mediaformatgeneric.git



More information about the asterisk-scf-commits mailing list