Changeset 4128 for pjproject


Ignore:
Timestamp:
May 17, 2012 8:14:05 AM (13 years ago)
Author:
nanang
Message:

Close #1506: Added PJSUA callback for SDP creation.

Location:
pjproject/trunk/pjsip
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h

    r4054 r4128  
    660660     */ 
    661661    void (*on_call_media_state)(pjsua_call_id call_id); 
     662 
     663 
     664    /** 
     665     * Notify application when a call has just created a local SDP (for  
     666     * initial or subsequent SDP offer/answer). Application can implement 
     667     * this callback to modify the SDP, before it is being sent and/or 
     668     * negotiated with remote SDP, for example to apply per account/call 
     669     * basis codecs priority or to add custom/proprietary SDP attributes. 
     670     * 
     671     * @param call_id   The call index. 
     672     * @param sdp       The SDP has just been created. 
     673     * @param pool      The pool instance, application should use this pool 
     674     *                  to modify the SDP. 
     675     * @param rem_sdp   The remote SDP, will be NULL if local is SDP offerer. 
     676     */ 
     677    void (*on_call_sdp_created)(pjsua_call_id call_id, 
     678                                pjmedia_sdp_session *sdp, 
     679                                pj_pool_t *pool, 
     680                                const pjmedia_sdp_session *rem_sdp); 
    662681 
    663682 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c

    r4101 r4128  
    20252025 
    20262026    call->rem_offerer = (rem_sdp != NULL); 
     2027 
     2028    /* Notify application */ 
     2029    if (pjsua_var.ua_cfg.cb.on_call_sdp_created) { 
     2030        (*pjsua_var.ua_cfg.cb.on_call_sdp_created)(call_id, sdp, 
     2031                                                   pool, rem_sdp); 
     2032    } 
    20272033 
    20282034    *p_sdp = sdp; 
Note: See TracChangeset for help on using the changeset viewer.