diff options
author | Boris Grozev <boris@jitsi.org> | 2014-04-11 18:44:00 +0200 |
---|---|---|
committer | Boris Grozev <boris@jitsi.org> | 2014-04-15 14:59:58 +0200 |
commit | 1e2331c5ada065b229aef9b41aec89bd14fbb1f7 (patch) | |
tree | 900ec4451d1970ae1034e14a912f51458d05e35b /src/net/java/sip/communicator/service/protocol/media | |
parent | 56a092de3cbbd107bc6e4291fc7eb47658c524dc (diff) | |
download | jitsi-1e2331c5ada065b229aef9b41aec89bd14fbb1f7.zip jitsi-1e2331c5ada065b229aef9b41aec89bd14fbb1f7.tar.gz jitsi-1e2331c5ada065b229aef9b41aec89bd14fbb1f7.tar.bz2 |
Describes the local source in a 'source' child element
of the 'description' elements when sending a jingle
session-accept.
Diffstat (limited to 'src/net/java/sip/communicator/service/protocol/media')
-rw-r--r-- | src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java b/src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java index 788dc60..6235a13 100644 --- a/src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java +++ b/src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java @@ -236,6 +236,12 @@ public abstract class CallPeerMediaHandler<T extends MediaAwareCallPeer<?,?,?>> private VideoMediaStream videoStream; /** + * Identifier used to group the audio stream and video stream towards + * the <tt>CallPeer</tt> in SDP. + */ + private String msLabel = UUID.randomUUID().toString(); + + /** * The <tt>VideoListener</tt> which listens to the video * <tt>MediaStream</tt> of this instance for changes in the availability of * visual <tt>Component</tt>s displaying remote video and re-fires them as @@ -1952,6 +1958,53 @@ public abstract class CallPeerMediaHandler<T extends MediaAwareCallPeer<?,?,?>> throws OperationFailedException; /** + * Returns the value to use for the 'msid' source-specific SDP media + * attribute (RFC5576) for the stream of type <tt>mediaType</tt> towards + * the <tt>CallPeer</tt>. It consist of a group identifier (shared between + * the local audio and video streams towards the <tt>CallPeer</tt>) and an + * identifier for the particular stream, separated by a space. + * + * {@see http://tools.ietf.org/html/draft-ietf-mmusic-msid} + * + * @param mediaType the media type of the stream for which to return the + * value for 'msid' + * @return the value to use for the 'msid' source-specific SDP media + * attribute (RFC5576) for the stream of type <tt>mediaType</tt> towards + * the <tt>CallPeer</tt>. + */ + public String getMsid(MediaType mediaType) + { + return msLabel + " " + getLabel(mediaType); + } + + /** + * Returns the value to use for the 'label' source-specific SDP media + * attribute (RFC5576) for the stream of type <tt>mediaType</tt> towards + * the <tt>CallPeer</tt>. + * + * @param mediaType the media type of the stream for which to return the + * value for 'label' + * @return the value to use for the 'label' source-specific SDP media + * attribute (RFC5576) for the stream of type <tt>mediaType</tt> towards + * the <tt>CallPeer</tt>. + */ + public String getLabel(MediaType mediaType) + { + return mediaType.toString(); + } + + /** + * Returns the value to use for the 'mslabel' source-specific SDP media + * attribute (RFC5576). + * @return the value to use for the 'mslabel' source-specific SDP media + * attribute (RFC5576). + */ + public String getMsLabel() + { + return msLabel; + } + + /** * Represents the <tt>PropertyChangeListener</tt> which listens to changes * in the values of the properties of the <tt>Call</tt> of {@link #peer}. * Remembers the <tt>Call</tt> it has been added to because <tt>peer</tt> |