public class IceSdpUtils extends Object
Modifier and Type | Field and Description |
---|---|
private static String |
END_OF_CANDIDATES
The name of the SDP attribute that indicates an end of candidate
trickling: "end-of-candidates".
|
static String |
ICE_OPTION_TRICKLE
The name of the ICE SDP option that indicates support for trickle.
|
static String |
ICE_OPTIONS
The name of the SDP attribute that contains an ICE options.
|
static String |
ICE_PWD
The name of the SDP attribute that contains an ICE password.
|
static String |
ICE_UFRAG
The name of the SDP attribute that contains an ICE user fragment.
|
private static Logger |
logger
The Logger used by the IceSdpUtils
class and its instances for logging output.
|
static String |
MID
The name of the "mid" SDP attribute.
|
private static String |
RTCP
The name of the SDP attribute that contains RTCP address and port.
|
private static javax.sdp.SdpFactory |
sdpFactory
A reference to the currently valid SDP factory instance.
|
Constructor and Description |
---|
IceSdpUtils() |
Modifier and Type | Method and Description |
---|---|
static Collection<javax.sdp.Attribute> |
createTrickleUpdate(Collection<LocalCandidate> localCandidates)
Generates and returns a set of attributes that can be used for a trickle
update, such as a SIP INFO, with the specified localCandidates.
|
static void |
initMediaDescription(javax.sdp.MediaDescription mediaDescription,
IceMediaStream iceMediaStream)
Reflects the candidates from the various components in
iceMediaStream into the specified m-line.
|
static void |
initSessionDescription(javax.sdp.SessionDescription sDes,
Agent agent)
Sets ice credentials, ICE options, media lines and candidates from agent,
on the specified session description.
|
static void |
setIceCredentials(javax.sdp.SessionDescription sDes,
String uFrag,
String pwd)
Sets the specified ICE user fragment and password as attributes of the
specified session description.
|
public static final String ICE_UFRAG
public static final String ICE_PWD
public static final String ICE_OPTIONS
public static final String ICE_OPTION_TRICKLE
public static final String MID
private static final String RTCP
private static final String END_OF_CANDIDATES
private static final javax.sdp.SdpFactory sdpFactory
private static final Logger logger
public static void setIceCredentials(javax.sdp.SessionDescription sDes, String uFrag, String pwd) throws NullPointerException
sDes
- the session description where we'd like to set a user
fragment and a password.uFrag
- the ICE user name fragment that we'd like to set on the
session descriptionpwd
- the ICE password that we'd like to set on the session
descriptionNullPointerException
- if the either of the parameters is nullpublic static void initMediaDescription(javax.sdp.MediaDescription mediaDescription, IceMediaStream iceMediaStream)
mediaDescription
- the media descriptions that we'd like to add
candidates to.iceMediaStream
- the media stream where we should extract candidates
from.public static void initSessionDescription(javax.sdp.SessionDescription sDes, Agent agent) throws IllegalArgumentException
sDes
- the SessionDescription
that we'd like to setup as per
the specified agent.agent
- the Agent
that we need to use when initializing
the session description.IllegalArgumentException
- Obviously, if there's a problem with
the arguments ... duh!public static Collection<javax.sdp.Attribute> createTrickleUpdate(Collection<LocalCandidate> localCandidates)
localCandidates
- the list of LocalCandidate
s that we'd like
to generate the update for.CandidateAttribute
s and an MID attribute
that we can use in a SIP INFO trickle update.Copyright © 2018. All rights reserved.