Lines Matching refs:media

222  * Given a media list and media name ("audio", "video", et al), it searches
223 * the list for that media. Returns NULL if media not present.
226 sdp_find_media(sdp_media_t *media, const char *name)
228 if (media == NULL || name == NULL || (strlen(name) == 0)) {
231 while (media != NULL) {
232 if (media->m_name != NULL) {
233 if (strcasecmp(name, media->m_name) == 0)
234 return (media);
236 media = media->m_next;
238 return (media);
262 * Given a media list and a format number, this API will return the rtpmap
266 sdp_find_media_rtpmap(sdp_media_t *media, const char *format)
271 if (media == NULL || format == NULL || (strlen(format) == 0)) {
274 attr = media->m_attr;
352 * Adds session information field to the session or media section of SDP.
406 * Adds connection field to the session or media section of SDP
453 * Adds bandwidth field to the session or media section of SDP.
591 * Adds key field to session or media section of SDP.
625 * Adds attribute field to session or media section of SDP.
664 * Adds media field to the session.
665 * m=<media> <port>[/portcount] <proto> <fmt> ...
669 int portcount, const char *protocol, const char *fmt, sdp_media_t **media)
675 if (media != NULL)
676 *media = NULL;
706 if (media != NULL)
707 *media = new_media;
732 sdp_media_t *media;
797 media = session->s_media;
798 while (media != NULL) {
800 len += strlen(media->m_name);
801 len += snprintf(buf, 1, "%u", media->m_port) + 1;
802 len += snprintf(buf, 1, "%d", media->m_portcount) + 1;
803 len += strlen(media->m_proto) + 1;
804 list = media->m_format;
809 if (media->m_info != NULL)
810 len += strlen(media->m_info) + FIELD_EQUALS_CRLF_LEN;
811 conn = media->m_conn;
813 bw = media->m_bw;
815 SDP_LEN_KEY(media->m_key);
816 attr = media->m_attr;
818 media = media->m_next;
835 sdp_media_t *media;
916 media = session->s_media;
917 while (media != NULL) {
918 if (sdp_list_to_str(media->m_format, &format, B_TRUE) != 0)
920 if (sdp_add_media(new_sess, media->m_name,
921 media->m_port, media->m_portcount, media->m_proto,
927 if (media->m_info != NULL) {
929 media->m_info) != 0) {
933 conn = media->m_conn;
935 bw = media->m_bw;
937 SDP_ADD_KEY(new_media->m_key, media->m_key);
938 attr = media->m_attr;
941 media = media->m_next;
973 sdp_media_t *media;
1084 media = session->s_media;
1085 while (media != NULL) {
1086 if (media->m_portcount == 1) {
1087 wrote = snprintf(buf, len, "m=%s %d %s", media->m_name,
1088 media->m_port, media->m_proto);
1090 wrote = snprintf(buf, len, "m=%s %d/%d %s", media->
1091 m_name, media->m_port, media->m_portcount, media->
1096 list = media->m_format;
1106 SDP_INFORMATION_TO_STR(media->m_info);
1107 conn = media->m_conn;
1109 bw = media->m_bw;
1111 SDP_KEY_TO_STR(media->m_key);
1112 attr = media->m_attr;
1114 media = media->m_next;
1191 * Given a media structure and the field ('i', 'b', 'c', et al), this API
1196 sdp_delete_all_media_field(sdp_media_t *media, const char field)
1198 if (media == NULL)
1202 free(media->m_info);
1203 media->m_info = NULL;
1206 sdp_free_connection(media->m_conn);
1207 media->m_conn = NULL;
1210 sdp_free_bandwidth(media->m_bw);
1211 media->m_bw = NULL;
1214 sdp_free_key(media->m_key);
1215 media->m_key = NULL;
1218 sdp_free_attribute(media->m_attr);
1219 media->m_attr = NULL;
1228 * Given a media list and the media, this API deletes that media from the
1229 * list. It frees the memory corresponding to that media.
1232 sdp_delete_media(sdp_media_t **l_media, sdp_media_t *media)
1237 if (l_media == NULL || *l_media == NULL || media == NULL)
1241 while (cur != NULL && cur != media) {