Changes between Version 3 and Version 4 of PJSUA_Initialization


Ignore:
Timestamp:
Jul 25, 2017 1:57:13 AM (7 years ago)
Author:
ming
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PJSUA_Initialization

    v3 v4  
    77= Threading issue with PJSUA initialization and shutdown = 
    88 
    9 To use PJSIP, it is recommended to call {{{pj_init()}}} and {{{pj_shutdown()}}} from the main thread. After {{{pj_init()}}} is completed, application can continue with the initialization or create a secondary/worker thread and register the thread by calling {{{pj_thread_register()}}}. As described in [http://www.pjsip.org/docs/latest/pjsip/docs/html/group__PJSUA__LIB__BASE.htm#details PJSUA-API Basic API documentation], app needs to call {{{pjsua_create()}}}, {{{pjsua_pool_create()}}}, {{{pjsua_init()}}} to perform the initialization. Then app must call {{{pjsua_start()}}} to start PJSUA and finally after everything is done, call {{{pjsua_destroy()}}} to shut it down. Sample code: 
     9To use PJSIP, it is recommended to call {{{pj_init()}}} and {{{pj_shutdown()}}} from the main thread. After {{{pj_init()}}} is completed, application can continue with the initialization or create a secondary/worker thread and register the thread by calling {{{pj_thread_register()}}} (Creating a secondary thread is especially recommended, sometimes necessary, for apps that require main thread to be responsive, such as GUI apps, or apps that use video, or real-time apps). As described in [http://www.pjsip.org/docs/latest/pjsip/docs/html/group__PJSUA__LIB__BASE.htm#details PJSUA-API Basic API documentation], app needs to call {{{pjsua_create()}}}, {{{pjsua_pool_create()}}}, {{{pjsua_init()}}} to perform the initialization. Then app must call {{{pjsua_start()}}} to start PJSUA and finally after everything is done, call {{{pjsua_destroy()}}} to shut it down. Sample code: 
    1010 
    1111 {{{