SDPMedia Object
Class: SDPMedia
Syntax:
set p [new SDPMedia]
Description:
The SDPMedia class contains state associated with a single SDP media record. This class is generally used in conjunction with the SDPParser.
In accordance with the SDP specification, the attributes and relevant fields in the SDPMedia object are initialized to the global ones in the encapsulating message. Thus, when you query the SDPMedia object for its attributes you get in return all attributes which pertain to it which includes the global ones and the local media-specific ones. The same goes for the relevant fields (i c b k a).
Methods
have_field $field
returns 0 or 1 depending on whether field $field was present in the announcement, e.g., 'c', 'i', 'k', etc.
field_value $field
returns the value of the field $field, empty if it doesn't exist.
have_attr $a
return 0 of 1 depending on whether attr $a exists in the message.
attr_value $a
returns the value of attr a. If attribute $a does not exist it returns an empty list.
attributes
returns a list of all attributes defined in the message.
Exported Instance Variables
Each SDPMedia object contains instance variables for the various values in the SDP fields which can then be queried. The following is the breakdown as would appear in the announcement.
Each SDPMedia object contains the following instance variables (if defined):
m=mediatype_ port_ proto_ fmt_
i=session_info_
c=nettype_ addrtype_ caddr_
b=bwmod_:bwval_
k=crypt_method_:crypt_key_
Related Objects
SDPParser, SDPMessage, SDPTime,