Programming Interfaces Guide

Adding a Bandwidth Field to the SDP Session Structure

int sdp_add_bandwidth(sdp_bandwidth_t **bw, const char *type, uint64_t value);

The sdp_add_bandwidth() function adds the BANDWIDTH (b=) SDP field to either the session structure (sdp_session_t) or the media structure (sdp_media_t) using the type and value parameters.

This field can go into the media or the session section of an SDP description. You must pass either &session->s_info or &media->m_info as the first argument to specify the section.

Return Values: The sdp_add_bandwidth() function returns 0 when the function completes successfully. When mandatory parameters are not present, the function returns EINVAL. When memory allocation fails, the function returns ENOMEM. The value of errno does not change in the event of an error.