[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 Jul 28 12:04:09 CDT 2011
branch "master" has been updated
via 863a4d15040d81066190aaec25582d0879f7ddfc (commit)
from 084e46ffda7556c95fae03bebb2043360cbbab6e (commit)
Summary of changes:
slice/AsteriskSCF/Media/RTP/MediaRTCPIf.ice | 216 ++++++++++++++++++++
slice/AsteriskSCF/Media/RTP/MediaRTPIf.ice | 21 --
.../SessionCommunicationsIf.ice | 82 ++++++++
3 files changed, 298 insertions(+), 21 deletions(-)
create mode 100644 slice/AsteriskSCF/Media/RTP/MediaRTCPIf.ice
- Log -----------------------------------------------------------------
commit 863a4d15040d81066190aaec25582d0879f7ddfc
Author: Joshua Colp <jcolp at digium.com>
Date: Thu Jul 28 14:00:53 2011 -0300
Merge slice changes for RTCP.
diff --git a/slice/AsteriskSCF/Media/RTP/MediaRTCPIf.ice b/slice/AsteriskSCF/Media/RTP/MediaRTCPIf.ice
new file mode 100644
index 0000000..5923ddf
--- /dev/null
+++ b/slice/AsteriskSCF/Media/RTP/MediaRTCPIf.ice
@@ -0,0 +1,216 @@
+/*
+ * 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/RTP/MediaRTPIf.ice>
+
+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 ExtendedDetails
+ {
+ /**
+ * Maximum value
+ */
+ int maximum;
+
+ /**
+ * Minimum value
+ */
+ int minimum;
+
+ /**
+ * Last value
+ */
+ int last;
+
+ /**
+ * Mean value
+ */
+ int mean;
+ };
+
+ /**
+ * Concrete class containing RTCP statistics information.
+ */
+ class Statistics
+ {
+ /**
+ * Round trip delay information (values are in usec)
+ */
+ ExtendedDetails 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)
+ */
+ ExtendedDetails loss;
+
+ /**
+ * Jitter information (values are in usec)
+ */
+ ExtendedDetails jitter;
+ };
+
+ /**
+ * Facet name for the RTCP session interface
+ */
+ const string SessionFacet = "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
+ */
+ idempotent int getLocalPort();
+
+ /**
+ * Method which changes the IP address and port that RTCP will be sent to.
+ *
+ * Note that this must be called before RTCP will be sent.
+ *
+ * @param address A string representation of the address.
+ *
+ * @param port An integer containing the port.
+ *
+ * @throws InvalidAddress when the address passed in is invalid.
+ */
+ void setRemoteDetails(string address, int port) throws AsteriskSCF::Media::RTP::V1::InvalidAddress;
+ };
+
+ /**
+ * An RTCP information listener interface
+ */
+ interface InformationListener
+ {
+ /**
+ * Method called when statistics information is updated for a source
+ *
+ * @param source The source the statistics were updated on
+ *
+ * @param newStatistics Updated statistics information
+ */
+ void sourceStatisticsUpdated(AsteriskSCF::Media::RTP::V1::StreamSourceRTP* source, Statistics newStatistics);
+
+ /**
+ * Method called when statistics information is updated for a sink
+ *
+ *
+ * @param sink The sink the statistics were updated on
+ *
+ * @param newStatistics Updated statistics information
+ */
+ void sinkStatisticsUpdated(AsteriskSCF::Media::RTP::V1::StreamSinkRTP* sink, Statistics newStatistics);
+
+ /**
+ * Method called when the SSRC changes for a source
+ *
+ * @param source The source that the SSRC has changed on
+ *
+ * @param ssrc The new SSRC value
+ */
+ void sourceSsrcChanged(AsteriskSCF::Media::RTP::V1::StreamSourceRTP* source, int ssrc);
+ };
+
+ /**
+ * Facet name for the RTCP interface
+ */
+ const string Facet = "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.
+ *
+ * If retrieved from a source the statistics returned will be from the Receiver Report.
+ *
+ * If retrieved from a sink the statistics returned will be from the Sender Report.
+ */
+ interface Information
+ {
+ /**
+ * Method used to retrieve statistics information
+ *
+ * @return RTCPStatistics A populated RTPStatistics concrete class
+ */
+ idempotent Statistics 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(InformationListener *listener);
+
+ /**
+ * Method used to remove a listener
+ *
+ * @param listener A proxy to the listener to move
+ */
+ void removeListener(InformationListener *listener);
+ };
+
+}; /* end module V1 */
+
+}; /* end module RTCP */
+
+}; /* end module Media */
+
+}; /* end module AsteriskSCF */
diff --git a/slice/AsteriskSCF/Media/RTP/MediaRTPIf.ice b/slice/AsteriskSCF/Media/RTP/MediaRTPIf.ice
index d231637..c65f7ce 100644
--- a/slice/AsteriskSCF/Media/RTP/MediaRTPIf.ice
+++ b/slice/AsteriskSCF/Media/RTP/MediaRTPIf.ice
@@ -137,13 +137,6 @@ module V1
};
/**
- * Interface to an RTCP session.
- */
- interface RTCPSession
- {
- };
-
- /**
* A dictionary mapping payloads to media formats.
*/
dictionary<int, AsteriskSCF::Media::V1::Format> PayloadMap;
@@ -161,20 +154,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();
diff --git a/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice b/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
index 8131772..ce4a85f 100644
--- a/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
+++ b/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
@@ -316,6 +316,48 @@ module V1
exception NotBridged { };
/**
+ * A SessionController interface which is used to invoke critical operations
+ * relating to a session. This is implemented by external components so they can
+ * be controlled by a session and is also implemented by a session so it can be
+ * controlled by external components.
+ *
+ * Note that the operations contained can not be safely invoked on a single instance
+ * by multiple external components at the same time. This could lead to dissimilar state
+ * between the external components ultimately leading to a broken session. This is why
+ * in the Session interface in order to receive a proxy to the SessionController interface
+ * you have to provide a proxy to your own SessionController interface. This is to create
+ * a tight relationship between the two instances.
+ *
+ */
+ interface SessionController
+ {
+ /**
+ * Method called to change the state of streams.
+ *
+ * @param streams A dictionary of streams and their new state.
+ */
+ ["amd"] void changeStreamStates(AsteriskSCF::Media::V1::StreamStateDict streams);
+
+ /**
+ * Method called to add streams.
+ *
+ * @param streams A dictionary of streams with state and requested formats.
+ *
+ * @return StreamInformationDict A dictionary of streams actually added with state
+ * and formats.
+ */
+ ["amd"] AsteriskSCF::Media::V1::StreamInformationDict addStreams(AsteriskSCF::Media::V1::StreamInformationDict
+ streams);
+
+ /**
+ * Method called to remove streams.
+ *
+ * @param streams A dictionary of streams to remove.
+ */
+ ["amd"] void removeStreams(AsteriskSCF::Media::V1::StreamInformationDict streams);
+ };
+
+ /**
* A Session object encapsulates a session oriented dialogue with a peer
* agent. Registered SessionListener objects are notified of responses from
* the peer as the dialogue progresses.
@@ -409,6 +451,13 @@ module V1
["amd"] SessionInfo getInfo();
/**
+ * Method which retrieves streams on the session.
+ *
+ * @return A StreamInformationDict containing streams and information about them.
+ */
+ ["amd"] AsteriskSCF::Media::V1::StreamInformationDict getStreams();
+
+ /**
* Retrieve a media session instance, if available, for the current session.
* A media session object may not be available at the time this is called.
* For example, in SIP before media details are known.
@@ -467,6 +516,39 @@ module V1
* @throws NotBridged if the session is not currently in a bridge.
*/
["amd"] void removeBridge(SessionListener* listener) throws NotBridged;
+
+ /**
+ * Method which sets the session controller proxy to be contacted when actions
+ * that occur on the session require controller intervention or notification.
+ *
+ * Multiple controllers are not supported on a session due to the fact that the
+ * actions occuring on the SessionController interface are critical and supporting
+ * multiple controllers would lead to state information becoming out of sync between
+ * controllers.
+ *
+ * This method returns a proxy to a SessionController interface implemented by
+ * the session so it can also perform controller intervention and receive
+ * notification from the component that passed in the SessionController.
+ *
+ * @param controller A proxy to the SessionController object implemented by the caller.
+ *
+ * @return SessionController* A proxy to the session controller implemented by
+ * the session.
+ *
+ * @see SessionController
+ */
+ ["amd"] SessionController *setAndGetSessionController(SessionController* controller);
+
+ /**
+ * Method which removes a session controller from a session.
+ *
+ * If the passed in proxy is not the current controller this will not
+ * remove the controller from the session. This prevents a potential issue
+ * with the controller being set before the previous one has been removed.
+ *
+ * @param controller A proxy to the session controller to remove.
+ */
+ ["amd"] void removeSessionController(SessionController* controller);
};
/**
-----------------------------------------------------------------------
--
asterisk-scf/release/slice.git
More information about the asterisk-scf-commits
mailing list