public static class SimpleSessionDescription.Media extends Object
SimpleSessionDescription.newMedia(java.lang.String, int, int, java.lang.String)
. Since
the syntax is more restricted for RTP based protocols, two sets of access
methods are implemented. See SimpleSessionDescription
for an
example of its usage.Modifier and Type | Method and Description |
---|---|
String |
getFmtp(int type)
Returns the
fmtp attribute of the given RTP payload type or
null if it is not present. |
String |
getFmtp(String format)
Returns the
fmtp attribute of the given format or
null if it is not present. |
String[] |
getFormats()
Returns the media formats.
|
int |
getPort()
Returns the first transport port used by this media.
|
int |
getPortCount()
Returns the number of contiguous ports used by this media.
|
String |
getProtocol()
Returns the transport protocol.
|
String |
getRtpmap(int type)
Returns the
rtpmap attribute of the given RTP payload type
or null if it is not present. |
int[] |
getRtpPayloadTypes()
Returns the RTP payload types.
|
String |
getType()
Returns the media type.
|
void |
removeFormat(String format)
Removes a format and its
fmtp attribute. |
void |
removeRtpPayload(int type)
Removes a RTP payload and its
rtpmap and fmtp
attributes. |
void |
setFormat(String format,
String fmtp)
Sets a format and its
fmtp attribute. |
void |
setRtpPayload(int type,
String rtpmap,
String fmtp)
Sets a RTP payload type and its
rtpmap and fmtp
attributes. |
public String getType()
public int getPort()
public int getPortCount()
public String getProtocol()
public String[] getFormats()
public String getFmtp(String format)
fmtp
attribute of the given format or
null
if it is not present.public void setFormat(String format, String fmtp)
fmtp
attribute. If the attribute is
null
, the corresponding field will be removed.public void removeFormat(String format)
fmtp
attribute.public int[] getRtpPayloadTypes()
public String getRtpmap(int type)
rtpmap
attribute of the given RTP payload type
or null
if it is not present.public String getFmtp(int type)
fmtp
attribute of the given RTP payload type or
null
if it is not present.public void setRtpPayload(int type, String rtpmap, String fmtp)
rtpmap
and fmtp
attributes. If any of the attributes is null
, the
corresponding field will be removed. See
SimpleSessionDescription
for an example of its usage.public void removeRtpPayload(int type)
rtpmap
and fmtp
attributes.