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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Sat Dec 17 17:18:48 CST 2011


branch "master" has been updated
       via  2693fde6377f6e4f2ace06f7c9712d7e966390f4 (commit)
      from  509edd9fe10e802048ef108bd8f0874724468830 (commit)

Summary of changes:
 config/MediaFormatGenericConfigurator.py |    1 +
 src/Component.cpp                        |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)


- Log -----------------------------------------------------------------
commit 2693fde6377f6e4f2ace06f7c9712d7e966390f4
Author: Joshua Colp <jcolp at digium.com>
Date:   Sat Dec 17 19:22:29 2011 -0400

    Set the sampleSize field in the format so code that uses it will operate correctly. (issue ASTSCF-398)

diff --git a/config/MediaFormatGenericConfigurator.py b/config/MediaFormatGenericConfigurator.py
index fde156e..7fb2bc8 100755
--- a/config/MediaFormatGenericConfigurator.py
+++ b/config/MediaFormatGenericConfigurator.py
@@ -56,6 +56,7 @@ class MediaFormatGenericSectionVisitors(Configurator.SectionVisitors):
         elif format.descriptor.type == 'video':
             format.format = AsteriskSCF.Media.V1.VideoFormat()
         format.format.name = section
+        format.format.sampleSize = format.descriptor.samplerate / 1000
 
         self.formats.configurationItems[section] = format
 
diff --git a/src/Component.cpp b/src/Component.cpp
index 09694c7..4be456a 100644
--- a/src/Component.cpp
+++ b/src/Component.cpp
@@ -480,6 +480,7 @@ void Component::createPrimaryServices()
 
         // Add the ulaw audio format
         G711uLAWPtr ulaw = new G711uLAW();
+        ulaw->sampleSize = 8;
         ulaw->name = "ulaw";
         SDPDescriptorPtr ulawSDP = new SDPDescriptor();
         ulawSDP->payload = 0;
@@ -491,6 +492,7 @@ void Component::createPrimaryServices()
 
         // Add the alaw audio format
         G711aLAWPtr alaw = new G711aLAW();
+        alaw->sampleSize = 8;
         alaw->name = "alaw";
         SDPDescriptorPtr alawSDP = new SDPDescriptor();
         alawSDP->payload = 8;

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


-- 
asterisk-scf/release/mediaformatgeneric.git



More information about the asterisk-scf-commits mailing list