Changeset 3695 for pjproject/trunk/pjsip-apps/src/vidgui/vidgui.cpp
- Timestamp:
- Aug 15, 2011 9:51:23 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/vidgui/vidgui.cpp
r3686 r3695 20 20 #include "vidwin.h" 21 21 22 #include <SDL.h> 22 23 #include <assert.h> 23 24 … … 575 576 int main(int argc, char *argv[]) 576 577 { 578 /* At least on Linux, we have to initialize SDL video subsystem prior to 579 * creating/initializing QApplication, otherwise we'll segfault miserably 580 * in SDL_CreateWindow(). Here's a stack trace if you're interested: 581 582 Thread [7] (Suspended: Signal 'SIGSEGV' received. Description: Segmentation fault.) 583 13 XCreateIC() 584 12 SetupWindowData() 585 11 X11_CreateWindow() 586 10 SDL_CreateWindow() 587 .. 588 */ 589 if ( SDL_InitSubSystem(SDL_INIT_VIDEO) < 0 ) { 590 printf("Unable to init SDL: %s\n", SDL_GetError()); 591 return 1; 592 } 593 577 594 QApplication app(argc, argv); 595 578 596 MainWin win; 579 597 win.show(); … … 584 602 } 585 603 586 /* Initialize our module to handle otherwise unhandled request */ 587 pjsip_endpt_register_module(pjsua_get_pjsip_endpt(), 588 &mod_default_handler); 604 /* We want to be registrar too! */ 605 if (pjsua_get_pjsip_endpt()) { 606 pjsip_endpt_register_module(pjsua_get_pjsip_endpt(), 607 &mod_default_handler); 608 } 589 609 590 610 return app.exec();
Note: See TracChangeset
for help on using the changeset viewer.