[asterisk-scf-commits] asterisk-scf/integration/slice.git branch "extractinject" created.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Mon Oct 10 12:13:53 CDT 2011


branch "extractinject" has been created
        at  ff04b2807f9a82f8181a87ea5312c69f4711b766 (commit)

- Log -----------------------------------------------------------------
commit ff04b2807f9a82f8181a87ea5312c69f4711b766
Author: Joshua Colp <jcolp at digium.com>
Date:   Mon Oct 10 14:14:36 2011 -0300

    Add slice files for media extraction and injection.

diff --git a/slice/AsteriskSCF/Media/MediaExtractionIf.ice b/slice/AsteriskSCF/Media/MediaExtractionIf.ice
new file mode 100644
index 0000000..0ed302e
--- /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 ExtractRequest
+    {
+        /**
+         * 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, ExtractRequest> ExtractRequestDict;
+
+    /**
+     * 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(ExtractRequestDict 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..68d6bc8
--- /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 InjectRequest
+    {
+        /**
+         * 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, InjectRequest> InjectRequestDict;
+
+    /**
+     * 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(InjectRequestDict 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/integration/slice.git



More information about the asterisk-scf-commits mailing list