HP-UX Multimedia Streaming Protocols (MSP) Programmer's Guide

Obtaining or Adding the Structure Members for Media Descriptions
The SDP header file, sdp.h, contains the declarations of sdp_get_media* and
sdp_add_media* APIs as follows:
#include <sdp.h>
sdp_media_info_t *sdp_get_media_info(sdp_media_list_t *med_des);
char *sdp_get_media_title(sdp_media_list_t *med_des);
sdp_connection_list_t *sdp_get_media_connection
(sdp_media_list_t *med_des);
sdp_bandwidth_t *sdp_get_media_bandwidth(sdp_media_list_t *med_des);
sdp_encr_key_t *sdp_get_media_encrkey(sdp_media_list_t *med_des);
sdp_attribute_list_t *sdp_get_media_attribute
(sdp_media_list_t *med_des);
int sdp_add_media_info(sdp_t *sdp, char *media, char *port,
char *number_of_port, char *transport, char *fmtlist);
int sdp_add_media_title(sdp_t *sdp, char *i_info);
int sdp_add_media_connection(sdp_t *sdp, char *nettype,
char *addrtype, char *addr, char *ttl, char *no_of_addr);
int sdp_add_media_bandwidth(sdp_t *sdp, char *bwtype, char *bandwidth);
int sdp_add_media_encrkey(sdp_t *sdp, char *key_method, char *key_data);
int sdp_add_media_attribute(sdp_t *sdp, char *att_name, char *att_value);
Table 2-7 lists the sdp_get_media* and sdp_add_media* APIs.
Table 2-7 The sdp_get_media* and sdp_add_media* APIs
DescriptionAPI
Gets complete media description information for a
session. A session may have more than one media
description. This returns a pointer to the list of media
descriptions.
sdp_get_media_info()
Gets the media title.
sdp_get_media_title()
Gets the media connection information in the media
description.
sdp_get_media_connection()
Gets the proposed bandwidth information in the media
description.
sdp_get_media_bandwidth()
Gets encryption key information in the media
description.
sdp_get_media_encrkey()
Gets attribute information in the media description, if
any.
sdp_get_media_attribute()
Adds media information. The media, port,
number_of_port, transport, and fmtlist
arguments point to the media type (such as audio,
video, application, data, and control), the transport
port to which media stream will be sent, the number
of ports, the transport protocol, and the format,
respectively.
sdp_add_media_info()
74 Using MSP APIs