Ignore:
Timestamp:
Jul 12, 2018 8:22:31 AM (14 months ago)
Author:
nanang
Message:

Close #2126: Initial implementation of RTCP Feedback.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/stream_info.c

    r5788 r5820  
    2828static const pj_str_t ID_IP4 = { "IP4", 3}; 
    2929static const pj_str_t ID_IP6 = { "IP6", 3}; 
    30 static const pj_str_t ID_RTP_AVP = { "RTP/AVP", 7 }; 
    31 static const pj_str_t ID_RTP_SAVP = { "RTP/SAVP", 8 }; 
    3230//static const pj_str_t ID_SDP_NAME = { "pjmedia", 7 }; 
    3331static const pj_str_t ID_RTPMAP = { "rtpmap", 6 }; 
     
    417415        return PJMEDIA_SDPNEG_EINVANSTP; 
    418416 
    419     if (pj_stricmp(&local_m->desc.transport, &ID_RTP_AVP) == 0) { 
    420  
    421         si->proto = PJMEDIA_TP_PROTO_RTP_AVP; 
    422  
    423     } else if (pj_stristr(&local_m->desc.transport, &ID_RTP_SAVP)) { 
    424  
    425         si->proto = PJMEDIA_TP_PROTO_RTP_SAVP; 
    426  
    427     } else { 
    428  
    429         si->proto = PJMEDIA_TP_PROTO_UNKNOWN; 
     417    /* Get the transport protocol */ 
     418    si->proto = pjmedia_sdp_transport_get_proto(&local_m->desc.transport); 
     419 
     420    /* Just return success if stream is not RTP/AVP compatible */ 
     421    if (!PJMEDIA_TP_PROTO_HAS_FLAG(si->proto, PJMEDIA_TP_PROTO_RTP_AVP)) 
    430422        return PJ_SUCCESS; 
    431     } 
    432  
    433423 
    434424    /* Check address family in remote SDP */ 
     
    602592    /* Get codec info and param */ 
    603593    status = get_audio_codec_info_param(si, pool, mgr, local_m, rem_m); 
     594    if (status != PJ_SUCCESS) 
     595        return status; 
    604596 
    605597    /* Leave SSRC to random. */ 
     
    609601    si->jb_init = si->jb_max = si->jb_min_pre = si->jb_max_pre = -1; 
    610602 
     603    /* Get local RTCP-FB info */ 
     604    status = pjmedia_rtcp_fb_decode_sdp(pool, endpt, NULL, local, stream_idx, 
     605                                        &si->loc_rtcp_fb); 
     606    if (status != PJ_SUCCESS) 
     607        return status; 
     608 
     609    /* Get remote RTCP-FB info */ 
     610    status = pjmedia_rtcp_fb_decode_sdp(pool, endpt, NULL, remote, stream_idx, 
     611                                        &si->rem_rtcp_fb); 
     612    if (status != PJ_SUCCESS) 
     613        return status; 
     614 
    611615    return status; 
    612616} 
Note: See TracChangeset for help on using the changeset viewer.