Adding a Media Field to the SDP Session Structure

int sdp_add_media(sdp_session_t *session, const char *name,
     uint_t port, int portcount, const char *protocol,
     const char *format, sdp_media_t **media);

The sdp_add_media() function adds the MEDIA (m=) SDP field to the session structure that is specified by the value of the session parameter (sdp_session_t) using the values of the name, port, portcount, protocol, and format parameters. The format parameter is a string that holds one or more values, such as the string 0 32 97.

This function creates a new media structure and returns a pointer to that structure in the media parameter. Functions that add SDP fields to the media structure use this pointer.

For more information, see the sdp_add_media(3COMMPUTIL) man page.