Ticket #479: ticket479.2.patch
File ticket479.2.patch, 6.2 KB (added by nanang, 17 years ago) |
---|
-
pjmedia/include/pjmedia/transport.h
405 405 }; 406 406 407 407 /** 408 * This structure describes buffer storageof transport specific info.408 * This structure describes storage buffer of transport specific info. 409 409 * The actual transport specific info contents will be defined by transport 410 410 * implementation. Note that some transport implementations do not need to 411 411 * provide specific info, since the general socket info is enough. … … 456 456 457 457 458 458 /** 459 * Get media socket info from the specified transport. The socket info 460 * contains information about the local address of this transport, and 461 * would be needed for example to fill in the "c=" and "m=" line of local 462 * SDP. 459 * Initialize transport info. 463 460 * 461 * @param info Transport info to be initialized. 462 */ 463 PJ_INLINE(void) pjmedia_transport_init_info(pjmedia_transport_info *info) 464 { 465 pj_bzero(&info->sock_info, sizeof(pjmedia_sock_info)); 466 info->sock_info.rtp_sock = info->sock_info.rtcp_sock = PJ_INVALID_SOCKET; 467 info->specific_info_cnt = 0; 468 } 469 470 471 /** 472 * Get media transport info from the specified transport and all underlying 473 * transports if any. The transport also contains information about socket info 474 * which describes the local address of the transport, and would be needed 475 * for example to fill in the "c=" and "m=" line of local SDP. 476 * 464 477 * @param tp The transport. 465 478 * @param info Media socket info to be initialized. 466 479 * -
pjsip/src/pjsua-lib/pjsua_media.c
839 839 } 840 840 841 841 /* Get media socket info */ 842 pjmedia_transport_init_info(&tpinfo); 842 843 pjmedia_transport_get_info(call->med_tp, &tpinfo); 843 844 844 845 /* Create SDP */ -
pjsip/src/pjsua-lib/pjsua_core.c
320 320 } 321 321 322 322 /* Get media socket info */ 323 pjmedia_transport_init_info(&tpinfo); 323 324 pjmedia_transport_get_info(pjsua_var.calls[0].med_tp, &tpinfo); 324 325 325 326 /* Add SDP body, using call0's RTP address */ … … 2064 2065 char addr_buf[80]; 2065 2066 2066 2067 /* MSVC complains about tpinfo not being initialized */ 2067 pj_bzero(&tpinfo, sizeof(tpinfo));2068 //pj_bzero(&tpinfo, sizeof(tpinfo)); 2068 2069 2070 pjmedia_transport_init_info(&tpinfo); 2069 2071 pjmedia_transport_get_info(call->med_tp, &tpinfo); 2070 2072 2071 2073 PJ_LOG(3,(THIS_FILE, " %s: %s", -
pjsip/src/pjsua-lib/pjsua_call.c
2260 2260 } 2261 2261 2262 2262 /* Get SRTP status */ 2263 pjmedia_transport_init_info(&tp_info); 2263 2264 pjmedia_transport_get_info(call->med_tp, &tp_info); 2264 2265 if (tp_info.specific_info_cnt > 0) { 2265 2266 int i; … … 2470 2471 pjmedia_sdp_session *local_sdp; 2471 2472 pjmedia_transport_info ti; 2472 2473 2474 pjmedia_transport_init_info(&ti); 2473 2475 pjmedia_transport_get_info(call->med_tp, &ti); 2474 2476 status = pjmedia_endpt_create_sdp(pjsua_var.med_endpt, tdata->pool, 2475 2477 1, &ti.sock_info, &local_sdp); … … 2581 2583 pjmedia_sdp_session *sdp; 2582 2584 2583 2585 /* Get media socket info */ 2586 pjmedia_transport_init_info(&tp_info); 2584 2587 pjmedia_transport_get_info(call->med_tp, &tp_info); 2585 2588 2586 2589 /* Create new offer */ -
pjsip-apps/src/samples/simpleua.c
301 301 * need this info to create SDP (i.e. the address and port info in 302 302 * the SDP). 303 303 */ 304 pjmedia_transport_init_info(&g_med_tpinfo); 304 305 pjmedia_transport_get_info(g_med_transport, &g_med_tpinfo); 305 306 306 307 -
pjsip-apps/src/samples/siprtp.c
1012 1012 1013 1013 1014 1014 /* Get transport info */ 1015 pj _bzero(&tpinfo, sizeof(tpinfo));1015 pjmedia_transport_init_info(&tpinfo); 1016 1016 pjmedia_transport_get_info(audio->transport, &tpinfo); 1017 1017 1018 1018 /* Create and initialize basic SDP session */ -
pjmedia/src/pjmedia/transport_udp.c
593 593 info->sock_info.rtp_addr_name = udp->rtp_addr_name; 594 594 info->sock_info.rtcp_sock = udp->rtcp_sock; 595 595 info->sock_info.rtcp_addr_name = udp->rtcp_addr_name; 596 info->specific_info_cnt = 0;597 596 598 597 return PJ_SUCCESS; 599 598 } -
pjmedia/src/pjmedia/transport_ice.c
700 700 sizeof(pj_sockaddr_in)); 701 701 } 702 702 703 info->specific_info_cnt = 0;704 705 703 return PJ_SUCCESS; 706 704 } 707 705 -
pjmedia/src/pjmedia/transport_srtp.c
564 564 PJ_ASSERT_RETURN(sizeof(pjmedia_srtp_info) <= 565 565 PJMEDIA_TRANSPORT_SPECIFIC_INFO_MAXSIZE, PJ_ENOMEM); 566 566 567 status = pjmedia_transport_get_info(srtp->real_tp, info);568 if (status != PJ_SUCCESS)569 return status;570 571 567 srtp_info.active = srtp->session_inited; 572 568 srtp_info.rx_policy = srtp->rx_policy; 573 569 srtp_info.tx_policy = srtp->tx_policy; … … 578 574 pj_memcpy(&info->spc_info[spc_info_idx].buffer, &srtp_info, 579 575 sizeof(srtp_info)); 580 576 581 return PJ_SUCCESS;577 return pjmedia_transport_get_info(srtp->real_tp, info); 582 578 } 583 579 584 580 static pj_status_t transport_attach(pjmedia_transport *tp,