Ignore:
Timestamp:
Dec 5, 2013 3:03:36 AM (10 years ago)
Author:
bennylp
Message:

Re #1519: fixed threading issues on Python. On Python, only threads created by Python can call Python. This creates problem with calling callback from worker thread. The SIP worker thread can be disabled, but we have other worker threads such as the sound device that cannot be disabled. The solution in this patch is to create small framework to post a job to "main thread" during libHandleEvents(). The main thread is thread that calls libCreate().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/pjsua2/pjsip/src/pjsua2/media.cpp

    r4676 r4678  
    377377 
    378378AudDevManager::AudDevManager() 
    379 { 
    380     devMedia = new DevAudioMedia; 
     379: devMedia(NULL) 
     380{ 
    381381} 
    382382 
     
    394394AudioMedia &AudDevManager::getCaptureDevMedia() throw(Error) 
    395395{ 
     396    if (!devMedia) 
     397        devMedia = new DevAudioMedia; 
    396398    return *devMedia; 
    397399} 
     
    404406AudioMedia &AudDevManager::getPlaybackDevMedia() throw(Error) 
    405407{ 
     408    if (!devMedia) 
     409        devMedia = new DevAudioMedia; 
    406410    return *devMedia; 
    407411} 
Note: See TracChangeset for help on using the changeset viewer.