Ignore:
Timestamp:
Apr 24, 2012 5:40:32 AM (13 years ago)
Author:
nanang
Message:

Fix #1423:

  • Added provisional media in call for generating initial and subsequent SDP offer/answer. If a reoffer is rejected by peer, the main call media will remain unchanged and the provisional media will be cleaned up (the cleanup is currently delayed until call gets destroyed or another reoffer/answer occurs).
  • Reenabled media transport dump in pjsua_core.c.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_vid.c

    r4060 r4071  
    15331533    sdp = pjmedia_sdp_session_clone(call->inv->pool_prov, current_sdp); 
    15341534 
     1535    /* Clean up provisional media before using it */ 
     1536    pjsua_media_prov_clean_up(call->index); 
     1537 
     1538    /* Update provisional media from call media */ 
     1539    call->med_prov_cnt = call->med_cnt; 
     1540    pj_memcpy(call->media_prov, call->media, 
     1541              sizeof(call->media[0]) * call->med_cnt); 
     1542 
    15351543    /* Initialize call media */ 
    1536     call_med = &call->media[call->med_cnt++]; 
    1537  
     1544    call_med = &call->media_prov[call->med_prov_cnt++]; 
    15381545    status = pjsua_call_media_init(call_med, PJMEDIA_TYPE_VIDEO, 
    15391546                                   &acc_cfg->rtp_cfg, call->secure_level, 
     
    15981605on_error: 
    15991606    if (call_med->tp) { 
     1607        pjsua_set_media_tp_state(call_med, PJSUA_MED_TP_NULL); 
    16001608        pjmedia_transport_close(call_med->tp); 
    16011609        call_med->tp = call_med->tp_orig = NULL; 
     
    16301638    } 
    16311639 
    1632     call_med = &call->media[med_idx]; 
     1640    /* Clean up provisional media before using it */ 
     1641    pjsua_media_prov_clean_up(call->index); 
     1642 
     1643    /* Update provisional media from call media */ 
     1644    call->med_prov_cnt = call->med_cnt; 
     1645    pj_memcpy(call->media_prov, call->media, 
     1646              sizeof(call->media[0]) * call->med_cnt); 
     1647 
     1648    call_med = &call->media_prov[med_idx]; 
    16331649 
    16341650    /* Verify if the stream media type is video */ 
     
    17361752on_error: 
    17371753        if (status != PJ_SUCCESS) { 
     1754            pjsua_media_prov_clean_up(call->index); 
    17381755            return status; 
    17391756        } 
Note: See TracChangeset for help on using the changeset viewer.