| javax.sdp.Media
Media | public interface Media extends Field(Code) | | A Media represents an m= field contained within a MediaDescription. The Media
identifies information about the format(s) of the
media associated with the MediaDescription.
The Media field includes:
a mediaType (e.g. audio, video, etc.)
a port number (or set of ports)
a protocol to be used (e.g. RTP/AVP)
a set of media formats which correspond to Attributes associated with the
media description.
Here is an example:
m=audio 60000 RTP/AVP 0
a=rtpmap:0 PCMU/8000
This example identifies that the client can receive audio on port 60000 in
format 0 which corresponds to PCMU/8000.
Please refer to IETF RFC 2327 for a description of SDP.
author: deruelle version: 1.0 |
Method Summary | |
public Vector | getMediaFormats(boolean create) Returns an Vector of the media formats supported by this description. | public int | getMediaPort() | public String | getMediaType() Returns the type (audio,video etc) of the media defined by this description. | public int | getPortCount() | public String | getProtocol() Returns the protocol over which this media should be transmitted.
throws: SdpParseException - the String protocol, e.g. | public void | setMediaFormats(Vector mediaFormats) Adds a media format to the media description. | public void | setMediaPort(int port) | public void | setMediaType(String mediaType) Sets the type (audio,video etc) of the media defined by this description. | public void | setPortCount(int portCount) Sets the number of ports associated with this media description. | public void | setProtocol(String protocol) Sets the protocol over which this media should be transmitted.
Parameters: protocol - - the String protocol, e.g. | public String | toString() Generates a string description of this object. |
getMediaFormats | public Vector getMediaFormats(boolean create) throws SdpParseException(Code) | | Returns an Vector of the media formats supported by this description.
Each element in this Vector will be an String value which matches one of
the a=rtpmap: attribute fields of the media description.
Parameters: create - to set throws: SdpException - the Vector. |
setMediaFormats | public void setMediaFormats(Vector mediaFormats) throws SdpException(Code) | | Adds a media format to the media description.
Each element in this Vector should be an String value which matches one of the
a=rtpmap: attribute fields of the media description.
Parameters: mediaFormats - the format to add. throws: SdpException - if the vector is null |
setMediaPort | public void setMediaPort(int port) throws SdpException(Code) | | Sets the port of the media defined by this description
Parameters: port - to set throws: SdpException - |
setMediaType | public void setMediaType(String mediaType) throws SdpException(Code) | | Sets the type (audio,video etc) of the media defined by this description.
Parameters: mediaType - to set throws: SdpException - if mediaType is null |
setPortCount | public void setPortCount(int portCount) throws SdpException(Code) | | Sets the number of ports associated with this media description.
Parameters: portCount - portCount - the integer port count. throws: SdpException - |
setProtocol | public void setProtocol(String protocol) throws SdpException(Code) | | Sets the protocol over which this media should be transmitted.
Parameters: protocol - - the String protocol, e.g. RTP/AVP. throws: SdpException - if the protocol is null |
toString | public String toString()(Code) | | Generates a string description of this object.
the description. |
|
|