- Timestamp:
- May 22, 2014 4:52:53 AM (11 years ago)
- Location:
- pjproject/trunk/pjsip-apps/src/pjsua
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/ios/ipjsua/ipjsuaAppDelegate.m
r4813 r4848 226 226 { 227 227 #if PJSUA_HAS_VIDEO 228 pjsua_vid_win_info wi; 229 230 if (wid != PJSUA_INVALID_ID && 231 pjsua_vid_win_get_info(wid, &wi) == PJ_SUCCESS) 232 { 233 UIView *view = (__bridge UIView *)wi.hwnd.info.ios.window; 234 if (view) { 235 dispatch_async(dispatch_get_main_queue(), ^{ 236 UIView *parent = app.viewController.view; 237 /* Add the video window as subview */ 238 [parent addSubview:view]; 239 /* Center it */ 240 view.center = CGPointMake(parent.bounds.size.width/2.0, 241 parent.bounds.size.height/2.0); 242 }); 243 } 244 } 228 int i, last; 229 230 i = (wid == PJSUA_INVALID_ID) ? 0 : wid; 231 last = (wid == PJSUA_INVALID_ID) ? PJSUA_MAX_VID_WINS : wid+1; 232 233 for (;i < last; ++i) { 234 pjsua_vid_win_info wi; 235 236 if (pjsua_vid_win_get_info(i, &wi) == PJ_SUCCESS) { 237 UIView *parent = app.viewController.view; 238 UIView *view = (__bridge UIView *)wi.hwnd.info.ios.window; 239 240 if (view && ![view isDescendantOfView:parent]) { 241 dispatch_async(dispatch_get_main_queue(), ^{ 242 /* Add the video window as subview */ 243 [parent addSubview:view]; 244 245 if (!wi.is_native) { 246 /* Center it horizontally */ 247 view.center = CGPointMake(parent.bounds.size.width/2.0, 248 view.bounds.size.height/2.0); 249 } else { 250 /* Preview window, move it to the bottom */ 251 view.center = CGPointMake(parent.bounds.size.width/2.0, 252 parent.bounds.size.height- 253 view.bounds.size.height/2.0); 254 } 255 }); 256 } 257 } 258 } 259 260 245 261 #endif 246 262 } -
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r4822 r4848 49 49 #ifdef USE_GUI 50 50 pj_bool_t showNotification(pjsua_call_id call_id); 51 void displayWindow(pjsua_vid_win_id wid);52 51 #endif 53 52 … … 557 556 558 557 arrange_window(ci->media[mi].stream.vid.win_in); 559 #ifdef USE_GUI560 displayWindow(ci->media[mi].stream.vid.win_in);561 #endif562 558 563 559 PJ_UNUSED_ARG(has_error); -
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_common.c
r4537 r4848 29 29 #endif 30 30 31 #ifdef USE_GUI 32 void displayWindow(pjsua_vid_win_id wid); 33 #endif 34 31 35 static char some_buf[SOME_BUF_SIZE]; 32 36 … … 252 256 if (wid != PJSUA_INVALID_ID) 253 257 pjsua_vid_win_set_pos(wid, &pos); 258 259 #ifdef USE_GUI 260 displayWindow(wid); 261 #endif 262 254 263 #else 255 264 PJ_UNUSED_ARG(wid);
Note: See TracChangeset
for help on using the changeset viewer.