Ignore:
Timestamp:
Nov 3, 2016 9:39:20 AM (4 years ago)
Author:
riza
Message:

Re #1977: Add attach2() and pjmedia_transport_attach2() to pjmedia transport interface.

File:
1 edited

Legend:

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

    r5434 r5478  
    20062006    char *p; 
    20072007    pj_status_t status; 
     2008    pjmedia_transport_attach_param att_param; 
    20082009 
    20092010    PJ_ASSERT_RETURN(endpt && info && p_stream, PJ_EINVAL); 
     
    23472348 
    23482349    stream->out_rtcp_pkt = pj_pool_alloc(pool, stream->out_rtcp_pkt_size); 
     2350    att_param.stream = stream; 
     2351    att_param.media_type = PJMEDIA_TYPE_AUDIO; 
     2352    att_param.user_data = stream; 
     2353    pj_sockaddr_cp(&att_param.rem_addr, &info->rem_addr); 
     2354    pj_sockaddr_cp(&att_param.rem_rtcp, &info->rem_rtcp); 
     2355    att_param.addr_len = pj_sockaddr_get_len(&info->rem_addr); 
     2356    att_param.rtp_cb = &on_rx_rtp; 
     2357    att_param.rtcp_cb = &on_rx_rtcp; 
    23492358 
    23502359    /* Only attach transport when stream is ready. */ 
    2351     status = pjmedia_transport_attach(tp, stream, &info->rem_addr, 
    2352                                       &info->rem_rtcp, 
    2353                                       pj_sockaddr_get_len(&info->rem_addr), 
    2354                                       &on_rx_rtp, &on_rx_rtcp); 
     2360    status = pjmedia_transport_attach2(tp, &att_param); 
    23552361    if (status != PJ_SUCCESS) 
    23562362        goto err_cleanup; 
Note: See TracChangeset for help on using the changeset viewer.