[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
Tue Jun 21 12:37:36 CDT 2011
branch "media" has been updated
via ae69d3aad2b90b621d89de835fe8788dc1fe979b (commit)
from 8508ac568a89f2c64c1bdbd26e200ec5c79b94d3 (commit)
Summary of changes:
AsteriskSCF/Media/MediaIf.ice | 66 ++++++++++++++++++++
.../SessionCommunicationsIf.ice | 23 ++++++-
2 files changed, 87 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit ae69d3aad2b90b621d89de835fe8788dc1fe979b
Author: Joshua Colp <jcolp at digium.com>
Date: Tue Jun 21 14:31:02 2011 -0300
Add support for representing streams in the media architecture. The following items are covered:
1. Each stream is identifiable by a name or identifier.
2. It's possible to retrieve all streams along with their state, formats, sinks, and sources from
a session using the getStreams() call. This is done so that the number of RPCs is kept to a
minimum. If you are getting the streams chances are you are wanting to do something based on all
of that information so retrieving it all individually would be silly.
3. It's possible to change the state of stream(s) by calling the changeStreamStates() function on
a session. Valid states are SendAndReceive, SendOnly, ReceiveOnly, and Inactive. For performance
reasons it will be highly suggested to switch streams that are not being used to an Inactive state.
4. Stream information can be passed along to an endpoint in the createSession() call as an argument so
that the newly created session will have a stream topology compatible with a caller. This will be
optional though for cases where no stream topology already exists.
diff --git a/AsteriskSCF/Media/MediaIf.ice b/AsteriskSCF/Media/MediaIf.ice
index 642ed34..5af9d9c 100644
--- a/AsteriskSCF/Media/MediaIf.ice
+++ b/AsteriskSCF/Media/MediaIf.ice
@@ -88,6 +88,72 @@ module V1
sequence<Frame> FrameSeq;
/**
+ * States that a stream can be in.
+ */
+ enum StreamState
+ {
+ /**
+ * Media is being sent and received.
+ */
+ SendAndReceive,
+
+ /**
+ * Media is only being sent out.
+ */
+ SendOnly,
+
+ /**
+ * Media is only being received.
+ */
+ ReceiveOnly,
+
+ /**
+ * Media is not being sent or received.
+ */
+ Inactive,
+ };
+
+ /**
+ * Class which contains information about a stream.
+ */
+ class StreamInformation
+ {
+ /**
+ * Current state of the stream.
+ *
+ * Default value is to send and receive media.
+ */
+ StreamState state = SendAndReceive;
+
+ /**
+ * Formats carried over this stream.
+ */
+ FormatSeq formats;
+
+ /**
+ * Sinks where media can be sent.
+ */
+ StreamSinkSeq sinks;
+
+ /**
+ * Sources where media may come from.
+ */
+ StreamSourceSeq sources;
+ };
+
+ /**
+ * A dictionary of streams. The key is a unique identifier for the stream.
+ * The value is information about the stream.
+ */
+ dictionary<string, StreamInformation> StreamInformationDict;
+
+ /**
+ * A dictionary of streams and states. This is used to change the state of
+ * streams.
+ */
+ dictionary<string, StreamState> StreamStateDict;
+
+ /**
* Interface to a container of media sources and sinks.
*/
interface Session
diff --git a/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice b/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
index 7d53e82..25261c6 100644
--- a/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
+++ b/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
@@ -334,6 +334,20 @@ 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();
+
+ /**
+ * Method which changes the state of streams.
+ *
+ * @param streams A dictionary of streams and their new state.
+ */
+ ["amd"] void changeStreamStates(AsteriskSCF::Media::V1::StreamStateDict streams);
+
+ /**
* 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.
@@ -552,7 +566,8 @@ module V1
{
/**
* Creates a session for the specified destination, optionally registering
- * a SessionListener object for notification of changes to the session.
+ * a SessionListener object for notification of changes to the session and also
+ * optionally specifying the streams that should be present on the session.
*
* @param destination A stringified identifier or address for the destination.
*
@@ -560,10 +575,14 @@ module V1
* newly created session. May be a nil reference if an initial listener is not
* required.
*
+ * @param topology A dictionary of streams and the formats that should be carried
+ * on them.
+ *
* @return A newly created session object for the destination.
*
*/
- Session* createSession(string destination, SessionListener* callback);
+ Session* createSession(string destination, SessionListener* callback,
+ AsteriskSCF::Media::V1::StreamInformationDict topology);
/**
* Returns the active sessions for this session endpoint.
-----------------------------------------------------------------------
--
asterisk-scf/integration/slice.git
More information about the asterisk-scf-commits
mailing list