Ignore:
Timestamp:
Jul 18, 2017 11:55:25 AM (7 years ago)
Author:
ming
Message:

Re #1994 (misc): Fixed warning during runtime on iOS 11:
UI API called on a background thread

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-videodev/darwin_dev.m

    r5498 r5628  
    891891        /* Create renderer stream here */ 
    892892         
    893         status = darwin_init_view(strm); 
    894         if (status != PJ_SUCCESS) 
    895             goto on_error; 
     893        dispatch_sync_on_main_queue(^{ 
     894            darwin_init_view(strm); 
     895        }); 
    896896         
    897897        if (!strm->vout_delegate) { 
     
    10001000             
    10011001#if TARGET_OS_IPHONE 
    1002             /* Create view, if none */ 
    1003             if (!strm->render_view) 
    1004                 darwin_init_view(strm); 
    1005              
    10061002            /* Preview layer instantiation should be in main thread! */ 
    10071003            dispatch_sync_on_main_queue(^{ 
     1004                /* Create view, if none */ 
     1005                if (!strm->render_view) 
     1006                    darwin_init_view(strm); 
     1007             
    10081008                /* Create preview layer */ 
    10091009                AVCaptureVideoPreviewLayer *prev_layer = 
Note: See TracChangeset for help on using the changeset viewer.