Changeset 3728
- Timestamp:
- Aug 29, 2011 2:33:50 AM (13 years ago)
- Location:
- pjproject/trunk/pjsip-apps/src/vidgui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/vidgui/vidgui.cpp
r3726 r3728 221 221 //status = pjsua_vid_win_set_show(wid, PJ_TRUE); 222 222 //This is handled by VidWin now 223 //video_prev_->show ();223 //video_prev_->show_sdl(); 224 224 showStatus("Preview started"); 225 225 … … 624 624 625 625 }; 626 static int main_func(int argc, char *argv[]) 627 { 628 return 0; 629 } 626 630 627 631 int main(int argc, char *argv[]) 628 632 { 633 pj_run_app(&main_func, argc, argv, 0); 634 629 635 /* At least on Linux, we have to initialize SDL video subsystem prior to 630 636 * creating/initializing QApplication, otherwise we'll segfault miserably -
pjproject/trunk/pjsip-apps/src/vidgui/vidwin.cpp
r3727 r3728 47 47 VidWin::~VidWin() 48 48 { 49 show (false);49 show_sdl(false); 50 50 detach(); 51 51 } … … 73 73 74 74 case QEvent::Show: 75 show (true);75 show_sdl(true); 76 76 // revert to default size hint, make it resizable 77 77 setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); … … 79 79 80 80 case QEvent::Hide: 81 show (false);81 show_sdl(false); 82 82 break; 83 83 … … 139 139 } 140 140 141 void VidWin::show (bool visible)141 void VidWin::show_sdl(bool visible) 142 142 { 143 143 if (!hwnd.info.win.hwnd) return; … … 210 210 } 211 211 212 void VidWin::show (bool visible)212 void VidWin::show_sdl(bool visible) 213 213 { 214 214 if (!hwnd.info.cocoa.window) return; … … 217 217 218 218 if (visible) { 219 if (![w isMiniaturized]) { 220 [w makeKeyAndOrderFront:nil]; 221 } 219 [[w contentView]setHidden:NO]; 222 220 } else { 223 [w orderOut:nil];221 [[w contentView]setHidden:YES]; 224 222 } 225 223 } … … 285 283 } 286 284 287 void VidWin::show (bool visible)285 void VidWin::show_sdl(bool visible) 288 286 { 289 287 if (!hwnd.info.x11.window) return; -
pjproject/trunk/pjsip-apps/src/vidgui/vidwin.h
r3726 r3728 46 46 void set_size(); 47 47 void get_size(); 48 void show (bool visible=true);48 void show_sdl(bool visible=true); 49 49 }; 50 50
Note: See TracChangeset
for help on using the changeset viewer.