Ignore:
Timestamp:
May 13, 2006 10:46:23 PM (18 years ago)
Author:
bennylp
Message:

Another major modifications in PJMEDIA:

  • handle multiple frames in one packet
  • split stream creation into two steps to allow customization
  • PLC framework and implementation with G.711 and speex
  • stream returns NO_FRAME correctly.
  • added ptime argument in pjsua
File:
1 edited

Legend:

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

    r422 r438  
    2727 */ 
    2828 
    29 #define THIS_FILE   "pjsua_inv.c" 
     29#define THIS_FILE   "pjsua_call.c" 
    3030 
    3131 
     
    154154        call->session = NULL; 
    155155 
    156     } 
    157  
    158     PJ_LOG(3,(THIS_FILE, "Media session for call %d is destroyed",  
    159                          call_index)); 
     156        PJ_LOG(3,(THIS_FILE, "Media session for call %d is destroyed",  
     157                             call_index)); 
     158 
     159    } 
    160160 
    161161    return PJ_SUCCESS; 
     
    524524            pj_gettimeofday(&call->dis_time); 
    525525            break; 
     526        default: 
     527            /* Nothing to do. Just to keep gcc from complaining about 
     528             * unused enums. 
     529             */  
     530            break; 
    526531    } 
    527532 
     
    557562            st_code = e->body.tsx_state.tsx->status_code; 
    558563            ev_state = PJSIP_EVSUB_STATE_TERMINATED; 
     564            break; 
     565 
     566        default: 
     567            /* Nothing to do. Just to keep gcc from complaining about 
     568             * unused enums. 
     569             */ 
    559570            break; 
    560571        } 
     
    916927} 
    917928 
     929#if 0 
    918930/* Disconnect call */ 
    919931static void call_disconnect(pjsip_inv_session *inv, 
     
    931943    } 
    932944} 
     945#endif 
    933946 
    934947/* 
     
    941954{ 
    942955    pjsua_call *call; 
     956    pjmedia_session_info sess_info; 
    943957    const pjmedia_sdp_session *local_sdp; 
    944958    const pjmedia_sdp_session *remote_sdp; 
     
    9911005    } 
    9921006 
    993     /* Create new media session.  
    994      * The media session is active immediately. 
    995      */ 
    9961007    if (pjsua.null_audio) 
    9971008        return; 
    998      
    999     status = pjmedia_session_create( pjsua.med_endpt, 1,  
    1000                                      &call->skinfo, 
    1001                                      local_sdp, remote_sdp,  
    1002                                      call, 
    1003                                      &call->session ); 
     1009 
     1010    /* Create media session info based on SDP parameters.  
     1011     * We only support one stream per session at the moment 
     1012     */     
     1013    status = pjmedia_session_info_from_sdp( call->inv->dlg->pool,  
     1014                                            pjsua.med_endpt, 1, 
     1015                                            &sess_info, &call->skinfo, 
     1016                                            local_sdp, remote_sdp); 
     1017    if (status != PJ_SUCCESS) { 
     1018        pjsua_perror(THIS_FILE, "Unable to create media session",  
     1019                     status); 
     1020        //call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE); 
     1021        return; 
     1022    } 
     1023 
     1024    /* Override ptime, if this option is specified. */ 
     1025    if (pjsua.ptime) { 
     1026        sess_info.stream_info[0].param->setting.frm_per_pkt = (pj_uint8_t) 
     1027            (pjsua.ptime / sess_info.stream_info[0].param->info.frm_ptime); 
     1028        if (sess_info.stream_info[0].param->setting.frm_per_pkt==0) 
     1029            sess_info.stream_info[0].param->setting.frm_per_pkt = 1; 
     1030    } 
     1031 
     1032    /* Optionally, application may modify other stream settings here 
     1033     * (such as jitter buffer parameters, codec ptime, etc.) 
     1034     */ 
     1035 
     1036    /* Create session based on session info. */ 
     1037    status = pjmedia_session_create( pjsua.med_endpt, &sess_info, 
     1038                                     call, &call->session ); 
    10041039    if (status != PJ_SUCCESS) { 
    10051040        pjsua_perror(THIS_FILE, "Unable to create media session",  
Note: See TracChangeset for help on using the changeset viewer.