- Timestamp:
- Mar 28, 2007 4:24:00 PM (18 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/Makefile
r700 r1112 2 2 include build/host-$(HOST_NAME).mak 3 3 4 DIRS = pjlib pjlib-util pj media pjsip pjsip-apps4 DIRS = pjlib pjlib-util pjnath pjmedia pjsip pjsip-apps 5 5 6 6 ifdef MINSIZE … … 21 21 LIBS = pjlib/lib/libpj-$(TARGET_NAME).a \ 22 22 pjlib-util/lib/libpjlib-util-$(TARGET_NAME).a \ 23 pjnath/lib/libpjnath-$(TARGET_NAME).a \ 23 24 pjmedia/lib/libpjmedia-$(TARGET_NAME).a \ 24 25 pjmedia/lib/libpjmedia-codec-$(TARGET_NAME).a \ -
pjproject/trunk/pjmedia/include/pjmedia/transport_ice.h
r1111 r1112 23 23 /** 24 24 * @file transport_ice.h 25 * @brief Stream transport with ICE.25 * @brief ICE capable media transport. 26 26 */ 27 27 … … 31 31 32 32 /** 33 * @defgroup PJMEDIA_TRANSPORT_ICE ICE Socket Transport34 * @ingroup PJMEDIA_TRANSPORT _H33 * @defgroup PJMEDIA_TRANSPORT_ICE ICE Capable media transport 34 * @ingroup PJMEDIA_TRANSPORT 35 35 * @brief Implementation of media transport with ICE. 36 36 * @{ … … 40 40 41 41 42 /** 43 * Create the media transport. 44 * 45 * @param endpt The media endpoint. 46 * @param name Optional name to identify this ICE media transport 47 * for logging purposes. 48 * @param comp_cnt Number of components to be created. 49 * @param stun_cfg Pointer to STUN configuration settings. 50 * @param p_tp Pointer to receive the media transport instance. 51 * 52 * @return PJ_SUCCESS on success, or the appropriate error code. 53 */ 42 54 PJ_DECL(pj_status_t) pjmedia_ice_create(pjmedia_endpt *endpt, 43 55 const char *name, … … 45 57 pj_stun_config *stun_cfg, 46 58 pjmedia_transport **p_tp); 59 60 /** 61 * Destroy the media transport. 62 * 63 * @param tp The media transport. 64 * 65 * @return PJ_SUCCESS. 66 */ 47 67 PJ_DECL(pj_status_t) pjmedia_ice_destroy(pjmedia_transport *tp); 48 68 69 70 /** 71 * Start the initialization process of this media transport. This function 72 * will gather the transport addresses to be registered to ICE session as 73 * candidates. If STUN is configured, this will start the STUN Binding or 74 * Allocate request to get the STUN server reflexive or relayed address. 75 * This function will return immediately, and application should poll the 76 * STUN completion status by calling #pjmedia_ice_get_init_status(). 77 * 78 * @param tp The media transport. 79 * @param options Options, see pj_ice_strans_option in PJNATH 80 * documentation. 81 * @param start_addr Local address where socket will be bound to. This 82 * address will be used as follows: 83 * - if the value is NULL, then socket will be bound 84 * to any available port. 85 * - if the value is not NULL, then if the port number 86 * is not zero, it will used as the starting port 87 * where the socket will be bound to. If bind() to 88 * this port fails, this function will try to bind 89 * to port+2, repeatedly until it succeeded. 90 * If application doesn't want this function to 91 * retry binding the socket to other port, it can 92 * specify PJ_ICE_ST_OPT_NO_PORT_RETRY option. 93 * - if the value is not NULL, then if the address 94 * is not INADDR_ANY, this function will bind the 95 * socket to this particular interface only, and 96 * no other host candidates will be added for this 97 * socket. 98 * @param stun_srv Address of the STUN server, or NULL if STUN server 99 * reflexive mapping is not to be used. 100 * @param turn_srv Address of the TURN server, or NULL if TURN relay 101 * is not to be used. 102 * 103 * @return PJ_SUCCESS when the initialization process has started 104 * successfully, or the appropriate error code. 105 */ 49 106 PJ_DECL(pj_status_t) pjmedia_ice_start_init(pjmedia_transport *tp, 50 107 unsigned options, … … 52 109 const pj_sockaddr_in *stun_srv, 53 110 const pj_sockaddr_in *turn_srv); 111 112 /** 113 * Poll the initialization status of this media transport. 114 * 115 * @param tp The media transport. 116 * 117 * @return PJ_SUCCESS if all candidates have been resolved 118 * successfully, PJ_EPENDING if transport resolution 119 * is still in progress, or other status on failure. 120 */ 54 121 PJ_DECL(pj_status_t) pjmedia_ice_get_init_status(pjmedia_transport *tp); 55 122 123 124 /** 125 * Get the ICE stream transport component for the specified component ID. 126 * 127 * @param tp The media transport. 128 * @param comp_id The component ID. 129 * @param comp The structure which will be filled with the 130 * component. 131 * 132 * @return PJ_SUCCESS or the appropriate error code. 133 */ 56 134 PJ_DECL(pj_status_t) pjmedia_ice_get_comp(pjmedia_transport *tp, 57 135 unsigned comp_id, 58 136 pj_ice_strans_comp *comp); 59 137 138 /** 139 * Initialize the ICE session. 140 * 141 * @param tp The media transport. 142 * @param role ICE role. 143 * @param local_ufrag Optional local username fragment. 144 * @param local_passwd Optional local password. 145 * 146 * @return PJ_SUCCESS, or the appropriate error code. 147 148 */ 60 149 PJ_DECL(pj_status_t) pjmedia_ice_init_ice(pjmedia_transport *tp, 61 150 pj_ice_sess_role role, 62 151 const pj_str_t *local_ufrag, 63 152 const pj_str_t *local_passwd); 153 154 /** 155 * Modify the SDP to add ICE specific SDP attributes before sending 156 * the SDP to remote host. 157 * 158 * @param tp The media transport. 159 * @param pool Pool to allocate memory for the SDP elements. 160 * @param sdp The SDP descriptor to be modified. 161 * 162 * @return PJ_SUCCESS, or the appropriate error code. 163 */ 64 164 PJ_DECL(pj_status_t) pjmedia_ice_modify_sdp(pjmedia_transport *tp, 65 165 pj_pool_t *pool, 66 166 pjmedia_sdp_session *sdp); 167 168 /** 169 * Start ICE connectivity checks. 170 * 171 * This function will pair the local and remote candidates to create 172 * check list. Once the check list is created and sorted based on the 173 * priority, ICE periodic checks will be started. This function will 174 * return immediately, and application will be notified about the 175 * connectivity check status in the callback. 176 * 177 * @param tp The media transport. 178 * @param pool Memory pool to parse the SDP. 179 * @param rem_sdp The SDP received from remote agent. 180 * @param media_index The media index (in SDP) to process. 181 * 182 * @return PJ_SUCCESS, or the appropriate error code. 183 */ 67 184 PJ_DECL(pj_status_t) pjmedia_ice_start_ice(pjmedia_transport *tp, 68 185 pj_pool_t *pool, 69 pjmedia_sdp_session *rem_sdp,186 const pjmedia_sdp_session *rem_sdp, 70 187 unsigned media_index); 188 189 /** 190 * Stop the ICE session (typically when the call is terminated). Application 191 * may restart the ICE session again by calling #pjmedia_ice_init_ice(), 192 * for example to use this media transport for the next call. 193 * 194 * @param tp The media transport. 195 * 196 * @return PJ_SUCCESS, or the appropriate error code. 197 */ 71 198 PJ_DECL(pj_status_t) pjmedia_ice_stop_ice(pjmedia_transport *tp); 72 199 -
pjproject/trunk/pjmedia/include/pjmedia/transport_udp.h
r974 r1112 31 31 /** 32 32 * @defgroup PJMEDIA_TRANSPORT_UDP UDP Socket Transport 33 * @ingroup PJMEDIA_TRANSPORT _H33 * @ingroup PJMEDIA_TRANSPORT 34 34 * @brief Implementation of media transport with UDP sockets. 35 35 * @{ -
pjproject/trunk/pjmedia/src/pjmedia/transport_ice.c
r1111 r1112 401 401 PJ_DEF(pj_status_t) pjmedia_ice_start_ice(pjmedia_transport *tp, 402 402 pj_pool_t *pool, 403 pjmedia_sdp_session *rem_sdp,403 const pjmedia_sdp_session *rem_sdp, 404 404 unsigned media_index) 405 405 { 406 406 struct transport_ice *tp_ice = (struct transport_ice*)tp; 407 pjmedia_sdp_attr *attr;407 const pjmedia_sdp_attr *attr; 408 408 unsigned i, cand_cnt; 409 409 pj_ice_sess_cand cand[PJ_ICE_MAX_CAND]; 410 pjmedia_sdp_media *sdp_med;410 const pjmedia_sdp_media *sdp_med; 411 411 pj_str_t uname, pass; 412 412 pj_status_t status; -
pjproject/trunk/pjnath/src/pjnath/ice_session.c
r1111 r1112 83 83 static pj_status_t start_periodic_check(pj_timer_heap_t *th, 84 84 pj_timer_entry *te); 85 static void periodic_timer(pj_timer_heap_t *th, 86 pj_timer_entry *te); 85 87 static pj_status_t on_stun_send_msg(pj_stun_session *sess, 86 88 const void *pkt, … … 1079 1081 td->clist = clist; 1080 1082 clist->timer.user_data = (void*)td; 1081 clist->timer.cb = & start_periodic_check;1083 clist->timer.cb = &periodic_timer; 1082 1084 1083 1085 … … 1257 1259 } 1258 1260 1261 1262 /* Timer callback to perform periodic check */ 1263 static void periodic_timer(pj_timer_heap_t *th, 1264 pj_timer_entry *te) 1265 { 1266 start_periodic_check(th, te); 1267 } 1259 1268 1260 1269 /* Start ICE check */ -
pjproject/trunk/pjsip/include/pjsua-lib/pjsua_internal.h
r1098 r1112 296 296 pjmedia_sdp_session **p_sdp); 297 297 pj_status_t pjsua_media_channel_update(pjsua_call_id call_id, 298 pjmedia_sdp_session *local_sdp,299 pjmedia_sdp_session *remote_sdp);298 const pjmedia_sdp_session *local_sdp, 299 const pjmedia_sdp_session *remote_sdp); 300 300 pj_status_t pjsua_media_channel_deinit(pjsua_call_id call_id); 301 301 -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r1109 r1112 2087 2087 { 2088 2088 pjsua_call *call; 2089 pjmedia_sdp_session *local_sdp;2090 pjmedia_sdp_session *remote_sdp;2089 const pjmedia_sdp_session *local_sdp; 2090 const pjmedia_sdp_session *remote_sdp; 2091 2091 2092 2092 PJSUA_LOCK(); -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
r1102 r1112 654 654 655 655 656 static pj_status_t resolve_stun_server(pj_bool_t use_dns_srv);657 658 656 /* 659 657 * Callback function to receive notification from the resolver -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
r1111 r1112 772 772 773 773 pj_status_t pjsua_media_channel_update(pjsua_call_id call_id, 774 pjmedia_sdp_session *local_sdp,775 pjmedia_sdp_session *remote_sdp)774 const pjmedia_sdp_session *local_sdp, 775 const pjmedia_sdp_session *remote_sdp) 776 776 { 777 777 int prev_media_st = 0;
Note: See TracChangeset
for help on using the changeset viewer.