sdp
1.12.11devel
|
The sdp module provides a simple "C" parser interface for SDP [RFC 2327], Session Description Protocol. The parser also implements support for IPv6 addresses as per RFC 3266. The RFC 4566 should be supported, but we have not checked since draft-eitf-mmusic-sdp-new-17 or so.
Contributor(s):
SDP parser parses an SDP message and converts it to internally used SDP structure sdp_session_t.
Typically, the SDP parser is used as follows:
Act upon session description, then free the parser:
There are various flags indicating what kind of SDP variants the sdp_parse() accepts. The sanity check run after parsing can be disabled by including flag sdp_f_insane. The parser can be used to parse syntactically vague configuration files when using flag sdp_f_config. The parser will then accept * for media, protocol and port, for instance.
SDP printer converts internally used SDP structure sdp_session_t to the standard SDP format.
Typically, the SDP printer is used as follows:
At this point, application can use the SDP message contents, e.g., it can send them to network, and then free the message:
Examples on using SDP parser can be found from test_sdp.c and soa.c. Here is an simple example, which decodes an SDP text in original, increments the version number in the origin line, and encodes the SDP description again to buf.