51 G_EXCEPTION( Error ,
"session description error" ) ;
52 typedef std::multimap<std::string,std::string> Map ;
54 explicit Sdp(
const std::vector<std::string> & sdp_lines ) ;
60 std::string
name()
const ;
66 std::string
attributes(
const std::string & sep )
const ;
78 std::string
mediaType(
size_t index = 0U )
const ;
81 std::string
mediaTitle(
size_t index = 0U )
const ;
90 std::string
mediaAttributes(
size_t index ,
const std::string & sep )
const ;
93 std::string
mediaAttribute(
size_t index ,
const std::string & key )
const ;
97 std::string
mediaAttribute(
size_t index ,
const std::string & key ,
const std::string & default_ )
const ;
101 std::string
fmtp()
const ;
106 std::string value(
const std::string & )
const ;
107 static std::string value(
const Map & ,
const std::string & ,
const std::string & ) ;
108 static std::string value(
const Map & ,
const std::string & ) ;
109 static std::string value(
const Map & ,
const Map & ,
const std::string & ) ;
110 static Map::value_type pair(
const std::string & line ) ;
112 static std::string str(
const Map & ,
const std::string & sep ) ;
116 std::vector<Map> m_time ;
117 std::vector<Map> m_media ;
std::string mediaAttribute(size_t index, const std::string &key) const
Returns the specified attribute of the index-th media ("a=key").
std::string name() const
Returns the session name ("s=").
Map attributes() const
Returns the session attributes as a multimap ("a=key:value").
std::string originator() const
Returns the session originator ("o=").
time_t timeValue(size_t index=0U)
Returns the index-th time value.
A parser for a Session Description Protocol block, with a MIME type of "application/sdp".
Sdp(const std::vector< std::string > &sdp_lines)
Constructor taking a list of text lines.
std::string mediaTitle(size_t index=0U) const
Returns the title of the index-th media ("i=").
std::string mediaConnection(size_t index=0U) const
Returns the connection of the index-th media ("c=").
std::string fmtp() const
A convenience method that returns the value of the "fmtp" attribute of the first video "RTP/AVP" medi...
std::string mediaType(size_t index=0U) const
Returns the type of the index-th media ("m=").
Map mediaAttributes(size_t index=0U) const
Returns the attributes of the index-th media as a multimap ("a=").
size_t mediaCount() const
Returns the number of mediaType()s.
size_t timeCount() const
Returns the number of timeValue()s.