Changes between Version 57 and Version 58 of Video_Users_Guide


Ignore:
Timestamp:
Feb 28, 2014 3:31:01 AM (7 years ago)
Author:
ming
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Video_Users_Guide

    v57 v58  
    299299 1. Now '''"SDL openGL renderer"''' device should show up in video device list. Simply just use this device. 
    300300 
     301=== Mac OS X Video Threading Issue === #mac-thread 
     302 
     303On Mac OS X, our video implementation uses Cocoa frameworks, which require handling user events and drawing window content to be done in the main thread. Hence, to avoid deadlock, application should not call any PJSIP API which can potentially block from the main thread. We provide an API ```pj_run_app()``` to simplify creating a GUI app on Mac OS X, please refer to ```pjsua``` app located in ```pjsip-apps/src/pjsua``` for sample usage. Basically, ```pj_run_app()``` will setup an event loop management in the main thread and create a multi-threading environment, allowing PJSIP to be called from another thread. 
     304 
     305{{{ 
     306int main_func(int argc, char *argv[]) 
     307{ 
     308    // This is your real main function 
     309} 
     310 
     311int main(int argc, char *argv[]) 
     312{ 
     313    // pj_run_app() will call your main function from another thread (if necessary) 
     314    // this will free the main thread to handle GUI events and drawing 
     315    return pj_run_app(&main_func, argc, argv, 0); 
     316} 
     317}}} 
    301318 
    302319[[BR]]