Changeset 1112


Ignore:
Timestamp:
Mar 28, 2007 4:24:00 PM (17 years ago)
Author:
bennylp
Message:

Fixed pjnath build warnings/errors on Linux

Location:
pjproject/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/Makefile

    r700 r1112  
    22include build/host-$(HOST_NAME).mak 
    33 
    4 DIRS = pjlib pjlib-util pjmedia pjsip pjsip-apps 
     4DIRS = pjlib pjlib-util pjnath pjmedia pjsip pjsip-apps 
    55 
    66ifdef MINSIZE 
     
    2121LIBS =  pjlib/lib/libpj-$(TARGET_NAME).a \ 
    2222        pjlib-util/lib/libpjlib-util-$(TARGET_NAME).a \ 
     23        pjnath/lib/libpjnath-$(TARGET_NAME).a \ 
    2324        pjmedia/lib/libpjmedia-$(TARGET_NAME).a \ 
    2425        pjmedia/lib/libpjmedia-codec-$(TARGET_NAME).a \ 
  • pjproject/trunk/pjmedia/include/pjmedia/transport_ice.h

    r1111 r1112  
    2323/** 
    2424 * @file transport_ice.h 
    25  * @brief Stream transport with ICE. 
     25 * @brief ICE capable media transport. 
    2626 */ 
    2727 
     
    3131 
    3232/** 
    33  * @defgroup PJMEDIA_TRANSPORT_ICE ICE Socket Transport 
    34  * @ingroup PJMEDIA_TRANSPORT_H 
     33 * @defgroup PJMEDIA_TRANSPORT_ICE ICE Capable media transport  
     34 * @ingroup PJMEDIA_TRANSPORT 
    3535 * @brief Implementation of media transport with ICE. 
    3636 * @{ 
     
    4040 
    4141 
     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 */ 
    4254PJ_DECL(pj_status_t) pjmedia_ice_create(pjmedia_endpt *endpt, 
    4355                                        const char *name, 
     
    4557                                        pj_stun_config *stun_cfg, 
    4658                                        pjmedia_transport **p_tp); 
     59 
     60/** 
     61 * Destroy the media transport. 
     62 * 
     63 * @param tp            The media transport. 
     64 * 
     65 * @return              PJ_SUCCESS. 
     66 */ 
    4767PJ_DECL(pj_status_t) pjmedia_ice_destroy(pjmedia_transport *tp); 
    4868 
     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 */ 
    49106PJ_DECL(pj_status_t) pjmedia_ice_start_init(pjmedia_transport *tp, 
    50107                                            unsigned options, 
     
    52109                                            const pj_sockaddr_in *stun_srv, 
    53110                                            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 */ 
    54121PJ_DECL(pj_status_t) pjmedia_ice_get_init_status(pjmedia_transport *tp); 
    55122 
     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 */ 
    56134PJ_DECL(pj_status_t) pjmedia_ice_get_comp(pjmedia_transport *tp, 
    57135                                          unsigned comp_id, 
    58136                                          pj_ice_strans_comp *comp); 
    59137 
     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 */ 
    60149PJ_DECL(pj_status_t) pjmedia_ice_init_ice(pjmedia_transport *tp, 
    61150                                          pj_ice_sess_role role, 
    62151                                          const pj_str_t *local_ufrag, 
    63152                                          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 */ 
    64164PJ_DECL(pj_status_t) pjmedia_ice_modify_sdp(pjmedia_transport *tp, 
    65165                                            pj_pool_t *pool, 
    66166                                            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 */ 
    67184PJ_DECL(pj_status_t) pjmedia_ice_start_ice(pjmedia_transport *tp, 
    68185                                           pj_pool_t *pool, 
    69                                            pjmedia_sdp_session *rem_sdp, 
     186                                           const pjmedia_sdp_session *rem_sdp, 
    70187                                           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 */ 
    71198PJ_DECL(pj_status_t) pjmedia_ice_stop_ice(pjmedia_transport *tp); 
    72199 
  • pjproject/trunk/pjmedia/include/pjmedia/transport_udp.h

    r974 r1112  
    3131/** 
    3232 * @defgroup PJMEDIA_TRANSPORT_UDP UDP Socket Transport 
    33  * @ingroup PJMEDIA_TRANSPORT_H 
     33 * @ingroup PJMEDIA_TRANSPORT 
    3434 * @brief Implementation of media transport with UDP sockets. 
    3535 * @{ 
  • pjproject/trunk/pjmedia/src/pjmedia/transport_ice.c

    r1111 r1112  
    401401PJ_DEF(pj_status_t) pjmedia_ice_start_ice(pjmedia_transport *tp, 
    402402                                          pj_pool_t *pool, 
    403                                           pjmedia_sdp_session *rem_sdp, 
     403                                          const pjmedia_sdp_session *rem_sdp, 
    404404                                          unsigned media_index) 
    405405{ 
    406406    struct transport_ice *tp_ice = (struct transport_ice*)tp; 
    407     pjmedia_sdp_attr *attr; 
     407    const pjmedia_sdp_attr *attr; 
    408408    unsigned i, cand_cnt; 
    409409    pj_ice_sess_cand cand[PJ_ICE_MAX_CAND]; 
    410     pjmedia_sdp_media *sdp_med; 
     410    const pjmedia_sdp_media *sdp_med; 
    411411    pj_str_t uname, pass; 
    412412    pj_status_t status; 
  • pjproject/trunk/pjnath/src/pjnath/ice_session.c

    r1111 r1112  
    8383static pj_status_t start_periodic_check(pj_timer_heap_t *th,  
    8484                                        pj_timer_entry *te); 
     85static void periodic_timer(pj_timer_heap_t *th,  
     86                         pj_timer_entry *te); 
    8587static pj_status_t on_stun_send_msg(pj_stun_session *sess, 
    8688                                    const void *pkt, 
     
    10791081    td->clist = clist; 
    10801082    clist->timer.user_data = (void*)td; 
    1081     clist->timer.cb = &start_periodic_check; 
     1083    clist->timer.cb = &periodic_timer; 
    10821084 
    10831085 
     
    12571259} 
    12581260 
     1261 
     1262/* Timer callback to perform periodic check */ 
     1263static void periodic_timer(pj_timer_heap_t *th,  
     1264                           pj_timer_entry *te) 
     1265{ 
     1266    start_periodic_check(th, te); 
     1267} 
    12591268 
    12601269/* Start ICE check */ 
  • pjproject/trunk/pjsip/include/pjsua-lib/pjsua_internal.h

    r1098 r1112  
    296296                                           pjmedia_sdp_session **p_sdp); 
    297297pj_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); 
    300300pj_status_t pjsua_media_channel_deinit(pjsua_call_id call_id); 
    301301 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c

    r1109 r1112  
    20872087{ 
    20882088    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; 
    20912091 
    20922092    PJSUA_LOCK(); 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c

    r1102 r1112  
    654654 
    655655 
    656 static pj_status_t resolve_stun_server(pj_bool_t use_dns_srv); 
    657  
    658656/* 
    659657 * Callback function to receive notification from the resolver 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c

    r1111 r1112  
    772772 
    773773pj_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) 
    776776{ 
    777777    int prev_media_st = 0; 
Note: See TracChangeset for help on using the changeset viewer.