From 1e2331c5ada065b229aef9b41aec89bd14fbb1f7 Mon Sep 17 00:00:00 2001 From: Boris Grozev Date: Fri, 11 Apr 2014 18:44:00 +0200 Subject: Describes the local source in a 'source' child element of the 'description' elements when sending a jingle session-accept. --- .../protocol/media/CallPeerMediaHandler.java | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'src/net/java/sip/communicator/service/protocol/media') 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> private VideoMediaStream videoStream; /** + * Identifier used to group the audio stream and video stream towards + * the CallPeer in SDP. + */ + private String msLabel = UUID.randomUUID().toString(); + + /** * The VideoListener which listens to the video * MediaStream of this instance for changes in the availability of * visual Components displaying remote video and re-fires them as @@ -1952,6 +1958,53 @@ public abstract class CallPeerMediaHandler> throws OperationFailedException; /** + * Returns the value to use for the 'msid' source-specific SDP media + * attribute (RFC5576) for the stream of type mediaType towards + * the CallPeer. It consist of a group identifier (shared between + * the local audio and video streams towards the CallPeer) 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 mediaType towards + * the CallPeer. + */ + 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 mediaType towards + * the CallPeer. + * + * @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 mediaType towards + * the CallPeer. + */ + 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 PropertyChangeListener which listens to changes * in the values of the properties of the Call of {@link #peer}. * Remembers the Call it has been added to because peer -- cgit v1.1