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/vid_stream.c

    r5434 r5478  
    14251425    char *p; 
    14261426    pj_status_t status; 
     1427    pjmedia_transport_attach_param att_param; 
    14271428 
    14281429    if (!pool) { 
     
    16661667 
    16671668    stream->out_rtcp_pkt = pj_pool_alloc(pool, stream->out_rtcp_pkt_size); 
     1669    att_param.stream = stream; 
     1670    att_param.media_type = PJMEDIA_TYPE_VIDEO; 
     1671    att_param.user_data = stream; 
     1672    pj_sockaddr_cp(&att_param.rem_addr, &info->rem_addr); 
     1673    pj_sockaddr_cp(&att_param.rem_rtcp, &info->rem_rtcp); 
     1674    att_param.addr_len = pj_sockaddr_get_len(&info->rem_addr); 
     1675    att_param.rtp_cb = &on_rx_rtp; 
     1676    att_param.rtcp_cb = &on_rx_rtcp; 
    16681677 
    16691678    /* Only attach transport when stream is ready. */ 
    1670     status = pjmedia_transport_attach(tp, stream, &info->rem_addr,  
    1671                                       &info->rem_rtcp,  
    1672                                       pj_sockaddr_get_len(&info->rem_addr),  
    1673                                       &on_rx_rtp, &on_rx_rtcp); 
     1679    status = pjmedia_transport_attach2(tp, &att_param); 
    16741680    if (status != PJ_SUCCESS) 
    16751681        return status; 
Note: See TracChangeset for help on using the changeset viewer.