Ignore:
Timestamp:
Apr 22, 2009 5:20:24 PM (16 years ago)
Author:
bennylp
Message:

Part of ticket #780: enhance the PJNATH doxygen documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/include/pjnath/ice_strans.h

    r2394 r2642  
    3838 
    3939/** 
    40  * @defgroup PJNATH_ICE_STREAM_TRANSPORT ICE Stream Transport 
    41  * @brief Transport for media streams using ICE 
    42  * @ingroup PJNATH_ICE 
     40 * @addtogroup PJNATH_ICE_STREAM_TRANSPORT 
    4341 * @{ 
    4442 * 
     
    5452 * various candidates of the transport addresses. 
    5553 * 
     54 * 
     55 * \section ice_strans_using_sec Using the ICE stream transport 
     56 * 
     57 * The steps below describe how to use ICE session: 
     58 * 
     59 *  - initialize a #pj_ice_strans_cfg structure. This contains various  
     60 *    settings for the ICE stream transport, and among other things contains 
     61 *    the STUN and TURN settings.\n\n 
     62 *  - create the instance with #pj_ice_strans_create(). Among other things, 
     63 *    the function needs the following arguments: 
     64 *      - the #pj_ice_strans_cfg structure for the main configurations 
     65 *      - number of components to be supported 
     66 *      - instance of #pj_ice_strans_cb structure to report callbacks to 
     67 *        application.\n\n 
     68 *  - while the #pj_ice_strans_create() call completes immediately, the 
     69 *    initialization will be running in the background to gather the  
     70 *    candidates (for example STUN and TURN candidates, if they are enabled 
     71 *    in the #pj_ice_strans_cfg setting). Application will be notified when 
     72 *    the initialization completes in the \a on_ice_complete callback of 
     73 *    the #pj_ice_strans_cb structure (the \a op argument of this callback 
     74 *    will be PJ_ICE_STRANS_OP_INIT).\n\n 
     75 *  - when media stream is to be started (for example, a call is to be  
     76 *    started), create an ICE session by calling #pj_ice_strans_init_ice().\n\n 
     77 *  - the application now typically will need to communicate local ICE 
     78 *    information to remote host. It can achieve this by using the following 
     79 *    functions to query local ICE information: 
     80 *      - #pj_ice_strans_get_ufrag_pwd() 
     81 *      - #pj_ice_strans_enum_cands() 
     82 *      - #pj_ice_strans_get_def_cand()\n 
     83 *    The application may need to encode the above information as SDP.\n\n 
     84 *  - when the application receives remote ICE information (for example, from 
     85 *    the SDP received from remote), it can now start ICE negotiation, by 
     86 *    calling #pj_ice_strans_start_ice(). This function requires some 
     87 *    information about remote ICE agent such as remote ICE username fragment 
     88 *    and password as well as array of remote candidates.\n\n 
     89 *  - note that the PJNATH library does not work with SDP; application would 
     90 *    need to encode and parse the SDP itself.\n\n 
     91 *  - once ICE negotiation has been started, application will be notified 
     92 *    about the completion in the \a on_ice_complete() callback of the 
     93 *    #pj_ice_strans_cb.\n\n 
     94 *  - at any time, application may send or receive data. However the ICE 
     95 *    stream transport may not be able to send it depending on its current 
     96 *    state. Before ICE negotiation is started, the data will be sent using 
     97 *    default candidate of the component. After negotiation is completed, 
     98 *    data will be sent using the candidate from the successful/nominated 
     99 *    pair. The ICE stream transport may not be able to send data while  
     100 *    negotiation is in progress.\n\n 
     101 *  - application sends data by using #pj_ice_strans_sendto(). Incoming 
     102 *    data will be reported in \a on_rx_data() callback of the 
     103 *    #pj_ice_strans_cb.\n\n 
     104 *  - once the media session has finished (e.g. user hangs up the call), 
     105 *    destroy the ICE session with #pj_ice_strans_stop_ice().\n\n 
     106 *  - at this point, application may destroy the ICE stream transport itself, 
     107 *    or let it run so that it can be reused to create other ICE session. 
     108 *    The benefit of letting the ICE stream transport alive (without any 
     109 *    session active) is to avoid delay with the initialization, howerver 
     110 *    keeping the transport alive means the transport needs to keep the 
     111 *    STUN binding open by using keep-alive and also TURN allocation alive, 
     112 *    and this will consume power which is an important issue for mobile 
     113 *    applications.\n\n 
    56114 */ 
    57115 
Note: See TracChangeset for help on using the changeset viewer.