[asterisk-scf-commits] asterisk-scf/integration/mediaformatgeneric.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Mon Jun 20 16:11:31 CDT 2011


branch "master" has been updated
       via  bdb885e24930692ceb8568356ab9d5c09378e1e7 (commit)
      from  5ab8dc52554d57f2265898924fe099d208730d1d (commit)

Summary of changes:
 src/MediaFormatGeneric.cpp |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)


- Log -----------------------------------------------------------------
commit bdb885e24930692ceb8568356ab9d5c09378e1e7
Author: Joshua Colp <jcolp at digium.com>
Date:   Mon Jun 20 18:11:04 2011 -0300

    Use the name to do baseline format identification.

diff --git a/src/MediaFormatGeneric.cpp b/src/MediaFormatGeneric.cpp
index 95710e0..146e9b9 100644
--- a/src/MediaFormatGeneric.cpp
+++ b/src/MediaFormatGeneric.cpp
@@ -167,7 +167,7 @@ FormatPtr SDPDescriptorServiceImpl::getDescribedFormat(const SDPDescriptorPtr& d
 
 SDPDescriptorPtr SDPDescriptorServiceImpl::getDescriptor(const FormatPtr& format, const Ice::Current&)
 {
-    std::map<std::string, SDPDescriptorPtr>::const_iterator descriptor = mFormatDescriptors.find(format->ice_id());
+    std::map<std::string, SDPDescriptorPtr>::const_iterator descriptor = mFormatDescriptors.find(format->name);
 
     if (descriptor == mFormatDescriptors.end())
     {
@@ -183,7 +183,7 @@ SDPDescriptorPtr SDPDescriptorServiceImpl::getDescriptor(const FormatPtr& format
 void SDPDescriptorServiceImpl::addFormat(const std::string& name, const FormatPtr& format, const SDPDescriptorPtr& descriptor)
 {
     mNamedFormats.insert(make_pair(name, format));
-    mFormatDescriptors.insert(make_pair(format->ice_id(), descriptor));
+    mFormatDescriptors.insert(make_pair(format->name, descriptor));
 
     if (descriptor->payload < 96)
     {
@@ -213,7 +213,7 @@ void SDPDescriptorServiceImpl::removeFormat(const std::string& name)
     }
 
     std::map<std::string, AsteriskSCF::Media::SDP::V1::SDPDescriptorPtr>::iterator descriptor = mFormatDescriptors.find(
-        format->second->ice_id());
+        format->second->name);
 
     if (descriptor->second->payload < 96)
     {
@@ -260,6 +260,7 @@ void MediaFormatGenericApp::start(const std::string&, const Ice::CommunicatorPtr
 
     // Add the ulaw audio format
     G711uLAWPtr ulaw = new G711uLAW();
+    ulaw->name = "ulaw";
     SDPDescriptorPtr ulawSDP = new SDPDescriptor();
     ulawSDP->payload = 0;
     ulawSDP->type = "audio";
@@ -270,6 +271,7 @@ void MediaFormatGenericApp::start(const std::string&, const Ice::CommunicatorPtr
 
     // Add the alaw audio format
     G711aLAWPtr alaw = new G711aLAW();
+    alaw->name = "alaw";
     SDPDescriptorPtr alawSDP = new SDPDescriptor();
     alawSDP->payload = 8;
     alawSDP->type = "audio";

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


-- 
asterisk-scf/integration/mediaformatgeneric.git



More information about the asterisk-scf-commits mailing list