[hydra-commits] hydra/media_format_ulaw.git branch "master" updated.

Commits to the Hydra project code repositories hydra-commits at lists.digium.com
Thu Aug 5 16:05:36 CDT 2010


branch "master" has been updated
       via  81df46d3a814beb347ff2af53a510619936b46f6 (commit)
       via  359fd5cd9740bfc195e93e8970f24ad3e308ed1d (commit)
       via  0e77a1691d01d29216fc7294c2af1160a172aeee (commit)
       via  340e844ea127ad81172e8fc676d5c7c2d5b77868 (commit)
      from  6a15510b1222a86115956630ef07708fbabf8805 (commit)

Summary of changes:
 .gitmodules                  |    3 +
 CMakeLists.txt               |    2 +-
 slice                        |    1 +
 slice/CMakeLists.txt         |    6 -
 slice/media.ice              |  482 ------------------------------------------
 slice/service_locator.ice    |  158 --------------
 src/CMakeLists.txt           |    4 +-
 src/MediaFormatULAW.cpp      |    8 +-
 test/CMakeLists.txt          |    2 +-
 test/TestMediaFormatULAW.cpp |    6 +-
 10 files changed, 15 insertions(+), 657 deletions(-)
 create mode 160000 slice
 delete mode 100644 slice/CMakeLists.txt
 delete mode 100644 slice/media.ice
 delete mode 100644 slice/service_locator.ice


- Log -----------------------------------------------------------------
commit 81df46d3a814beb347ff2af53a510619936b46f6
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu Aug 5 18:21:11 2010 -0300

    Update to use new slice repo with new names.

diff --git a/slice b/slice
index 789865a..e1421ed 160000
--- a/slice
+++ b/slice
@@ -1 +1 @@
-Subproject commit 789865a5ee6bd8f11ce9cdba4ec1600ab8ef9920
+Subproject commit e1421edc4796f51231c4b34bfc65efe19fe17edd
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e711b8a..c1102b5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,6 +1,6 @@
 hydra_component_init(media_format_ulaw CXX)
-hydra_component_add_slice(media_format_ulaw service_locator)
-hydra_component_add_slice(media_format_ulaw media)
+hydra_component_add_slice(media_format_ulaw ServiceLocatorI)
+hydra_component_add_slice(media_format_ulaw MediaI)
 hydra_component_add_file(media_format_ulaw MediaFormatULAW.cpp)
 hydra_component_build_standalone(media_format_ulaw)
 hydra_component_install(media_format_ulaw RUNTIME bin "Media Format ULAW." Media)
diff --git a/src/MediaFormatULAW.cpp b/src/MediaFormatULAW.cpp
index 6ff3ca2..12a61ba 100644
--- a/src/MediaFormatULAW.cpp
+++ b/src/MediaFormatULAW.cpp
@@ -18,11 +18,11 @@
 
 #include <Ice/Ice.h>
 
-#include "service_locator.h"
-#include "media.h"
+#include "core/ServiceLocatorI.h"
+#include "media/MediaI.h"
 
 using namespace std;
-using namespace Hydra::Location::V1;
+using namespace Hydra::Core::Discovery::V1;
 using namespace Hydra::Media::V1;
 
 /**
@@ -61,7 +61,7 @@ public:
 	 * performs checks on various types of discovery classes to determine if our component
 	 * should be chosen.
 	 */
-	bool isSupported(const Hydra::Location::V1::ServiceLocatorParamsPtr& params, const Ice::Current&)
+	bool isSupported(const Hydra::Core::Discovery::V1::ServiceLocatorParamsPtr& params, const Ice::Current&)
 	{
 		FormatDiscoveryNamePtr discoveryname;
 		FormatDiscoverySDPPtr discoverysdp;
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 5a73669..0c7f39b 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,6 +1,6 @@
 hydra_component_init(media_format_ulaw_test CXX)
 hydra_component_add_file(media_format_ulaw_test TestMediaFormatULAW.cpp)
-hydra_component_add_slice(media_format_ulaw_test media)
+hydra_component_add_slice(media_format_ulaw_test MediaI)
 hydra_component_add_boost_libraries(media_format_ulaw_test unit_test_framework)
 hydra_component_build_standalone(media_format_ulaw_test)
 hydra_component_install(media_format_ulaw_test RUNTIME bin "Media Format ULAW Test Driver." Core)
diff --git a/test/TestMediaFormatULAW.cpp b/test/TestMediaFormatULAW.cpp
index 7069b7a..6c52f68 100644
--- a/test/TestMediaFormatULAW.cpp
+++ b/test/TestMediaFormatULAW.cpp
@@ -7,11 +7,11 @@
 
 #include <Ice/Ice.h>
 
-#include "service_locator.h"
-#include "media.h"
+#include "core/ServiceLocatorI.h"
+#include "media/MediaI.h"
 
 using namespace std;
-using namespace Hydra::Location::V1;
+using namespace Hydra::Core::Discovery::V1;
 using namespace Hydra::Media::V1;
 
 /* Cache the command line arguments so that Ice can be initialized within the global fixture. */

commit 359fd5cd9740bfc195e93e8970f24ad3e308ed1d
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu Aug 5 18:10:30 2010 -0300

    Update based on new submodule slice usage.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ff44655..88c29d0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,7 +10,7 @@ include(cmake/Hydra_v4.cmake)
 hydra_project(media_format_ulaw 3.4 CXX)
 
 # Knock out slice definitions
-add_subdirectory(slice)
+add_subdirectory(slice EXCLUDE_FROM_ALL)
 
 # Take care of the source code for this project
 add_subdirectory(src)

commit 0e77a1691d01d29216fc7294c2af1160a172aeee
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu Aug 5 18:10:08 2010 -0300

    Add a submodule for slice definitions.

diff --git a/.gitmodules b/.gitmodules
index 0f6d7db..b35270a 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,6 @@
 [submodule "cmake"]
 	path = cmake
 	url = git at git.asterisk.org:hydra/cmake
+[submodule "slice"]
+	path = slice
+	url = git at git.asterisk.org:hydra/slice
diff --git a/slice b/slice
new file mode 160000
index 0000000..789865a
--- /dev/null
+++ b/slice
@@ -0,0 +1 @@
+Subproject commit 789865a5ee6bd8f11ce9cdba4ec1600ab8ef9920

commit 340e844ea127ad81172e8fc676d5c7c2d5b77868
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu Aug 5 18:09:40 2010 -0300

    Remove old slice directory.

diff --git a/slice/CMakeLists.txt b/slice/CMakeLists.txt
deleted file mode 100644
index baa9f28..0000000
--- a/slice/CMakeLists.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-# Compile our service discovery slice definition so we can then use it
-hydra_compile_slice(service_locator.ice lib "Slice Defined API" Core)
-
-# Oh, and of course media!
-hydra_compile_slice(media.ice lib "Slice Defined API" Core)
-
diff --git a/slice/media.ice b/slice/media.ice
deleted file mode 100644
index 2bf761c..0000000
--- a/slice/media.ice
+++ /dev/null
@@ -1,482 +0,0 @@
-#include <Ice/BuiltinSequences.ice>
-#include "service_locator.ice"
-
-module Hydra
-{
-
-module Media
-{
-
-module V1
-{
-
-	/**
-	 * Forward declaration of the Frame class so we can define a sequence of them.
-	 */
-	class Frame;
-
-	/**
-	 * Forward declaration of the Format class so we can define a sequence of them.
-	 */
-	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.
-		 */
-		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.
-		 */
-		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.
-	 */
-	class FormatDiscovery extends Hydra::Location::V1::ServiceLocatorParams
-	{
-	};
-
-	/**
-	 * A format discovery class that allows finding a format based on name.
-	 */
-	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.
-	 */
-	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.
-	 */
-	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.
-	 */
-	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.
-	 */
-	class MediaOperation
-	{
-	};
-
-	/**
-	 * 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 sequence of media operations. These are ordered in the order in which they should be
-	 * executed.
-	 */
-	sequence<MediaOperation> MediaOperationSeq;
-
-	/**
-	 * A media operation query result class, this gets returned by a media operation service when queried.
-	 */
-	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.
-	 */
-	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.
-	 */
-	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
-
-}; // end module Media
-
-}; // end module Hydra
diff --git a/slice/service_locator.ice b/slice/service_locator.ice
deleted file mode 100644
index 5b97a58..0000000
--- a/slice/service_locator.ice
+++ /dev/null
@@ -1,158 +0,0 @@
-#include <Ice/BuiltinSequences.ice>
-
-module Hydra
-{
-
-module Location
-{
-
-module V1
-{
-
-	/**
-	 * Exception used for service locator requests to indicate that no service could be found.
-	 */
-	exception ServiceNotFound
-	{
-	};
-
-	/**
-	 * Exception used for indicating that a comparator is already registered with a given guid.
-	 */
-	exception DuplicateCompare
-	{
-	};
-
-	/**
-	 * Exception used for indicating that a comparator was not found.
-	 */
-	exception CompareNotFound
-	{
-	};
-
-	/**
-	 * Generic service locator parameters class that more specific parameter classes can extend.
-	 */
-	["preserved"] class ServiceLocatorParams
-	{
-		/**
-		 * Basic category for the service, such as bridge or channel service.
-		 */
-		string category;
-	};
-
-	/**
-	 * Interface used to perform service locator requests.
-	 */
-	interface ServiceLocator
-	{
-		/**
-		 * Method which performs a locator request using provided parameters but only returns a single
-		 * proxy.
-		 *
-		 * @param params A concrete class containing parameters describing the service that is trying to be found.
-		 *
-		 * @return A proxy to the service matching the given parameters.
-		 */
-		idempotent Object *locate(ServiceLocatorParams params) throws ServiceNotFound;
-
-		/**
-		 * Method which performs a location request using provided parameters but can return multiple
-		 * proxies.
-		 *
-		 * @param params A concrete class containing parameters describing the service that is trying to be found.
-		 *
-		 * @return A sequence of proxies which match the given parameters.
-		 */
-		idempotent Ice::ObjectProxySeq locateAll(ServiceLocatorParams params) throws ServiceNotFound;
-	};
-
-	/**
-	 * Interface to the service locator component which allows manipulation of registered service.
-	 */
-	interface ServiceManagement
-	{
-		/**
-		 * Method which adds supported discovery parameters to a registered service.
-		 *
-		 * @param params A concrete class containing parameters describing what is supported.
-		 *
-		 * @param compareguid The unique identifier of a comparator which can perform a lower level
-		 *              comparison to determine whether supplied parameters in a locator request
-		 *              are truly supported or not. This is optional.
-		 */
-		void addLocatorParams(ServiceLocatorParams params, string compareguid);
-
-		/**
-		 * Method which suspends this service from being considered when a locator request
-		 * is performed.
-		 */
-		void suspend();
-
-		/**
-		 * Method which unsuspends this service. Once this method is called the service will
-		 * be able to found again when a locator request is performed.
-		 */
-		void unsuspend();
-
-		/**
-		 * Method which unregisters this service from the service locator.
-		 */
-		void unregister();
-	};
-
-	/**
-	 * Interface to an external component which performs a service locator parameters comparison.
-	 */
-	interface ServiceLocatorParamsCompare
-	{
-		/**
-		 * Method which determines whether provided parameters are supported by the
-		 * comparator or not.
-		 *
-		 * @param params A concrete class containing parameters describing the service that is trying to be found.
-		 *
-		 * @return A boolean value with true meaning the parameters are supported and false if not.
-		 *
-		 */
-		bool isSupported(ServiceLocatorParams params);
-	};
-
-	/**
-	 * Interface to do service locator management, such as adding services and comparators.
-	 */
-	interface ServiceLocatorManagement
-	{
-		/**
-		 * Method which adds a service to the service locator.
-		 *
-		 * @param service A proxy to the service that is being registered.
-		 *
-		 * @param guid A unique identifier for the service which is used in events.
-		 *
-		 * @return A proxy to the service management interface for this service.
-		 */
-		ServiceManagement *addService(Object *service, string guid);
-
-		/**
-		 * Method which adds a comparator to the service locator.
-		 *
-		 * @param compareguid A unique identifier for this comparator.
-		 *
-		 * @param compare A proxy to the comparator service.
-		 */
-		void addCompare(string compareguid, ServiceLocatorParamsCompare *compare) throws DuplicateCompare;
-
-		/**
-		 * Method which removes a comparator from the service locator.
-		 *
-		 * @param compareguid The unique identifier for the comparator to remove.
-		 */
-		void removeCompare(string compareguid) throws CompareNotFound;
-	};
-
-}; // end module V1
-
-}; // end module Location
-
-}; // end module Hydra

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


-- 
hydra/media_format_ulaw.git




More information about the asterisk-scf-commits mailing list