Changeset 1391


Ignore:
Timestamp:
Jun 26, 2007 8:59:49 AM (17 years ago)
Author:
bennylp
Message:

Ticket #342: added configuration to control whether SDP rtpmap should be included for static payload types (default still yes)

Location:
pjproject/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/config.h

    r1177 r1391  
    352352 
    353353/** 
     354 * This macro controls whether pjmedia should include SDP rtpmap  
     355 * attribute for static payload types. SDP rtpmap for static 
     356 * payload types are optional, although they are normally included 
     357 * for interoperability reason. 
     358 * 
     359 * Note that there is also a run-time variable to turn this setting 
     360 * on or off, defined in endpoint.c. To access this variable, use 
     361 * the following construct 
     362 * 
     363 \verbatim 
     364    extern pj_bool_t pjmedia_add_rtpmap_for_static_pt; 
     365 
     366    // Do not include rtpmap for static payload types (<96) 
     367    pjmedia_add_rtpmap_for_static_pt = PJ_FALSE; 
     368 \endverbatim 
     369 * 
     370 * Default: 1 (yes) 
     371 */ 
     372#ifndef PJMEDIA_ADD_RTPMAP_FOR_STATIC_PT 
     373#   define PJMEDIA_ADD_RTPMAP_FOR_STATIC_PT     1 
     374#endif 
     375 
     376 
     377/** 
    354378 * This macro declares the payload type for telephone-event 
    355379 * that is advertised by PJMEDIA for outgoing SDP. If this macro 
  • pjproject/trunk/pjmedia/src/pjmedia/endpoint.c

    r1327 r1391  
    4646static int error_subsys_registered; 
    4747 
     48/* Config to control rtpmap inclusion for static payload types */ 
     49pj_bool_t pjmedia_add_rtpmap_for_static_pt =  
     50            PJMEDIA_ADD_RTPMAP_FOR_STATIC_PT; 
     51 
    4852 
    4953/** 
     
    395399        } 
    396400 
    397         pjmedia_sdp_rtpmap_to_attr(pool, &rtpmap, &attr); 
    398         m->attr[m->attr_count++] = attr; 
     401        if (codec_info->pt >= 96 || pjmedia_add_rtpmap_for_static_pt) { 
     402            pjmedia_sdp_rtpmap_to_attr(pool, &rtpmap, &attr); 
     403            m->attr[m->attr_count++] = attr; 
     404        } 
    399405 
    400406        /* Add fmtp mode where applicable */ 
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c

    r1389 r1391  
    9696#endif 
    9797pj_status_t app_destroy(void); 
    98  
    99 extern pj_bool_t pjsip_use_compact_form; 
    10098 
    10199/***************************************************************************** 
     
    28872885    pj_status_t status; 
    28882886 
    2889     //pjsip_use_compact_form = PJ_TRUE; 
    2890  
    28912887    /* Create pjsua */ 
    28922888    status = pjsua_create(); 
Note: See TracChangeset for help on using the changeset viewer.