Ignore:
Timestamp:
Aug 26, 2008 4:51:28 PM (13 years ago)
Author:
nanang
Message:

Ticket #602:

  • Introduced new API pjmedia_rtp_session_init2() to enable intializing RTP session with non-default initial settings
  • Updated stream so it can be created with non-default initial RTP settings.
  • Updated pjsua-lib to make sure RTP timestamp and sequence contigue when stream session is restarted.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/stream.c

    r2224 r2241  
    873873    /* Update stat */ 
    874874    pjmedia_rtcp_tx_rtp(&stream->rtcp, frame_out.size); 
     875    stream->rtcp.stat.rtp_tx_last_ts = pj_ntohl(stream->enc->rtp.out_hdr.ts); 
     876    stream->rtcp.stat.rtp_tx_last_seq = pj_ntohs(stream->enc->rtp.out_hdr.seq); 
    875877 
    876878    return PJ_SUCCESS; 
     
    14131415    /* Create RTP and RTCP sessions: */ 
    14141416 
    1415     status = pjmedia_rtp_session_init(&channel->rtp, pt, param->ssrc); 
     1417    if (param->rtp_seq_ts_set == 0) { 
     1418        status = pjmedia_rtp_session_init(&channel->rtp, pt, param->ssrc); 
     1419    } else { 
     1420        pjmedia_rtp_session_setting settings; 
     1421 
     1422        settings.flags = (param->rtp_seq_ts_set << 2) | 3; 
     1423        settings.default_pt = pt; 
     1424        settings.sender_ssrc = param->ssrc; 
     1425        settings.seq = param->rtp_seq; 
     1426        settings.ts = param->rtp_ts; 
     1427        status = pjmedia_rtp_session_init2(&channel->rtp, settings); 
     1428    } 
    14161429    if (status != PJ_SUCCESS) 
    14171430        return status; 
Note: See TracChangeset for help on using the changeset viewer.