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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu Jun 9 09:03:34 CDT 2011


branch "media" has been updated
       via  e2b00970bce930cf3cafe5203aa459ddd1af308f (commit)
       via  8766c305ac188e3d7b196a420cb6f0a9ffb6e4d0 (commit)
      from  96d0ce2307bc2794b25b7b086ad7bcbf4c1b354a (commit)

Summary of changes:
 AsteriskSCF/Media/Formats/AudioFormats.ice |   44 +-
 AsteriskSCF/Media/MediaIf.ice              |  607 ++++++++++++++--------------
 AsteriskSCF/Media/SDP/MediaSDPIf.ice       |  168 ++++----
 3 files changed, 420 insertions(+), 399 deletions(-)


- Log -----------------------------------------------------------------
commit e2b00970bce930cf3cafe5203aa459ddd1af308f
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu Jun 9 11:06:11 2011 -0300

    Add compatibility check service, used to determine if two formats are compatible or not.

diff --git a/AsteriskSCF/Media/MediaIf.ice b/AsteriskSCF/Media/MediaIf.ice
index a0c9842..e00d48f 100644
--- a/AsteriskSCF/Media/MediaIf.ice
+++ b/AsteriskSCF/Media/MediaIf.ice
@@ -267,6 +267,23 @@ module V1
     };
 
     /**
+     * Interface used to perform a compatibility check between two formats.
+     */
+    interface CompatibilityCheckService
+    {
+        /**
+         * Method which determines if two formats are compatible or not.
+         *
+         * @param format1 First format.
+         *
+         * @param format2 Second format.
+         *
+         * @return bool True if compatibility, false if not.
+         */
+        idempotent bool check(Format format1, Format format2);
+    };
+
+    /**
      * A generic format class that provides common information about formats. Additional classes should extend
      * this to provide additional details about the format.
      */
@@ -277,6 +294,11 @@ module V1
          * only meant to be used in logging and event messages.
          */
         string name;
+
+        /**
+         * A proxy to the service that determines if this format is compatible with another.
+         */
+        CompatibilityCheckService *compatibilityCheck;
     };
 
     /**

commit 8766c305ac188e3d7b196a420cb6f0a9ffb6e4d0
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu Jun 9 11:02:22 2011 -0300

    Guidelines cleanup.

diff --git a/AsteriskSCF/Media/Formats/AudioFormats.ice b/AsteriskSCF/Media/Formats/AudioFormats.ice
index 21f52ac..3272c1e 100644
--- a/AsteriskSCF/Media/Formats/AudioFormats.ice
+++ b/AsteriskSCF/Media/Formats/AudioFormats.ice
@@ -31,30 +31,30 @@ module Audio
 ["suppress"]
 module V1
 {
-   /**
-    * String representation of the version of this interface
-    */
-   const string Version = "V1";
+    /**
+     * String representation of the version of this interface
+     */
+    const string Version = "V1";
 
-   /**
-    * ULAW Audio Format 
-    */
-   unsliceable class ULAW extends AsteriskSCF::Media::V1::AudioFormat
-   {
-       /**
-	* ULAW is so basic that no additional parameters are required
-	*/
-   };
+    /**
+     * ULAW Audio Format 
+     */
+    unsliceable class ULAW extends AsteriskSCF::Media::V1::AudioFormat
+    {
+        /**
+         * ULAW is so basic that no additional parameters are required
+         */
+    };
 
-   /**
-    * ALAW Audio Format
-    */
-   unsliceable class ALAW extends AsteriskSCF::Media::V1::AudioFormat
-   {
-       /**
-        * ALAW is so basic that no additional parameters are required
-        */
-   };
+    /**
+     * ALAW Audio Format
+     */
+    unsliceable class ALAW extends AsteriskSCF::Media::V1::AudioFormat
+    {
+        /**
+         * ALAW is so basic that no additional parameters are required
+         */
+    };
 
 }; /*  end module V1 */
 
diff --git a/AsteriskSCF/Media/MediaIf.ice b/AsteriskSCF/Media/MediaIf.ice
index fb8524e..a0c9842 100644
--- a/AsteriskSCF/Media/MediaIf.ice
+++ b/AsteriskSCF/Media/MediaIf.ice
@@ -28,299 +28,298 @@ 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 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 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();
-   };
-
-   /**
-    * 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.
+     */
+    ["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 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 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();
+    };
+
+    /**
+     * 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;
+    };
 
 }; /*  end module V1 */
 
diff --git a/AsteriskSCF/Media/SDP/MediaSDPIf.ice b/AsteriskSCF/Media/SDP/MediaSDPIf.ice
index e1a3c57..0750835 100644
--- a/AsteriskSCF/Media/SDP/MediaSDPIf.ice
+++ b/AsteriskSCF/Media/SDP/MediaSDPIf.ice
@@ -29,90 +29,90 @@ 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.
-	*/
-       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.
-	*
-	* @return Format A concrete class containing media format details for the given format.
-	*/
-       idempotent AsteriskSCF::Media::V1::Format getNamedFormat(string name);
-
-       /**
-	* 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);
-   };
+    /**
+     * 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.
+         */
+        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.
+         *
+         * @return Format A concrete class containing media format details for the given format.
+         */
+        idempotent AsteriskSCF::Media::V1::Format getNamedFormat(string name);
+
+        /**
+         * 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 */
 

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


-- 
asterisk-scf/integration/slice.git



More information about the asterisk-scf-commits mailing list