[asterisk-scf-commits] asterisk-scf/integration/slice.git branch "rtcp" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Sun Jul 10 14:18:49 CDT 2011


branch "rtcp" has been updated
       via  28ee15919bebb57c53a7cc622c636c8822fba277 (commit)
       via  ed01eec39b4398e78f896af688306659d90f9829 (commit)
       via  d5371a79cbe93dcb36e8c95b872d53d4db26fd35 (commit)
       via  e56a51d3e1757a1a43696b941520db046cefc298 (commit)
       via  3a25fc4bb24402fe9aa141db97b5b3682601d0fd (commit)
       via  1325c7885168376402c709476967af251cf63514 (commit)
       via  a461475bc6a2dc40d2d3e6142b9a1d1eef423687 (commit)
       via  5c33e83d9428a31c82df051ad28784719c093cc7 (commit)
       via  982413fb056b9d2c8ca1ffc639f5613acfc96ea0 (commit)
      from  db07acf9226b8de7e0dd7256f996549fdcdf6292 (commit)

Summary of changes:
 build.xml                                          |   33 +-
 ice-pom.xml.in                                     |   21 +-
 install-ice-jar.xml                                |   10 +
 pom.xml.in                                         |   20 +-
 slice/AsteriskSCF/Media/Formats/AudioFormats.ice   |   67 ++
 slice/AsteriskSCF/Media/MediaIf.ice                |  885 +++++++++-----------
 slice/AsteriskSCF/Media/RTP/MediaRTCPIf.ice        |   36 +-
 slice/AsteriskSCF/Media/SDP/MediaSDPIf.ice         |  133 +++
 .../SessionCommunicationsIf.ice                    |    3 +-
 9 files changed, 713 insertions(+), 495 deletions(-)
 create mode 100644 slice/AsteriskSCF/Media/Formats/AudioFormats.ice
 create mode 100644 slice/AsteriskSCF/Media/SDP/MediaSDPIf.ice


- Log -----------------------------------------------------------------
commit 28ee15919bebb57c53a7cc622c636c8822fba277
Merge: ed01eec db07acf
Author: Joshua Colp <jcolp at digium.com>
Date:   Sun Jul 10 16:19:22 2011 -0300

    Merge branch 'rtcp' of git.asterisk.org:asterisk-scf/integration/slice into rtcp
    
    Conflicts:
    	slice/AsteriskSCF/Media/RTP/MediaRTCPIf.ice

diff --cc slice/AsteriskSCF/Media/RTP/MediaRTCPIf.ice
index ce19fc7,843533f..ce06f03
--- a/slice/AsteriskSCF/Media/RTP/MediaRTCPIf.ice
+++ b/slice/AsteriskSCF/Media/RTP/MediaRTCPIf.ice
@@@ -133,31 -133,11 +133,31 @@@ module V
     };
  
     /**
-     * Facet name for the RTCP interface
-     */
-    const string RTCPFacet = "rtcp";
- 
-    /**
 +    * An RTCP information listener interface
 +    */
 +   interface RTCPInformationListener
 +   {
 +       /**
 +        * Method called when statistics information is updated for a source
 +        *
 +        * @param statistics Updated statistics information
 +        */
 +       void sourceStatisticsUpdated(RTCPStatistics statistics);
 +
 +       /**
 +        * Method called when statistics information is updated for a sink
 +        *
 +        * @param statistics Updated statistics information
 +        */
 +       void sinkStatisticsUpdated(RTCPStatistics statistics);
 +   };
 +
 +   /**
+     * Facet name for the RTCP interface
+     */
+    const string RTCPFacet = "rtcp";
+ 
+    /**
      * An RTCP statistics information interface. This is made available on media sources and sinks originating from
      * RTP sessions as a facet with the above name.
      */

commit ed01eec39b4398e78f896af688306659d90f9829
Author: Joshua Colp <jcolp at digium.com>
Date:   Sun Jul 10 16:16:07 2011 -0300

    Add listener support so an interested third party can receive RTCP quality statistics in real time.

diff --git a/slice/AsteriskSCF/Media/RTP/MediaRTCPIf.ice b/slice/AsteriskSCF/Media/RTP/MediaRTCPIf.ice
index 843533f..ce19fc7 100644
--- a/slice/AsteriskSCF/Media/RTP/MediaRTCPIf.ice
+++ b/slice/AsteriskSCF/Media/RTP/MediaRTCPIf.ice
@@ -138,6 +138,26 @@ module V1
    const string RTCPFacet = "rtcp";
 
    /**
+    * An RTCP information listener interface
+    */
+   interface RTCPInformationListener
+   {
+       /**
+        * Method called when statistics information is updated for a source
+        *
+        * @param statistics Updated statistics information
+        */
+       void sourceStatisticsUpdated(RTCPStatistics statistics);
+
+       /**
+        * Method called when statistics information is updated for a sink
+        *
+        * @param statistics Updated statistics information
+        */
+       void sinkStatisticsUpdated(RTCPStatistics statistics);
+   };
+
+   /**
     * An RTCP statistics information interface. This is made available on media sources and sinks originating from
     * RTP sessions as a facet with the above name.
     */
@@ -148,7 +168,21 @@ module V1
         *
         * @return RTCPStatistics A populated RTPStatistics concrete class
         */
-       RTCPStatistics getStatistics();
+       idempotent RTCPStatistics getStatistics();
+
+       /**
+        * Method used to add a listener which receives statistics information at the RTCP interval
+        *
+        * @param listener A proxy to the listener to add
+        */
+       void addListener(RTCPInformationListener *listener);
+
+       /**
+        * Method used to remove a listener
+        *
+        * @param listener A proxy to the listener to move
+        */
+       void removeListener(RTCPInformationListener *listener);
    };
 
 }; /*  end module V1 */

commit d5371a79cbe93dcb36e8c95b872d53d4db26fd35
Author: Joshua Colp <jcolp at digium.com>
Date:   Sun Jul 10 11:27:13 2011 -0300

    Remove old RTCP stuff.

diff --git a/slice/AsteriskSCF/Media/RTP/MediaRTPIf.ice b/slice/AsteriskSCF/Media/RTP/MediaRTPIf.ice
index 8687f30..4ce6803 100644
--- a/slice/AsteriskSCF/Media/RTP/MediaRTPIf.ice
+++ b/slice/AsteriskSCF/Media/RTP/MediaRTPIf.ice
@@ -109,13 +109,6 @@ module V1
    };
 
    /**
-    * Interface to an RTCP session.
-    */
-   interface RTCPSession
-   {
-   };
-
-   /**
     * A dictionary mapping payloads to media formats.
     */
    dictionary<int, AsteriskSCF::Media::V1::Format> PayloadMap;
@@ -133,20 +126,6 @@ module V1
       void associatePayloads(PayloadMap mappings);
 
       /**
-       * Method which enables or disables RTCP on the RTP session.
-       *
-       * @param enable A boolean value with true meaning RTCP should be used and false meaning it should not.
-       */
-      void useRTCP(bool enable);
-
-      /**
-       * Method which retrieves a proxy to an RTCP session.
-       *
-       * @return RTCPSession* A proxy to the RTCP session associated with this RTP session.
-       */
-      RTCPSession* getRTCPSession();
-
-      /**
        * Method which releases the RTP session. Once called the RTP session will no longer exist.
        */
       void release();

commit e56a51d3e1757a1a43696b941520db046cefc298
Author: Joshua Colp <jcolp at digium.com>
Date:   Sun Jul 10 11:04:22 2011 -0300

    Add slice file for RTCP.

diff --git a/slice/AsteriskSCF/Media/RTP/MediaRTCPIf.ice b/slice/AsteriskSCF/Media/RTP/MediaRTCPIf.ice
new file mode 100644
index 0000000..843533f
--- /dev/null
+++ b/slice/AsteriskSCF/Media/RTP/MediaRTCPIf.ice
@@ -0,0 +1,160 @@
+/*
+ * 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.
+ */
+
+module AsteriskSCF
+{
+
+module Media
+{
+
+module RTCP
+{
+
+["suppress"]
+module V1
+{
+   /**
+    * String representation of the version of this interface
+    */
+   const string Version = "V1";
+
+   /**
+    * Fine grained RTCP statistics information for certain aspects
+    */
+   class RTCPExtendedDetails
+   {
+       /**
+        * Maximum value
+        */
+       int maximum;
+
+       /**
+        * Minimum value
+        */
+       int minimum;
+
+       /**
+        * Last value
+        */
+       int last;
+
+       /**
+        * Mean value
+        */
+       int mean;
+   };
+
+   /**
+    * Concrete class containing RTCP statistics information. If retrieved from a proxy
+    * to a sink the statistics will be for the sending side. If retrieved from a proxy
+    * to a source the statistics will be for the receiving side.
+    */
+   class RTCPStatistics
+   {
+       /**
+        * Round trip delay information (values are in usec)
+        */
+       RTCPExtendedDetails roundTripDelay;
+
+       /**
+        * Number of packets in total
+        */
+       int packets;
+
+       /**
+        * Number of packets that have been discarded
+        */
+       int discardedPackets;
+
+       /**
+        * Number of packets that have been lost during transmission
+        */
+       int lostPackets;
+
+       /**
+        * Number of packets that have been out of order
+        */
+       int outOfOrderPackets;
+
+       /**
+        * Number of packets that have been duplicates
+        */
+       int duplicatePackets;
+
+       /**
+        * Packet loss information (values are in usec)
+        */
+       RTCPExtendedDetails loss;
+
+       /**
+        * Jitter information (values are in usec)
+        */
+       RTCPExtendedDetails jitter;
+   };
+
+   /**
+    * Facet name for the RTCP session interface
+    */
+   const string RTCPSessionFacet = "rtcpsession";
+
+   /**
+    * Interface to an RTCP session
+    */
+   interface RTCPSession
+   {
+       /**
+        * Method used to retrieve the port that our RTCP session is listening on
+        *
+        * @return int The local port for our RTCP session
+        */
+       int getLocalPort();
+
+       /**
+        * Method used to set the port that RTCP should be sent to
+        *
+        * Calling this will reset any statistics already present
+        *
+        * @param port The remote port to send RTCP to
+        */
+       void setRemotePort(int port);
+   };
+
+   /**
+    * Facet name for the RTCP interface
+    */
+   const string RTCPFacet = "rtcp";
+
+   /**
+    * An RTCP statistics information interface. This is made available on media sources and sinks originating from
+    * RTP sessions as a facet with the above name.
+    */
+   interface RTCPInformation
+   {
+       /**
+        * Method used to retrieve statistics information
+        *
+        * @return RTCPStatistics A populated RTPStatistics concrete class
+        */
+       RTCPStatistics getStatistics();
+   };
+
+}; /*  end module V1 */
+
+}; /*  end module RTCP */
+
+}; /*  end module Media */
+
+}; /*  end module AsteriskSCF */

commit 3a25fc4bb24402fe9aa141db97b5b3682601d0fd
Author: Joshua Colp <jcolp at digium.com>
Date:   Sun Jul 10 11:35:50 2011 -0300

    Merge revised media design.

diff --git a/slice/AsteriskSCF/Media/Formats/AudioFormats.ice b/slice/AsteriskSCF/Media/Formats/AudioFormats.ice
new file mode 100644
index 0000000..349f1b7
--- /dev/null
+++ b/slice/AsteriskSCF/Media/Formats/AudioFormats.ice
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+
+#include <AsteriskSCF/Media/MediaIf.ice>
+
+module AsteriskSCF
+{
+
+module Media
+{
+
+module Formats
+{
+
+module Audio
+{
+
+["suppress"]
+module V1
+{
+    /**
+     * String representation of the version of this interface
+     */
+    const string Version = "V1";
+
+    /**
+     * G.711 u-Law Audio Format 
+     */
+    unsliceable class G711uLAW extends AsteriskSCF::Media::V1::AudioFormat
+    {
+        /**
+         * u-Law is so basic that no additional parameters are required
+         */
+    };
+
+    /**
+     * G.711 a-Law Audio Format
+     */
+    unsliceable class G711aLAW extends AsteriskSCF::Media::V1::AudioFormat
+    {
+        /**
+         * a-Law is so basic that no additional parameters are required
+         */
+    };
+
+}; /*  end module V1 */
+
+}; /*  end module Audio */
+
+}; /*  end module Formats */
+
+}; /*  end module Media */
+
+}; /*  end module AsteriskSCF */
diff --git a/slice/AsteriskSCF/Media/MediaIf.ice b/slice/AsteriskSCF/Media/MediaIf.ice
index 9c79cd6..456064d 100644
--- a/slice/AsteriskSCF/Media/MediaIf.ice
+++ b/slice/AsteriskSCF/Media/MediaIf.ice
@@ -28,496 +28,401 @@ module Media
 ["suppress"]
 module V1
 {
-   /**
-    * String representation of the version of this interface
-    */
-   const string Version = "V1";
-
-   /**
-    * Forward declaration of the Frame class so we can define a sequence of them.
-    */
-   ["visitor"] local class FrameVisitor
-   {
-   };
-
-   class Frame;
-
-   /**
-    * Forward declaration of the Format class so we can define a sequence of them.
-    */
-   ["visitor"] local class FormatVisitor
-   {
-   };
-
-   class Format;
-
-   /**
-    * Forward declaration of the StreamSource interface so we can define a sequence of proxies to them.
-    */
-   interface StreamSource;
-
-   /**
-    * Forward declaration of the StreamSink interface so we can define a sequence of proxies to them.
-    */
-   interface StreamSink;
-
-   /**
-    * A sequence of stream source proxies.
-    */
-   sequence<StreamSource*> StreamSourceSeq;
-
-   /**
-    * A sequence of stream sink proxies.
-    */
-   sequence<StreamSink*> StreamSinkSeq;
-
-   /**
-    * A sequence of concrete formats.
-    */
-   sequence<Format> FormatSeq;
-
-   /**
-    * A sequence of concrete frames.
-    */
-   sequence<Frame> FrameSeq;
-
-   /**
-    * Interface to a container of media sources and sinks.
-    */
-   interface Session
-   {
-      /**
-       * Method which returns the stream sources that are on the session.
-       *
-       * @return StreamSourceSeq A sequence of stream sources.
-       */
-      StreamSourceSeq getSources();
-
-      /**
-       * Method which returns the stream sinks that are on the session.
-       *
-       * @return StreamSinkSeq A sequence of stream sinks.
-       */
-      StreamSinkSeq getSinks();
-
-      /**
-       * Method which returns a unique identifier for the session.
-       *
-       * @return string A string identifier for the session.
-       */
-      idempotent string getId();
-   };
-
-   /**
-    * Exception that gets thrown if a sink receives a format that it can not handle.
-    */
-   exception UnsupportedMediaFormatException { };
-
-   /**
-    * Exception that gets thrown if a fatal error occurs on a stream or sink.
-    */
-   exception FatalStreamException { };
-
-   /**
-    * Exception that gets thrown if a source can not switch to a different format.
-    */
-   exception MediaFormatSwitchException { };
-
-
-   /**
-    * Interface to a source of media.
-    */
-   interface StreamSource
-   {
-      /**
-       * Method which changes where the implementation should send media that originates from itself.
-       *
-       * @param destination A proxy to a stream sink where media will be sent to.
-       */
-      idempotent void setSink(StreamSink* destination);
-
-      /**
-       * Method which retrieves the current stream sink for media.
-       *
-       * @return StreamSink* A proxy to the stream sink where media is being sent to.
-       */
-      idempotent StreamSink* getSink();
-
-      /**
-       * Method which returns the formats that frames from this source may come in.
-       *
-       * @return FormatSeq A sequence of concrete format classes.
-       */
-      idempotent FormatSeq getFormats();
-
-      /**
-       * Method which returns a unique identifier for the source.
-       *
-       * @return string A string identifier for the source.
-       */
-      idempotent string getId();
-
-      /**
-       * Method which requests that the source change the format of frames being sent to the sink.
-       *
-       * @param Format A concrete class describing the format to change to.
-       *
-       * @throws MediaFormatSwitchException if the source could not be switched to the requested format.
-       */
-      void requestFormat(Format newformat) throws MediaFormatSwitchException;
-   };
-
-
-   /**
-    * Interface to a sink for media.
-    */
-   interface StreamSink
-   {
-      /**
-       * Method which gives the implementation a sequence of frames which it will then deal with in an implementation
-       * specific manner.
-       *
-       * @param frames A sequence of frames.
-       *
-       * @throws UnsupportedMediaFormatException if the format of a frame is not supported by the sink.
-       *
-       * @throws FatalStreamException if the frame could not be handled due to reasons outside the control of the sink.
-       */
-      void write(FrameSeq frames) throws UnsupportedMediaFormatException, FatalStreamException;
-
-      /**
-       * Method which changes the source of media being sent to this sink.
-       *
-       * @param source A proxy to the stream source that media is being received from.
-       */
-      idempotent void setSource(StreamSource* source);
-
-      /**
-       * Method which retrieves the current stream source of media.
-       *
-       * @return StreamSource* A proxy to the stream source that media is being received from.
-       */
-      idempotent StreamSource* getSource();
-
-      /**
-       * Method which returns the formats of frames that this sink can handle.
-       *
-       * @return FormatSeq A sequence of concrete format classes.
-       */
-      idempotent FormatSeq getFormats();
-
-      /**
-       * Method which returns a unique identifier for the sink.
-       *
-       * @return string A string identifier for the sink.
-       */
-      idempotent string getId();
-   };
-
-   /**
-    * Interface to a media operation session. This extends the normal Session interface and provides additional
-    * resource specific methods.
-    */
-   interface MediaOperationSession extends Session
-   {
-      /**
-       * Method which releases any resources associated with this media operation session.
-       */
-      void release();
-   };
-
-   /**
-    * A generic format discovery class that can be extended for adding parameters. The parameters are used to find
-    * a component capable of interpreting and providing a concrete class for a format.
-    */
-   unsliceable class FormatDiscovery extends AsteriskSCF::Core::Discovery::V1::ServiceLocatorParams
-   {
-   };
-
-   /**
-    * A format discovery class that allows finding a format based on name.
-    */
-   unsliceable class FormatDiscoveryName extends FormatDiscovery
-   {
-      /**
-       * A string identifier for the format.
-       */
-      string name;
-   };
-
-   /**
-    * A sequence of strings with each string containing a format specific parameter from SDP.
-    */
-   sequence<string> SDPFormatParameterSeq;
-
-   /**
-    * A format discovery class that allows finding a format based on information taken from SDP.
-    */
-   unsliceable class FormatDiscoverySDP extends FormatDiscovery
-   {
-      /**
-       * Numerical payload value given in the SDP.
-       */
-      int payload;
-
-      /**
-       * String type of the format (audio/video/etc)
-       */
-      string type;
-
-      /**
-       * String subtype of the format (in the case of audio something like PCMU)
-       */
-      string subtype;
-
-      /**
-       * Numerical sample rate of the format.
-       */
-      int samplerate;
-
-      /**
-       * A sequence of format specific parameters.
-       */
-      SDPFormatParameterSeq parameters;
-   };
-
-   /**
-    * A format discovery class that allows finding a format based on numerical value, used for IAX2.
-    */
-   unsliceable class FormatDiscoveryIAX2 extends FormatDiscovery
-   {
-      /**
-       * Numerical codec flag value.
-       */
-      int codec;
-   };
-
-   /**
-    * A format discovery class that allows finding an audio format based on a few parameters.
-    */
-   unsliceable class FormatDiscoveryGenericAudio extends FormatDiscovery
-   {
-      /**
-       * String name of the codec being used.
-       */
-      string name;
-
-      /**
-       * Numerical sample rate.
-       */
-      int samplerate;
-
-      /**
-       * Number of channels present.
-       */
-      int channels;
-   };
-
-   /**
-    * Interface to a service that interprets format discovery parameters and returns a concrete class
-    * representing them.
-    */
-   interface MediaFormatService
-   {
-      /**
-       * Method which returns a concrete format class given discovery parameters.
-       *
-       * @param format A concrete format discovery class containing parameters of the format.
-       *
-       * @return Format A concrete format class representing the format as described in the
-       *                format discovery class.
-       */
-      idempotent Format getFormat(FormatDiscovery format);
-   };
-
-   /**
-    * A generic media operation class that can be extended for adding parameters. The parameters are used to find
-    * a component capable of performing the described operation.
-    */
-   ["visitor"] local class MediaOperationVisitor
-   {
-   };
-
-   ["visitor:MediaOperationVisitor"] class MediaOperation
-   {
-   };
-
-   /**
-    * A sequence of media operations. These are ordered in the order in which they should be
-    * executed.
-    */
-   sequence<MediaOperation> MediaOperationSeq;
-
-   /**
-    * A transcoding media operation class that is used to transcode from one format to other.
-    */
-   class MediaOperationTranscode extends MediaOperation
-   {
-      /**
-       * A concrete format class describing the format that frames will be received in.
-       */
-      Format from;
-
-      /**
-       * A concrete format class describing the format that frames should be sent in.
-       */
-      Format to;
-   };
-
-   /**
-    * A media operation query result class, this gets returned by a media operation service when queried.
-    */
-   ["visitor"] local class MediaOperationQueryResultVisitor
-   {
-   };
-
-   ["visitor:MediaOperationQueryResultVisitor"] class MediaOperationQueryResult
-   {
-      /**
-       * A concrete class describing the operation that the media operation service can perform.
-       */
-      MediaOperation operation;
-
-      /**
-       * An arbitrary numerical score from 1 to 100 of how well the media operation service can perform
-       * the above operation. This value is used to determine the best route and best component to use
-       * for a sequence of media operations when faced with multiple choices.
-       */
-      int score;
-   };
-
-   /**
-    * A sequence of media operation query results, returned by the MediaOperationService interface.
-    */
-   sequence<MediaOperationQueryResult> MediaOperationQueryResultSeq;
-
-   /**
-    * Interface to a service which performs a media operation.
-    */
-   interface MediaOperationService
-   {
-      /**
-       * Method which determines how well supported operations are.
-       *
-       * @param operations A sequence of media operations that are to be performed.
-       *
-       * @return MediaOperationQueryResultSeq A sequence of supported operations with a score of how well
-       *                                      they can be performed.
-       */
-      idempotent MediaOperationQueryResultSeq isSupported(MediaOperationSeq operations);
-
-      /**
-       * Method which allocates a media operation session.
-       *
-       * @param operations A sequence of media operations that are to be performed.
-       *
-       * @return MediaOperationSession* A proxy to a media operation session that will perform the given media
-       *                                operations.
-       */
-      MediaOperationSession *allocate(MediaOperationSeq operations);
-   };
-
-   /**
-    * A generic frame class that contains common details about frames. Additional classes should extend this to provide
-    * additional details about the frame.
-    */
-   ["visitor:FrameVisitor"] class Frame
-   {
-      /**
-       * A concrete format class describing the format that this frame is in.
-       */
-      Format mediaformat;
-
-      /**
-       * A sequence of bytes which contain the actual data payload of this frame.
-       */
-      Ice::ByteSeq payload;
-   };
-
-   /**
-    * An additional frame class which is provided for stream based frames.
-    */
-   class StreamFrame extends Frame
-   {
-      /**
-       * Timestamp of the frame.
-       */
-      long timestamp;
-
-      /**
-       * Numerical sequence number of the frame.
-       */
-      long seqno;
-   };
-
-   /**
-    * An additional frame class which is provided for audio frames.
-    */
-   class AudioFrame extends StreamFrame
-   {
-   };
-
-   /**
-    * An additional frame class which is provided for video frames.
-    */
-   class VideoFrame extends StreamFrame
-   {
-   };
-
-   /**
-    * A generic format class that provides common information about formats. Additional classes should extend
-    * this to provide additional details about the format.
-    */
-   ["visitor:FormatVisitor"] class Format
-   {
-      /**
-       * A string containing a human readable name for the format, this may not be unique and is
-       * only meant to be used in logging and event messages.
-       */
-      string name;
-   };
-
-   /**
-    * An additional format class which is provided for audio formats.
-    */
-   class AudioFormat extends Format
-   {
-      /**
-       * Numerical sample rate.
-       */
-      int sampleRate;
-
-      /**
-       * Numerical frame size.
-       */
-      int frameSize;
-
-      /**
-       * Numerical maximum frame size that is supported.
-       */
-      int maximumFrameSize;
-
-      /**
-       * Numerical minimum frame size that is supported.
-       */
-      int minimumFrameSize;
-   };
-
-   /**
-    * An additional format class which is provided for video formats.
-    */
-   class VideoFormat extends Format
-   {
-      /**
-       * Numerical maximum allowed bandwidth.
-       */
-      int maximumBandwidth;
-
-      /**
-       * Numerical maximum allowed bitrate.
-       */
-      int maximumBitrate;
-   };
+    /**
+     * String representation of the version of this interface
+     */
+    const string Version = "V1";
+
+    /**
+     * Forward declaration of the Frame class so we can define a sequence of them.
+     */
+    class Frame;
+
+    /**
+     * Visitor class for frames.
+     */
+    ["visitor"] local class FrameVisitor
+    {
+    };
+
+    /**
+     * Forward declaration of the Format class so we can define a sequence of them.
+     */
+    class Format;
+
+    /**
+     * Visitor class for formats.
+     */
+    ["visitor"] local class FormatVisitor
+    {
+    };
+
+    /**
+     * Forward declaration of the StreamSource interface so we can define a sequence of proxies to them.
+     */
+    interface StreamSource;
+
+    /**
+     * Forward declaration of the StreamSink interface so we can define a sequence of proxies to them.
+     */
+    interface StreamSink;
+
+    /**
+     * A sequence of stream source proxies.
+     */
+    sequence<StreamSource*> StreamSourceSeq;
+
+    /**
+     * A sequence of stream sink proxies.
+     */
+    sequence<StreamSink*> StreamSinkSeq;
+
+    /**
+     * A sequence of concrete formats.
+     */
+    sequence<Format> FormatSeq;
+
+    /**
+     * A sequence of concrete frames.
+     */
+    sequence<Frame> FrameSeq;
+
+    /**
+     * States that a stream can be in.
+     */
+    enum StreamState
+    {
+        /**
+         * Media is being sent and received.
+         */
+        SendAndReceive,
+
+        /**
+         * Media is only being sent out.
+         */
+        SendOnly,
+
+        /**
+         * Media is only being received.
+         */
+        ReceiveOnly,
+
+        /**
+         * Media is not being sent or received.
+         */
+        Inactive,
+
+        /**
+         * The stream is no longer available.
+         */
+        Removed,
+    };
+
+    /**
+     * Class which contains information about a stream.
+     */
+    class StreamInformation
+    {
+        /**
+         * Current state of the stream.
+         *
+         * Default value is to send and receive media.
+         */
+        StreamState state = SendAndReceive;
+
+        /**
+         * Formats carried over this stream.
+         */
+        FormatSeq formats;
+
+        /**
+         * Sinks where media can be sent.
+         */
+        StreamSinkSeq sinks;
+
+        /**
+         * Sources where media may come from.
+         */
+        StreamSourceSeq sources;
+    };
+
+    /**
+     * A dictionary of streams. The key is a unique identifier for the stream.
+     * The value is information about the stream.
+     */
+    dictionary<string, StreamInformation> StreamInformationDict;
+
+    /**
+     * A dictionary of streams and states. This is used to change the state of
+     * streams.
+     */
+    dictionary<string, StreamState> StreamStateDict;
+
+    /**
+     * Interface to a container of media sources and sinks.
+     */
+    interface Session
+    {
+        /**
+         * Method which returns the stream sources that are on the session.
+         *
+         * @return StreamSourceSeq A sequence of stream sources.
+         */
+        StreamSourceSeq getSources();
+
+        /**
+         * Method which returns the stream sinks that are on the session.
+         *
+         * @return StreamSinkSeq A sequence of stream sinks.
+         */
+        StreamSinkSeq getSinks();
+
+        /**
+         * Method which returns a unique identifier for the session.
+         *
+         * @return string A string identifier for the session.
+         */
+        idempotent string getId();
+    };
+
+    /**
+     * Exception that gets thrown if a sink receives a format that it cannot handle.
+     */
+    exception UnsupportedMediaFormatException { };
+
+    /**
+     * Exception that gets thrown if a fatal error occurs on a stream or sink.
+     */
+    exception FatalStreamException { };
+
+    /**
+     * Exception that gets thrown if a source cannot switch to a different format.
+     */
+    exception MediaFormatSwitchException { };
+
+    /**
+     * Interface to a source of media.
+     */
+    interface StreamSource
+    {
+        /**
+         * Method which adds a sink that media will be written to.
+         *
+         * @param destination A proxy to a stream sink where media will be sent to.
+         */
+        void addSink(StreamSink* destination);
+
+        /**
+         * Method which removes a sink. Once removed media will no longer be written to it.
+         *
+         * @param destination A proxy to the stream sink to be removed.
+         */
+        void removeSink(StreamSink* destination);
+
+        /**
+         * Method which retrieves the current stream sinks for media.
+         *
+         * @return StreamSinkSeq A sequence of proxies where media is being written to.
+         */
+        idempotent StreamSinkSeq getSinks();
+
+        /**
+         * Method which returns the formats that frames from this source may come in.
+         *
+         * @return FormatSeq A sequence of concrete format classes.
+         */
+        idempotent FormatSeq getFormats();
+
+        /**
+         * Method which returns a unique identifier for the source.
+         *
+         * @return string A string identifier for the source.
+         */
+        idempotent string getId();
+
+        /**
+         * Method which requests that the source change the format of frames being sent to ALL sinks.
+         *
+         * @param Format A concrete class describing the format to change to.
+         *
+         * @throws MediaFormatSwitchException if the source could not be switched to the requested format.
+         */
+        void requestFormat(Format newformat) throws MediaFormatSwitchException;
+    };
+
+    /**
+     * Interface to a sink for media.
+     */
+    interface StreamSink
+    {
+        /**
+         * Method which gives the implementation a sequence of frames which it will then deal with in an implementation
+         * specific manner.
+         *
+         * @param frames A sequence of frames.
+         *
+         * @throws UnsupportedMediaFormatException if the format of a frame is not supported by the sink.
+         *
+         * @throws FatalStreamException if the frame could not be handled due to reasons outside the control of the sink.
+         */
+        void write(FrameSeq frames) throws UnsupportedMediaFormatException, FatalStreamException;
+
+        /**
+         * Method which changes the source of media being sent to this sink.
+         *
+         * NOTE: This operation should only be called by the StreamSource itself.
+         *
+         * @param source A proxy to the stream source that media is being received from.
+         */
+        idempotent void setSource(StreamSource* source);
+
+        /**
+         * Method which retrieves the current stream source of media.
+         *
+         * @return StreamSource* A proxy to the stream source that media is being received from.
+         */
+        idempotent StreamSource* getSource();
+
+        /**
+         * Method which returns the formats of frames that this sink can handle.
+         *
+         * @return FormatSeq A sequence of concrete format classes.
+         */
+        idempotent FormatSeq getFormats();
+
+        /**
+         * Method which returns a unique identifier for the sink.
+         *
+         * @return string A string identifier for the sink.
+         */
+        idempotent string getId();
+    };
+
+    /**
+     * A generic frame class that contains common details about frames. Additional classes should extend this to provide
+     * additional details about the frame.
+     */
+    ["visitor:FrameVisitor"] class Frame
+    {
+        /**
+         * A concrete format class describing the format that this frame is in.
+         */
+        Format mediaFormat;
+
+        /**
+         * A sequence of bytes which contain the actual data payload of this frame.
+         */
+        Ice::ByteSeq payload;
+    };
+
+    /**
+     * An additional frame class which is provided for frames that are part of a stream.
+     */
+    class StreamFrame extends Frame
+    {
+        /**
+         * Timestamp of the frame.
+         */
+        long timestamp;
+
+        /**
+         * Numerical sequence number of the frame.
+         */
+        long seqno;
+    };
+
+    /**
+     * An additional frame class which is provided for audio frames.
+     */
+    class AudioFrame extends StreamFrame
+    {
+    };
+
+    /**
+     * An additional frame class which is provided for video frames.
+     */
+    class VideoFrame extends StreamFrame
+    {
+    };
+
+    /**
+     * Interface used to perform operations on a format.
+     */
+    interface FormatOperationsService
+    {
+        /**
+         * Method which determines if two formats are compatible or not.
+         *
+         * @param format1 First format.
+         *
+         * @param format2 Second format.
+         *
+         * @return bool True if compatible, false if not.
+         */
+        idempotent bool checkCompatible(Format format1, Format format2);
+    };
+
+    /**
+     * A generic format class that provides common information about formats. Additional classes should extend
+     * this to provide additional details about their format.
+     */
+    ["visitor:FormatVisitor"] class Format
+    {
+        /**
+         * A string containing a name for the format, this should be unique to the specifications of the format
+         * and is used to do a baseline comparison of two formats to decide if they contain similar details.
+         *
+         * This *must* be populated.
+         */
+        string name;
+
+        /**
+         * A proxy to a service that can perform operations relating to this format.
+         */
+        FormatOperationsService *operations;
+    };
+
+    /**
+     * An additional format class which is provided for audio formats.
+     */
+    class AudioFormat extends Format
+    {
+        /**
+         * Numerical sample rate specified in Hz.
+         */
+        int sampleRate;
+
+        /**
+         * Numerical samples per frame.
+         */
+        int frameSize;
+
+        /**
+         * Numerical maximum samples per frame that is supported.
+         */
+        int maximumFrameSize;
+
+        /**
+         * Numerical minimum samples per frame that is supported.
+         */
+        int minimumFrameSize;
+    };
+
+    /**
+     * An additional format class which is provided for video formats.
+     */
+    class VideoFormat extends Format
+    {
+        /**
+         * Numerical maximum allowed bandwidth specified in Kbps.
+         */
+        int maximumBandwidth;
+
+        /**
+         * Numerical maximum allowed bitrate specified in Kbps.
+         */
+        int maximumBitrate;
+    };
 
 }; /*  end module V1 */
 
diff --git a/slice/AsteriskSCF/Media/SDP/MediaSDPIf.ice b/slice/AsteriskSCF/Media/SDP/MediaSDPIf.ice
new file mode 100644
index 0000000..6b166fb
--- /dev/null
+++ b/slice/AsteriskSCF/Media/SDP/MediaSDPIf.ice
@@ -0,0 +1,133 @@
+/*
+ * 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.
+ */
+
+#include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.ice>
+#include <AsteriskSCF/Media/MediaIf.ice>
+
+module AsteriskSCF
+{
+
+module Media
+{
+
+module SDP
+{
+
+["suppress"]
+module V1
+{
+    /**
+     * String representation of the version of this interface
+     */
+    const string Version = "V1";
+
+    /**
+     * Extended discovery class for SDP descriptor services.
+     */
+    unsliceable class SDPDescriptorServiceLocatorParams extends AsteriskSCF::Core::Discovery::V1::ServiceLocatorParams
+    {
+        /**
+         * Name of the media format.
+         */
+        string name;
+    };
+
+    /**
+     * A sequence of strings with each string containing a format specific parameter from SDP.
+     */
+    sequence<string> SDPFormatParameterSeq;
+
+    /**
+     * SDP Descriptor class. Contains description information for a media format.
+     */
+    class SDPDescriptor
+    {
+        /**
+         * Numerical payload value given in the SDP.
+         *
+         * If this is set to -1 the user of this descriptor should assign a dynamic payload
+         * themselves.
+         */
+        int payload;
+
+        /**
+         * String type of the format (audio/video/etc)
+         */
+        string type;
+
+        /**
+         * String subtype of the format (in the case of audio something like PCMU)
+         */
+        string subtype;
+
+        /**
+         * Numerical sample rate of the format.
+         */
+        int samplerate;
+
+        /**
+         * A sequence of format specific parameters.
+         */
+        SDPFormatParameterSeq parameters;
+    };
+
+    /**
+     * Interface to the SDP descriptor service which translates between SDP and media formats.
+     */
+    interface SDPDescriptorService
+    {
+        /**
+         * Method which retrieves a media format concrete class given a specific name.
+         *
+         * @param name Name of the media format, may contain additional details according to the descriptor service.
+         *
+         * @param sampleRate The sample rate for the frames.
+         *
+         * @param frameSize The amount of audio contained within the frames.
+         *
+         * @param formatSpecific Any format specific information that is not understood.
+         *
+         * @return Format A concrete class containing media format details for the given format.
+         */
+        idempotent AsteriskSCF::Media::V1::Format getNamedFormat(string name, int sampleRate, int frameSize,
+                                                                 Ice::StringSeq formatSpecific);
+
+        /**
+         * Method which retrieves a media format concrete class given an SDP descriptor concrete class.
+         *
+         * @param descriptor Populated SDP descriptor class.
+         *
+         * @return Format A concrete class containing media format details for the SDP.
+         */
+        idempotent AsteriskSCF::Media::V1::Format getDescribedFormat(SDPDescriptor descriptor);
+
+        /**
+         * Method which retrieves an SDP descriptor concrete class given a media format concrete class.
+         *
+         * @param mediaformat Media format concrete class.
+         *
+         * @return SDPDescriptor A concrete class containing SDP describing the media format.
+         */
+        idempotent SDPDescriptor getDescriptor(AsteriskSCF::Media::V1::Format mediaformat);
+    };
+
+}; /*  end module V1 */
+
+}; /*  end module SDP */
+
+}; /*  end module Media */
+
+}; /*  end module AsteriskSCF */
diff --git a/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice b/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
index 7edc171..5fdec3e 100644
--- a/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
+++ b/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
@@ -625,7 +625,8 @@ module V1
     {
         /**
          * Creates a session for the specified destination, optionally registering
-         * a SessionListener object for notification of changes to the session.
+         * a SessionListener object for notification of changes to the session and also
+         * optionally specifying the streams that should be present on the session.
          *
          * @param destination A stringified identifier or address for the destination.
          *

commit 1325c7885168376402c709476967af251cf63514
Author: David M. Lee <dlee at digium.com>
Date:   Tue Jul 5 10:25:21 2011 -0500

    Removed comments that did no one any good.

diff --git a/build.xml b/build.xml
index dc4f1c4..cc2fd0d 100644
--- a/build.xml
+++ b/build.xml
@@ -118,18 +118,7 @@ Either configure in ~/.ant/repositories.properties, or configure using -D
         <copy file="pom.xml.in" tofile="${generated-pom-dir}/pom.xml"
               filtering="true" failonerror="true"/>
         <artifact:pom id="pom" file="${generated-pom-dir}/pom.xml"/>
-<!--
-        <input message="username: " addproperty="repository.username"/>
-        <input message="password: " addproperty="repository.password">
-            <handler classname="org.apache.tools.ant.input.SecureInputHandler" />
-        </input>
--->
         <artifact:deploy file="java/astscf-api.jar" pomrefid="pom">
-<!--
-            <remoteRepository url="http://artifactory.digium.internal/artifactory/libs-snapshot-local">
-                <authentication username="${repository.username}" password="${repository.password}"/>
-            </remoteRepository>
--->
             <attach file="java/astscf-api-sources.jar"
                     classifier="sources"/>
             <attach file="java/astscf-api-javadoc.jar"

commit a461475bc6a2dc40d2d3e6142b9a1d1eef423687
Author: David M. Lee <dlee at digium.com>
Date:   Fri Jul 1 11:28:57 2011 -0500

    Added deploy targets.

diff --git a/build.xml b/build.xml
index 63807e3..dc4f1c4 100644
--- a/build.xml
+++ b/build.xml
@@ -11,8 +11,14 @@
 
     <property name="mvn.version" value="2.1.1"/>
 
-    <include file="install-ice-jar.xml" as="ice"/>
+    <!--
+      ~ This optional file contains the properties:
+      ~ release.repo.url - URL to deploy release artifacts
+      ~ snapshot.repo.url - URL to deploy snapshot artifacts
+      -->
+    <property file="${user.home}/.ant/repositories.properties"/>
 
+    <include file="install-ice-jar.xml" as="ice"/>
 
     <path id="maven-ant-tasks.classpath"
           path="lib/maven-ant-tasks-${mvn.version}.jar"/>
@@ -95,6 +101,42 @@
         </artifact:install>
     </target>
 
+    <target name="fail-if-no-snapshot-repo" unless="snapshot.repo.url">
+        <fail>snapshot.repo.url undefined!
+Either configure in ~/.ant/repositories.properties, or configure using -D
+        </fail>
+    </target>
+
+    <target name="fail-if-no-release-repo" unless="release.repo.url">
+        <fail>release.repo.url undefined!
+Either configure in ~/.ant/repositories.properties, or configure using -D
+        </fail>
+    </target>
+
+    <target name="deploy" depends="package,ice.get-ice-version,fail-if-no-snapshot-repo,fail-if-no-release-repo"
+            description="deploys packages into local Maven repo">
+        <copy file="pom.xml.in" tofile="${generated-pom-dir}/pom.xml"
+              filtering="true" failonerror="true"/>
+        <artifact:pom id="pom" file="${generated-pom-dir}/pom.xml"/>
+<!--
+        <input message="username: " addproperty="repository.username"/>
+        <input message="password: " addproperty="repository.password">
+            <handler classname="org.apache.tools.ant.input.SecureInputHandler" />
+        </input>
+-->
+        <artifact:deploy file="java/astscf-api.jar" pomrefid="pom">
+<!--
+            <remoteRepository url="http://artifactory.digium.internal/artifactory/libs-snapshot-local">
+                <authentication username="${repository.username}" password="${repository.password}"/>
+            </remoteRepository>
+-->
+            <attach file="java/astscf-api-sources.jar"
+                    classifier="sources"/>
+            <attach file="java/astscf-api-javadoc.jar"
+                    classifier="javadoc"/>
+        </artifact:deploy>
+    </target>
+
     <target name="clean"
             description="Clean">
         <delete dir="java"/>
diff --git a/install-ice-jar.xml b/install-ice-jar.xml
index 70c0571..902a118 100644
--- a/install-ice-jar.xml
+++ b/install-ice-jar.xml
@@ -46,4 +46,14 @@
         </artifact:install>
     </target>
 
+    <target name="deploy-ice" depends="get-ice-version,ice-src"
+            description="Deploys ice.jar from ICE_HOME into local Maven repo">
+        <copy file="ice-pom.xml.in" tofile="${generated-pom-dir}/ice-pom.xml"
+              filtering="true" failonerror="true"/>
+        <artifact:pom id="ice-pom" file="${generated-pom-dir}/ice-pom.xml"/>
+        <artifact:deploy file="${env.ICE_HOME}/lib/Ice.jar"
+                          pomrefid="ice-pom">
+            <attach file="java/Ice-sources.jar" classifier="sources"/>
+        </artifact:deploy>
+    </target>
 </project>

commit 5c33e83d9428a31c82df051ad28784719c093cc7
Author: David M. Lee <dlee at digium.com>
Date:   Fri Jul 1 11:27:27 2011 -0500

    Prepare for deployment to artifact server.
    
    * Add distribution management to Ice pom file
    * Change Ice version to snapshot, since we're not actually releasing it

diff --git a/ice-pom.xml.in b/ice-pom.xml.in
index d420b49..e69c15f 100644
--- a/ice-pom.xml.in
+++ b/ice-pom.xml.in
@@ -7,7 +7,26 @@
 
     <groupId>com.zeroc</groupId>
     <artifactId>ice</artifactId>
-    <version>@ice-version at -digium</version>
+    <!-- The -digium is b/c we still have a patched version of Ice -->
+    <version>@ice-version at -digium-SNAPSHOT</version>
 
     <name>Ice for Java</name>
+
+    <distributionManagement>
+        <!--
+          ~ Asterisk SCF doesn't provide a public Maven repo.  If you wish to
+          ~ deploy to your own repo, provide settings for release.repo.url or
+          ~ snapshot.repo.url
+          -->
+        <repository>
+            <id>asterisk.repo</id>
+            <name>Asterisk SCF Distribution Repo</name>
+            <url>${release.repo.url}</url>
+        </repository>
+        <snapshotRepository>
+            <id>asterisk.repo</id>
+            <name>Asterisk SCF Distribution Repo</name>
+            <url>${snapshot.repo.url}</url>
+        </snapshotRepository>
+    </distributionManagement>
 </project>
diff --git a/pom.xml.in b/pom.xml.in
index b4107ad..d0da3c8 100644
--- a/pom.xml.in
+++ b/pom.xml.in
@@ -15,7 +15,7 @@
         <dependency>
             <groupId>com.zeroc</groupId>
             <artifactId>ice</artifactId>
-            <version>@ice-version at -digium</version>
+            <version>@ice-version at -digium-SNAPSHOT</version>
         </dependency>
     </dependencies>
 

commit 982413fb056b9d2c8ca1ffc639f5613acfc96ea0
Author: David M. Lee <dlee at digium.com>
Date:   Thu Jun 30 12:23:04 2011 -0500

    Adding distributionManagement for mvn deploy

diff --git a/pom.xml.in b/pom.xml.in
index e7e18a6..b4107ad 100644
--- a/pom.xml.in
+++ b/pom.xml.in
@@ -18,4 +18,22 @@
             <version>@ice-version at -digium</version>
         </dependency>
     </dependencies>
+
+    <distributionManagement>
+        <!--
+          ~ Asterisk SCF doesn't provide a public Maven repo.  If you wish to
+          ~ deploy to your own repo, provide settings for release.repo.url or
+          ~ snapshot.repo.url
+          -->
+        <repository>
+            <id>asterisk.repo</id>
+            <name>Asterisk SCF Distribution Repo</name>
+            <url>${release.repo.url}</url>
+        </repository>
+        <snapshotRepository>
+            <id>asterisk.repo</id>
+            <name>Asterisk SCF Distribution Repo</name>
+            <url>${snapshot.repo.url}</url>
+        </snapshotRepository>
+    </distributionManagement>
 </project>

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


-- 
asterisk-scf/integration/slice.git



More information about the asterisk-scf-commits mailing list