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_PACKAGE
AND, 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, stringRepresentation
ATTRIBUTE_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, toString
dbgPrint, debugDump, equals, getStringRepresentation, initSprint, match, sprint
dbgPrint, dbgPrint, debugDump, encode, getClassFromName, getIndentation, getMatcher, isMySubclass, makeClone, merge, setMatcher, sprint, sprint, sprint, sprint, sprint, sprint, sprint, sprint
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTypeChar
protected 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 Media
SdpParseException
public void setMediaType(String mediaType) throws SdpException
setMediaType
in interface Media
mediaType
- to setSdpException
- if mediaType is nullpublic int getMediaPort() throws SdpParseException
getMediaPort
in interface Media
SdpParseException
public void setMediaPort(int port) throws SdpException
setMediaPort
in interface Media
port
- to setSdpException
public int getPortCount() throws SdpParseException
getPortCount
in interface Media
SdpParseException
public void setPortCount(int portCount) throws SdpException
setPortCount
in interface Media
portCount
- portCount - the integer port count.SdpException
public String getProtocol() throws SdpParseException
getProtocol
in interface Media
SdpParseException
public void setProtocol(String protocol) throws SdpException
setProtocol
in interface Media
protocol
- - the String protocol, e.g. RTP/AVP.SdpException
- if the protocol is nullpublic Vector getMediaFormats(boolean create) throws SdpParseException
getMediaFormats
in interface Media
create
- to setSdpException
SdpParseException
public void setMediaFormats(Vector mediaFormats) throws SdpException
setMediaFormats
in interface Media
mediaFormats
- the format to add.SdpException
- if the vector is nullpublic String encode()
public Object clone()
GenericObject
clone
in interface Field
clone
in class GenericObject
Copyright © 2015. All Rights Reserved.