Logo Search packages:      
Sourcecode: wengophone version File versions  Download package

int osip_rfc3264_match_video ( struct osip_rfc3264 config,
sdp_message_t remote_sdp,
sdp_media_t remote_med,
sdp_media_t video_tab[] 

Compare remote sdp packet against local supported media for video.

config The element to work on.
remote_sdp The remote SDP packet.
remote_med The remote Media SDP line.
video_tab The local list of media supported by both side.

Definition at line 539 of file osip_rfc3264.c.

References sdp_attribute::a_att_field, sdp_attribute::a_att_value, sdp_media::a_attributes, sdp_media::m_payloads, osip_list_eol(), osip_list_get(), and osip_rfc3264_find_video().

Referenced by osip_rfc3264_match().

  osip_rfc3264_t *cnf = (osip_rfc3264_t*) config;
  int num=0;
  int pos;
  video_tab[0] = NULL;

  if (cnf==NULL) return -1;

  /* search for the video media line */

  while (!osip_list_eol (remote_med->m_payloads, pos))
      char *payload = (char *) osip_list_get (remote_med->m_payloads, pos);
      sdp_media_t *local_med;
      char *rtpmap = NULL;
      int posattr = 0;

      /* search for the rtpmap associated to the payload */
      while (!osip_list_eol (remote_med->a_attributes, posattr))
        sdp_attribute_t *attr =
          (sdp_attribute_t *) osip_list_get (remote_med->a_attributes, posattr);
        if (0==osip_strncasecmp(attr->a_att_field, "rtpmap", 6))
            if (attr->a_att_value!=NULL &&
              0==osip_strncasecmp(attr->a_att_value, payload, strlen(payload)))
              /* TODO check if it was not like 101: == 10 */
              rtpmap = attr->a_att_value;

      local_med = osip_rfc3264_find_video(config, payload, rtpmap);
      if (local_med!=NULL)
        /* found a supported codec? */
        video_tab[num] = local_med;

      /* search for support of this codec in local media list */

  video_tab[num] = NULL;
  return 0;

Generated by  Doxygen 1.6.0   Back to index