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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu Jan 5 18:00:20 CST 2012


branch "master" has been updated
       via  bbc3e68660a5f699b0e7df4209b5733e5c755d28 (commit)
      from  3a6a28ee51aa76ece476458a9ed2f2644a2e2ea8 (commit)

Summary of changes:
 slice/AsteriskSCF/Media/MediaExtractionIf.ice |  127 +++++++++++++++++++++++++
 slice/AsteriskSCF/Media/MediaInjectionIf.ice  |  126 ++++++++++++++++++++++++
 2 files changed, 253 insertions(+), 0 deletions(-)
 create mode 100644 slice/AsteriskSCF/Media/MediaExtractionIf.ice
 create mode 100644 slice/AsteriskSCF/Media/MediaInjectionIf.ice


- Log -----------------------------------------------------------------
commit bbc3e68660a5f699b0e7df4209b5733e5c755d28
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu Jan 5 17:56:41 2012 -0400

    Add interfaces for media extraction and injection. (issue ASTSCF-23)

diff --git a/slice/AsteriskSCF/Media/MediaExtractionIf.ice b/slice/AsteriskSCF/Media/MediaExtractionIf.ice
new file mode 100644
index 0000000..16b7d86
--- /dev/null
+++ b/slice/AsteriskSCF/Media/MediaExtractionIf.ice
@@ -0,0 +1,127 @@
+/*
+ * Asterisk SCF -- An open-source communications framework.
+ *
+ * Copyright (C) 2011, Digium, Inc.
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk SCF project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE.txt file
+ * at the top of the source tree.
+ */
+
+#pragma once
+
+#include <AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice>
+#include <AsteriskSCF/Media/MediaIf.ice>
+
+module AsteriskSCF
+{
+
+module Media
+{
+
+module V1
+{
+    /**
+     * Class which contains the specific session and stream that is part of the extraction request.
+     */
+    class ExtractSessionStreamInfo
+    {
+        /**
+         * Session that the stream belongs to.
+         */
+        AsteriskSCF::SessionCommunications::V1::Session* session;
+
+        /**
+         * The specific stream to extract.
+         */
+        string stream;
+    };
+
+    /**
+     * Sequence of session stream information classes.
+     */
+    sequence<ExtractSessionStreamInfo> ExtractSessionStreamInfoSeq;
+
+    /**
+     * Class which describes the sessions and streams to be extracted.
+     */
+    class ExtractRequestInfo
+    {
+        /**
+         * A sequence of sessions and streams. Frames from the streams will be mixed
+         * together and sent to the provided sink. The extraction request will not proceed 
+         * if the streams are incompatible with each other or if the frames can not be mixed.
+         */
+        ExtractSessionStreamInfoSeq streams;
+
+        /**
+         * Format that the mixed media should be provided in. If not specified the media will be
+         * passed through without translation.
+         */
+        AsteriskSCF::Media::V1::Format format;
+    };
+
+    /**
+     * A dictionary of extractions.
+     *
+     * The key is a unique identifier for the extraction request that will be provided with the
+     * ExtractInstance if the extraction request was successful.
+     *
+     */
+    dictionary<int, ExtractRequestInfo> ExtractRequestInfoDict;
+
+    /**
+     * Class which is populated with extraction details if the request could successfully
+     * be achieved.
+     */
+    unsliceable class ExtractInstance
+    {
+        /**
+         * The source that will provide media of the streams requested for extraction.
+         */
+        AsteriskSCF::Media::V1::StreamSource* source;
+    };
+
+    /**
+     * A dictionary of extraction instances.
+     *
+     * The key is the unique identifier provided with the extraction request.
+     */
+    dictionary<int, ExtractInstance> ExtractInstanceDict;
+
+    /**
+     * A sequence of extraction instances.
+     */
+    sequence<ExtractInstance> ExtractInstanceSeq;
+
+    /**
+     * Interface used to request media extraction.
+     */
+    interface Extractor
+    {
+        /**
+         * Method used to request that media extraction occurs.
+         *
+         * @param requests The media extraction requests.
+         *
+         * @return ExtractInstanceDict A dictionary of media extraction instances.
+         */
+        ExtractInstanceDict startExtraction(ExtractRequestInfoDict requests);
+
+        /**
+         * Method used to request that media extraction stop.
+         *
+         * @param instances The media extraction instances that should stop.
+         */
+        void stopExtraction(ExtractInstanceSeq instances);
+    };
+
+}; /* end module V1 */
+}; /* end module Media */
+}; /* end module AsteriskSCF */
diff --git a/slice/AsteriskSCF/Media/MediaInjectionIf.ice b/slice/AsteriskSCF/Media/MediaInjectionIf.ice
new file mode 100644
index 0000000..714e0e9
--- /dev/null
+++ b/slice/AsteriskSCF/Media/MediaInjectionIf.ice
@@ -0,0 +1,126 @@
+/*
+ * Asterisk SCF -- An open-source communications framework.
+ *
+ * Copyright (C) 2011, Digium, Inc.
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk SCF project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE.txt file
+ * at the top of the source tree.
+ */
+
+#pragma once
+
+#include <AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice>
+#include <AsteriskSCF/Media/MediaIf.ice>
+
+module AsteriskSCF
+{
+
+module Media
+{
+
+module V1
+{
+    /**
+     * Class which contains the specific session and stream that is part of the injection request.
+     */
+    class InjectSessionStreamInfo
+    {
+        /**
+         * Session that the stream belongs to.
+         */
+        AsteriskSCF::SessionCommunications::V1::Session* session;
+
+        /**
+         * The specific stream to extract.
+         */
+        string stream;
+    };
+
+    /**
+     * Sequence of session stream information classes.
+     */
+    sequence<InjectSessionStreamInfo> InjectSessionStreamInfoSeq;
+
+    /**
+     * Class which describes the sessions and streams that will receive injected media.
+     */
+    class InjectRequestInfo
+    {
+        /**
+         * A sequence of sessions and streams. Frames from the injection source will be mixed
+         * with media destined for the streams. If this can not occur the injection request will
+         * not proceed.
+         */
+        InjectSessionStreamInfoSeq streams;
+
+        /**
+         * Format that the injected media should be provided in. This must be specified.
+         */
+        AsteriskSCF::Media::V1::Format format;
+    };
+
+    /**
+     * A dictionary of injections.
+     *
+     * The key is a unique identifier for the injection request that will be provided with the
+     * InjectInstance if the injection request was successful.
+     *
+     */
+    dictionary<int, InjectRequestInfo> InjectRequestInfoDict;
+
+    /**
+     * Class which is populated with injection details if the request could successfully
+     * be achieved.
+     */
+    unsliceable class InjectInstance
+    {
+        /**
+         * The sink that is expecting the injected media.
+         */
+        AsteriskSCF::Media::V1::StreamSink* sink;
+    };
+
+    /**
+     * A dictionary of injection instances.
+     *
+     * The key is the unique identifier provided with the injection request.
+     */
+    dictionary<int, InjectInstance> InjectInstanceDict;
+
+    /**
+     * A sequence of injection instances.
+     */
+    sequence<InjectInstance> InjectInstanceSeq;
+
+    /**
+     * Interface used to request media injection.
+     */
+    interface Injector
+    {
+        /**
+         * Method used to request that media injection occurs.
+         *
+         * @param requests The media injection requests.
+         *
+         * @return InjectInstanceDict A dictionary of media injection instances.
+         */
+        InjectInstanceDict startInjection(InjectRequestInfoDict requests);
+
+        /**
+         * Method used to request that media injection stop.
+         *
+         * @param instances The media injection instances that should stop.
+         */
+        void stopInjection(InjectInstanceSeq instances);
+    };
+
+}; /* end module V1 */
+}; /* end module Media */
+}; /* end module AsteriskSCF */

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


-- 
asterisk-scf/release/slice.git



More information about the asterisk-scf-commits mailing list