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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Sep 14 10:56:08 CDT 2011


branch "master" has been updated
       via  ff44d0e1ff76a086e4851c15604cf9d1ba9ad3fc (commit)
       via  ec6e9d9693aeb9935ba6665a10b81f2552349071 (commit)
       via  b7c0e575e27fb0575c3c3f23007444a35a4caca7 (commit)
       via  08371c40e29b89e72a3acdc051757ae15f3c78b4 (commit)
       via  953289a66556d717384244c36f73acc945562099 (commit)
       via  91f56f1e7a481e13a0b42d0fb1d323ac3ad3cb91 (commit)
       via  ce9020326cff79fc41acb596241ff6641ea5af5f (commit)
       via  c1a96c506d66c71c874b2107c187bc5a28e8b4c3 (commit)
       via  8e5e1f624b5fb5e498bb7d84a1172fa337e8bee3 (commit)
       via  1a56884ce4ac84e41ab64499a635834f6cd71f63 (commit)
       via  990dd70ce8143d48a2064b0100f4f34a9ec1d344 (commit)
      from  767842b03dab3430d585abb505eb7772753f60c3 (commit)

Summary of changes:
 slice/AsteriskSCF/Media/Formats/AudioFormats.ice |   22 +++++++++++++
 slice/AsteriskSCF/Media/MediaIf.ice              |   36 ++++++++++++++++++++-
 2 files changed, 56 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit ff44d0e1ff76a086e4851c15604cf9d1ba9ad3fc
Author: Mark Michelson <mmichelson at digium.com>
Date:   Tue Sep 13 21:21:19 2011 -0500

    Remove the decode and encode methods because they're dumb and won't work.

diff --git a/slice/AsteriskSCF/Media/MediaIf.ice b/slice/AsteriskSCF/Media/MediaIf.ice
index 4744446..6e5c7eb 100644
--- a/slice/AsteriskSCF/Media/MediaIf.ice
+++ b/slice/AsteriskSCF/Media/MediaIf.ice
@@ -481,22 +481,6 @@ module V1
          * @return bool True if compatible, false if not.
          */
         idempotent bool checkCompatible(Format format1, Format format2);
-
-        /**
-         * Method that decodes a frame payload from the network.
-         *
-         * @param toDecode Raw bytes from the network.
-         * @return An AsteriskSCF Frame payload that encapsulates the data
-         */
-        FramePayload decodePayload(Ice::ByteSeq toDecode);
-
-        /**
-         * Method that encodes a frame for the network to use.
-         *
-         * @param toDecode The frame payload to encode
-         * @return A byte sequence directly writeable to the network
-         */
-        Ice::ByteSeq encodePayload(FramePayload toEncode);
     };
 
     /**

commit ec6e9d9693aeb9935ba6665a10b81f2552349071
Merge: b7c0e57 767842b
Author: Mark Michelson <mmichelson at digium.com>
Date:   Tue Sep 13 14:08:17 2011 -0500

    Merge branch 'master' into resample
    
    Conflicts:
    	slice/AsteriskSCF/Media/Formats/AudioFormats.ice


commit b7c0e575e27fb0575c3c3f23007444a35a4caca7
Author: Mark Michelson <mmichelson at digium.com>
Date:   Mon Aug 29 17:18:57 2011 -0500

    Add g722 format;

diff --git a/slice/AsteriskSCF/Media/Formats/AudioFormats.ice b/slice/AsteriskSCF/Media/Formats/AudioFormats.ice
index 026f406..9c08446 100644
--- a/slice/AsteriskSCF/Media/Formats/AudioFormats.ice
+++ b/slice/AsteriskSCF/Media/Formats/AudioFormats.ice
@@ -73,6 +73,15 @@ module V1
     const string SignedLinear8Name = "slin8";
     const string SignedLinear16Name = "slin16";
 
+    /**
+     * G.722 Audio format
+     */
+    unsliceable class G722 extends AsteriskSCF::Media::V1::AudioFormat
+    {
+    };
+
+    const string G722Name = "G722";
+
 }; /*  end module V1 */
 
 }; /*  end module Audio */

commit 08371c40e29b89e72a3acdc051757ae15f3c78b4
Author: Mark Michelson <mmichelson at digium.com>
Date:   Tue Aug 23 17:28:59 2011 -0500

    Add signed linear format.

diff --git a/slice/AsteriskSCF/Media/Formats/AudioFormats.ice b/slice/AsteriskSCF/Media/Formats/AudioFormats.ice
index 645c427..026f406 100644
--- a/slice/AsteriskSCF/Media/Formats/AudioFormats.ice
+++ b/slice/AsteriskSCF/Media/Formats/AudioFormats.ice
@@ -60,6 +60,19 @@ module V1
 
     const string G711aLAWName = "alaw";
 
+    /**
+     * Signed linear Audio Format
+     */
+    unsliceable class SignedLinear extends AsteriskSCF::Media::V1::AudioFormat
+    {
+        /**
+         * Another basic class that requires no additional parameters
+         */
+    };
+
+    const string SignedLinear8Name = "slin8";
+    const string SignedLinear16Name = "slin16";
+
 }; /*  end module V1 */
 
 }; /*  end module Audio */

commit 953289a66556d717384244c36f73acc945562099
Author: Mark Michelson <mmichelson at digium.com>
Date:   Mon Aug 22 15:24:20 2011 -0500

    Add some more format operations services for convenience.

diff --git a/slice/AsteriskSCF/Media/MediaIf.ice b/slice/AsteriskSCF/Media/MediaIf.ice
index f9bb522..97e512c 100644
--- a/slice/AsteriskSCF/Media/MediaIf.ice
+++ b/slice/AsteriskSCF/Media/MediaIf.ice
@@ -339,6 +339,33 @@ module V1
     };
 
     /**
+     * Represents the payload of a media frame.
+     */
+    class FramePayload
+    {
+    };
+
+    /**
+     * A payload represented as a byte sequence.
+     * This is useful for formats whose payload consists
+     * of bytes, such as the G711 audio formats.
+     */
+    class ByteSeqPayload extends FramePayload
+    {
+        Ice::ByteSeq payload;
+    };
+
+    /**
+     * A payload represented as a sequence of 16-bit quantities.
+     * This is useful for formats whose payload consists
+     * of 16-bit quantities, such as signed linear audio.
+     */
+    class ShortSeqPayload extends FramePayload
+    {
+        Ice::ShortSeq payload;
+    };
+
+    /**
      * A generic frame class that contains common details about frames. Additional classes should extend this to provide
      * additional details about the frame.
      */
@@ -350,9 +377,9 @@ module V1
         Format mediaFormat;
 
         /**
-         * A sequence of bytes which contain the actual data payload of this frame.
+         * The payload of the frame.
          */
-        Ice::ByteSeq payload;
+        FramePayload payload;
     };
 
     /**
@@ -400,6 +427,22 @@ module V1
          * @return bool True if compatible, false if not.
          */
         idempotent bool checkCompatible(Format format1, Format format2);
+
+        /**
+         * Method that decodes a frame payload from the network.
+         *
+         * @param toDecode Raw bytes from the network.
+         * @return An AsteriskSCF Frame payload that encapsulates the data
+         */
+        FramePayload decodePayload(Ice::ByteSeq toDecode);
+
+        /**
+         * Method that encodes a frame for the network to use.
+         *
+         * @param toDecode The frame payload to encode
+         * @return A byte sequence directly writeable to the network
+         */
+        Ice::ByteSeq encodePayload(FramePayload toEncode);
     };
 
     /**
@@ -428,6 +471,11 @@ module V1
     class AudioFormat extends Format
     {
         /**
+         * Numerical sample size in bits
+         */
+        int sampleSize;
+
+        /**
          * Numerical sample rate specified in Hz.
          */
         int sampleRate;

commit 91f56f1e7a481e13a0b42d0fb1d323ac3ad3cb91
Author: Mark Michelson <mmichelson at digium.com>
Date:   Wed Aug 17 13:57:31 2011 -0500

    Add constants for locating media operations.

diff --git a/slice/AsteriskSCF/Media/MediaOperationIf.ice b/slice/AsteriskSCF/Media/MediaOperationIf.ice
index e7dfe95..9dfcd96 100644
--- a/slice/AsteriskSCF/Media/MediaOperationIf.ice
+++ b/slice/AsteriskSCF/Media/MediaOperationIf.ice
@@ -28,6 +28,20 @@ module Media
 module V1
 {
 
+/**
+ * This is meant to be used in ServiceLocatorParams as the
+ * "category" for all media operations.
+ */
+const string MediaOperationDiscoveryCategory = "MediaOperation";
+
+/**
+ * This is Meant to be used in ServiceLocatorParams as the "service"
+ * when a translator is needed. The service set by media operations
+ * that do not perform translation may use a descriptive term for
+ * their service instead, like "pitch shifter" or "volume adjustment."
+ */
+const string MediaOperationDiscoveryTranslatorService = "Translator";
+
 interface MediaOperation
 {
     StreamSource* getSource();

commit ce9020326cff79fc41acb596241ff6641ea5af5f
Author: Mark Michelson <mmichelson at digium.com>
Date:   Wed Aug 17 13:38:58 2011 -0500

    Create a constant to use for the format names for ulaw and alaw.

diff --git a/slice/AsteriskSCF/Media/Formats/AudioFormats.ice b/slice/AsteriskSCF/Media/Formats/AudioFormats.ice
index 349f1b7..645c427 100644
--- a/slice/AsteriskSCF/Media/Formats/AudioFormats.ice
+++ b/slice/AsteriskSCF/Media/Formats/AudioFormats.ice
@@ -46,6 +46,8 @@ module V1
          */
     };
 
+    const string G711uLAWName = "ulaw";
+
     /**
      * G.711 a-Law Audio Format
      */
@@ -56,6 +58,8 @@ module V1
          */
     };
 
+    const string G711aLAWName = "alaw";
+
 }; /*  end module V1 */
 
 }; /*  end module Audio */

commit c1a96c506d66c71c874b2107c187bc5a28e8b4c3
Author: Mark Michelson <mmichelson at digium.com>
Date:   Mon Aug 15 11:56:45 2011 -0500

    Allow createMediaOperation to throw an exception if bad formats are given.

diff --git a/slice/AsteriskSCF/Media/MediaOperationIf.ice b/slice/AsteriskSCF/Media/MediaOperationIf.ice
index 05eae31..e7dfe95 100644
--- a/slice/AsteriskSCF/Media/MediaOperationIf.ice
+++ b/slice/AsteriskSCF/Media/MediaOperationIf.ice
@@ -44,7 +44,7 @@ interface MediaOperationFactory
      */
     MediaOperation* createMediaOperation(
             StreamSource* source,
-            StreamSink* sink);
+            StreamSink* sink) throws UnsupportedMediaFormatException;
 };
 
 struct MediaOperationAttributes

commit 8e5e1f624b5fb5e498bb7d84a1172fa337e8bee3
Author: Mark Michelson <mmichelson at digium.com>
Date:   Thu Aug 11 17:24:01 2011 -0500

    Fix a typo.

diff --git a/slice/AsteriskSCF/Media/MediaOperationIf.ice b/slice/AsteriskSCF/Media/MediaOperationIf.ice
index 5e42c8c..05eae31 100644
--- a/slice/AsteriskSCF/Media/MediaOperationIf.ice
+++ b/slice/AsteriskSCF/Media/MediaOperationIf.ice
@@ -44,7 +44,7 @@ interface MediaOperationFactory
      */
     MediaOperation* createMediaOperation(
             StreamSource* source,
-            StreamSource* sink);
+            StreamSink* sink);
 };
 
 struct MediaOperationAttributes

commit 1a56884ce4ac84e41ab64499a635834f6cd71f63
Author: Mark Michelson <mmichelson at digium.com>
Date:   Thu Aug 11 14:48:21 2011 -0500

    Return a proxy to a media operation.

diff --git a/slice/AsteriskSCF/Media/MediaOperationIf.ice b/slice/AsteriskSCF/Media/MediaOperationIf.ice
index 3c50a68..5e42c8c 100644
--- a/slice/AsteriskSCF/Media/MediaOperationIf.ice
+++ b/slice/AsteriskSCF/Media/MediaOperationIf.ice
@@ -42,7 +42,7 @@ interface MediaOperationFactory
      * @param source optional source of media that will enter the operation
      * @param sink optional source of media that the operation will write to
      */
-    MediaOperation createMediaOperation(
+    MediaOperation* createMediaOperation(
             StreamSource* source,
             StreamSource* sink);
 };

commit 990dd70ce8143d48a2064b0100f4f34a9ec1d344
Author: Mark Michelson <mmichelson at digium.com>
Date:   Thu Aug 11 14:05:48 2011 -0500

    Create slice definitions for media operations.

diff --git a/slice/AsteriskSCF/Media/MediaOperationIf.ice b/slice/AsteriskSCF/Media/MediaOperationIf.ice
new file mode 100644
index 0000000..3c50a68
--- /dev/null
+++ b/slice/AsteriskSCF/Media/MediaOperationIf.ice
@@ -0,0 +1,77 @@
+/*
+ * Asterisk SCF -- An open-source communications framework.
+ *
+ * Copyright (C) 2011, Digium, Inc.
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk SCF project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE.txt file
+ * at the top of the source tree.
+ */
+
+#pragma once
+
+#include <AsteriskSCF/Media/MediaIf.ice>
+#include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.ice>
+
+module AsteriskSCF
+{
+
+module Media
+{
+
+module V1
+{
+
+interface MediaOperation
+{
+    StreamSource* getSource();
+    StreamSink* getSink();
+    void destroy();
+};
+
+interface MediaOperationFactory
+{
+    /**
+     * Create a new instance of a media operation.
+     * @param source optional source of media that will enter the operation
+     * @param sink optional source of media that the operation will write to
+     */
+    MediaOperation createMediaOperation(
+            StreamSource* source,
+            StreamSource* sink);
+};
+
+struct MediaOperationAttributes
+{
+    /**
+     * The input format for a specific operation
+     */
+    Format inputFormat;
+    /**
+     * The output format for a specific operation
+     */
+    Format outputFormat;
+    /**
+     * The cost of the operation.
+     * Lower cost indicates an "easier" translation,
+     * either because it is faster or uses fewer resources.
+     */
+    int cost;
+};
+
+sequence<MediaOperationAttributes> MediaOperationAttributesSeq;
+
+unsliceable class MediaOperationServiceLocatorParams extends AsteriskSCF::Core::Discovery::V1::ServiceLocatorParams
+{
+    MediaOperationAttributesSeq attributes;
+};
+
+}; /* end module V1 */
+}; /* end module Media */
+}; /* end module AsteriskSCF */

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


-- 
asterisk-scf/release/slice.git



More information about the asterisk-scf-commits mailing list