public class MediaField extends SDPField implements Media
| Modifier and Type | Field and Description |
|---|---|
protected Vector |
formats |
protected String |
media |
protected int |
nports |
protected int |
port |
protected String |
proto |
CORE_PACKAGE, SDPFIELDS_PACKAGEAND, AT, COLON, COMMA, DOT, DOUBLE_QUOTE, EQUALS, GREATER_THAN, HT, immutableClasses, indentation, LESS_THAN, LPAREN, matchExpression, NEWLINE, PERCENT, POUND, QUESTION, QUOTE, RETURN, RPAREN, SEMICOLON, SLASH, SP, STAR, stringRepresentationATTRIBUTE_FIELD, BANDWIDTH_FIELD, CONNECTION_FIELD, EMAIL_FIELD, INFORMATION_FIELD, KEY_FIELD, MEDIA_FIELD, ORIGIN_FIELD, PHONE_FIELD, PROTO_VERSION_FIELD, REPEAT_FIELD, SESSION_NAME_FIELD, TIME_FIELD, URI_FIELD, ZONE_FIELD| Constructor and Description |
|---|
MediaField() |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Clones this object.
|
String |
encode()
Get the string encoded version of this object
|
Vector |
getFormats() |
String |
getMedia() |
Vector |
getMediaFormats(boolean create)
Returns an Vector of the media formats supported by this description.
|
int |
getMediaPort()
Returns the port of the media defined by this description
|
String |
getMediaType()
Returns the type (audio,video etc) of the
media defined by this description.
|
int |
getNports() |
int |
getPort() |
int |
getPortCount()
Returns the number of ports associated with this media description
|
String |
getProto() |
String |
getProtocol()
Returns the protocol over which this media should be transmitted.
|
void |
setFormats(Vector formats)
Set the fmt member
|
void |
setMedia(String m)
Set the media member
|
void |
setMediaFormats(Vector mediaFormats)
Adds a media format to the media description.
|
void |
setMediaPort(int port)
Sets the port of the media defined by this description
|
void |
setMediaType(String mediaType)
Sets the type (audio,video etc) of the media defined by this description.
|
void |
setNports(int n)
Set the nports member
|
void |
setPort(int p)
Set the port member
|
void |
setPortCount(int portCount)
Sets the number of ports associated with this media description.
|
void |
setProto(String p)
Set the proto member
|
void |
setProtocol(String protocol)
Sets the protocol over which this media should be transmitted.
|
getFieldName, getTypeChar, toStringdbgPrint, debugDump, equals, getStringRepresentation, initSprint, match, sprintdbgPrint, dbgPrint, debugDump, encode, getClassFromName, getIndentation, getMatcher, isMySubclass, makeClone, merge, setMatcher, sprint, sprint, sprint, sprint, sprint, sprint, sprint, sprintfinalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTypeCharprotected String media
protected int port
protected int nports
protected String proto
protected Vector formats
public String getMedia()
public int getPort()
public int getNports()
public String getProto()
public Vector getFormats()
public void setMedia(String m)
public void setPort(int p)
public void setNports(int n)
public void setProto(String p)
public void setFormats(Vector formats)
public String getMediaType() throws SdpParseException
getMediaType in interface MediaSdpParseExceptionpublic void setMediaType(String mediaType) throws SdpException
setMediaType in interface MediamediaType - to setSdpException - if mediaType is nullpublic int getMediaPort()
throws SdpParseException
getMediaPort in interface MediaSdpParseExceptionpublic void setMediaPort(int port)
throws SdpException
setMediaPort in interface Mediaport - to setSdpExceptionpublic int getPortCount()
throws SdpParseException
getPortCount in interface MediaSdpParseExceptionpublic void setPortCount(int portCount)
throws SdpException
setPortCount in interface MediaportCount - portCount - the integer port count.SdpExceptionpublic String getProtocol() throws SdpParseException
getProtocol in interface MediaSdpParseExceptionpublic void setProtocol(String protocol) throws SdpException
setProtocol in interface Mediaprotocol - - the String protocol, e.g. RTP/AVP.SdpException - if the protocol is nullpublic Vector getMediaFormats(boolean create) throws SdpParseException
getMediaFormats in interface Mediacreate - to setSdpExceptionSdpParseExceptionpublic void setMediaFormats(Vector mediaFormats) throws SdpException
setMediaFormats in interface MediamediaFormats - the format to add.SdpException - if the vector is nullpublic String encode()
public Object clone()
GenericObjectclone in interface Fieldclone in class GenericObjectCopyright © 2014. All Rights Reserved.