- Timestamp:
- Apr 8, 2014 9:43:01 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/ios/ipjsua/ipjsuaAppDelegate.m
r4590 r4813 2 2 // ipjsuaAppDelegate.m 3 3 // ipjsua 4 // 5 // Created by Liong Sauw Ming on 13/3/13. 6 // Copyright (c) 2013 Teluu. All rights reserved. 7 // 8 4 /* 5 * Copyright (C) 2013-2014 Teluu Inc. (http://www.teluu.com) 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 */ 9 21 #import "ipjsuaAppDelegate.h" 10 22 #import <pjlib.h> … … 34 46 { 35 47 NSString *str = [NSString stringWithFormat:@"%s", msg]; 36 [app performSelectorOnMainThread:@selector(displayMsg:) withObject:str37 waitUntilDone:NO];48 dispatch_async(dispatch_get_main_queue(), 49 ^{app.viewController.textLabel.text = str;}); 38 50 } 39 51 … … 72 84 { 73 85 PJ_UNUSED_ARG(cfg); 74 }75 76 - (void)displayMsg:(NSString *)str77 {78 app.viewController.textLabel.text = str;79 86 } 80 87 … … 216 223 } 217 224 225 void displayWindow(pjsua_vid_win_id wid) 226 { 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 } 245 #endif 246 } 247 218 248 @end
Note: See TracChangeset
for help on using the changeset viewer.