Changeset 2718


Ignore:
Timestamp:
May 20, 2009 2:26:42 PM (15 years ago)
Author:
nanang
Message:

Ticket #859:

  • Fixed AMR-WB negotiation in sdp_neg.c
  • Updated encoding name comparison to use case-insenstive
  • Set default AMR pack mode to be octet aligned.
Location:
pjproject/branches/projects/sipit24/pjmedia/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/sipit24/pjmedia/src/pjmedia-codec/ipp_codecs.c

    r2709 r2718  
    234234{ 
    235235#   if PJMEDIA_HAS_INTEL_IPP_CODEC_AMR 
     236    /* AMR-NB SID seems to produce noise, so let's just disable its VAD. */ 
    236237    {1, "AMR",      PJMEDIA_RTP_PT_AMR,       &USC_GSMAMR_Fxns,  8000, 1, 160,  
    237238                    7400, 12200, 2, 0, 1,  
    238                     &predecode_amr, &parse_amr, &pack_amr 
    239                     /*, {1, {{{"octet-align", 11}, {"1", 1}}} } */ 
    240                     , {1, {{{"mode-set", 8}, {"1,4,5", 5}}} } 
     239                    &predecode_amr, &parse_amr, &pack_amr, 
     240                    {1, {{{"octet-align", 11}, {"1", 1}}} } 
    241241    }, 
    242242#   endif 
     
    245245    {1, "AMR-WB",   PJMEDIA_RTP_PT_AMRWB,     &USC_AMRWB_Fxns,  16000, 1, 320, 
    246246                    15850, 23850, 1, 1, 1,  
    247                     &predecode_amr, &parse_amr, &pack_amr 
     247                    &predecode_amr, &parse_amr, &pack_amr, 
     248                    {1, {{{"octet-align", 11}, {"1", 1}}} } 
    248249    }, 
    249250#   endif 
  • pjproject/branches/projects/sipit24/pjmedia/src/pjmedia/sdp_neg.c

    r2643 r2718  
    866866                        { 
    867867                            /* Further check for G7221, negotiate bitrate. */ 
    868                             if (pj_strcmp2(&or_.enc_name, "G7221") == 0) { 
     868                            if (pj_stricmp2(&or_.enc_name, "G7221") == 0) { 
    869869                                if (match_g7221(offer, i, answer, j)) 
    870870                                    break; 
    871871                            } else 
    872872                            /* Further check for AMR, negotiate fmtp. */ 
    873                             if (pj_strcmp2(&or_.enc_name, "AMR") == 0) { 
     873                            if (pj_stricmp2(&or_.enc_name, "AMR") == 0 || 
     874                                pj_stricmp2(&or_.enc_name, "AMR-WB") == 0)  
     875                            { 
    874876                                if (match_amr(offer, i, answer, j, PJ_FALSE,  
    875877                                              NULL)) 
     
    10711073                pjmedia_sdp_attr_get_rtpmap(a, &or_); 
    10721074 
    1073                 if (!pj_strcmp2(&or_.enc_name, "telephone-event")) { 
     1075                if (!pj_stricmp2(&or_.enc_name, "telephone-event")) { 
    10741076                    master_has_telephone_event = 1; 
    10751077                    if (found_matching_telephone_event) 
     
    10981100                        if (!pj_stricmp(&or_.enc_name, &lr.enc_name) && 
    10991101                            or_.clock_rate == lr.clock_rate && 
    1100                             (pj_strcmp(&or_.param, &lr.param)==0 || 
     1102                            (pj_stricmp(&or_.param, &lr.param)==0 || 
    11011103                             (or_.param.slen==1 && *or_.param.ptr=='1')))  
    11021104                        { 
     
    11041106                            if (is_codec) { 
    11051107                                /* Further check for G7221, negotiate bitrate */ 
    1106                                 if (pj_strcmp2(&or_.enc_name, "G7221") == 0 && 
     1108                                if (pj_stricmp2(&or_.enc_name, "G7221") == 0 && 
    11071109                                    !match_g7221(master, i, slave, j)) 
    11081110                                { 
     
    11101112                                } else  
    11111113                                /* Further check for AMR, negotiate fmtp */ 
    1112                                 if (pj_strcmp2(&or_.enc_name, "AMR")==0) { 
     1114                                if (pj_stricmp2(&or_.enc_name, "AMR")==0 || 
     1115                                    pj_stricmp2(&or_.enc_name, "AMR-WB")==0)  
     1116                                { 
    11131117                                    unsigned o_med_idx, a_med_idx; 
    11141118 
Note: See TracChangeset for help on using the changeset viewer.