Changes between Version 4 and Version 5 of PJSUA_Initialization


Ignore:
Timestamp:
Jan 25, 2023 8:56:26 AM (22 months ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PJSUA_Initialization

    v4 v5  
    55}}} 
    66 
    7 = Threading issue with PJSUA initialization and shutdown = 
     7= ~~Threading issue with PJSUA initialization and shutdown~~ = 
     8 
     9**Moved to https://docs.pjsip.org/en/latest/specific-guides/develop/init_shutdown_thread.html** 
    810 
    911To 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: