Changeset 3697 for pjproject


Ignore:
Timestamp:
Aug 15, 2011 10:04:35 AM (13 years ago)
Author:
bennylp
Message:

Re #1327 (vidgui):

  • fixed wrong default capture device (was 1)
  • fixed assertion if unable to open capture device
  • in qmake project file (vidgui.pro):
    • fixed INCLUDEPATH
    • added debug and release setting
    • added (disabled) static linking setting
Location:
pjproject/trunk/pjsip-apps/src/vidgui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/vidgui

    • Property svn:ignore
      •  

        old new  
        22vidgui 
        33Makefile 
         4README.TXT 
        45.project 
        56.cproject 
         7release 
         8debug 
         9*.log 
         10*.idb 
         11*.pdb 
         12*.vcproj 
         13*.user 
  • pjproject/trunk/pjsip-apps/src/vidgui/vidgui.cpp

    r3695 r3697  
    2222#include <SDL.h> 
    2323#include <assert.h> 
     24#include <QMessageBox> 
    2425 
    2526#define LOG_FILE                "vidgui.log" 
    2627 
     28// These configure SIP registration 
    2729#define SIP_DOMAIN              NULL 
    2830//#define SIP_DOMAIN            "pjsip.org" 
     
    3133#define SIP_PORT                5060 
    3234 
    33 //#define DEFAULT_CAP_DEV               PJMEDIA_VID_DEFAULT_CAPTURE_DEV 
    34 #define DEFAULT_CAP_DEV         1 
     35#define DEFAULT_CAP_DEV         PJMEDIA_VID_DEFAULT_CAPTURE_DEV 
     36//#define DEFAULT_CAP_DEV               1 
    3537#define DEFAULT_REND_DEV        PJMEDIA_VID_DEFAULT_RENDER_DEV 
    3638 
     
    166168        pjsua_vid_win_id wid; 
    167169        pjsua_vid_win_info wi; 
    168  
    169         pjsua_vid_preview_start(DEFAULT_CAP_DEV, NULL); 
     170        pj_status_t status; 
     171 
     172        status = pjsua_vid_preview_start(DEFAULT_CAP_DEV, NULL); 
     173        if (status != PJ_SUCCESS) { 
     174            char errmsg[PJ_ERR_MSG_SIZE]; 
     175            pj_strerror(status, errmsg, sizeof(errmsg)); 
     176            QMessageBox::critical(0, "Error creating preview", errmsg); 
     177            return; 
     178        } 
    170179        wid = pjsua_vid_preview_get_win(DEFAULT_CAP_DEV); 
    171180        pjsua_vid_win_get_info(wid, &wi); 
  • pjproject/trunk/pjsip-apps/src/vidgui/vidgui.pro

    r3687 r3697  
    11win32 { 
    22  DEFINES += PJ_WIN32=1 
    3   LIBS += ../../../lib/pjproject.lib Iphlpapi.lib  dsound.lib \ 
     3  INCLUDEPATH += ../../../pjlib/include ../../../pjlib-util/include \ 
     4                 ../../../pjnath/include ../../../pjmedia/include \ 
     5                 ../../../pjsip/include 
     6 
     7  # These to enable static linking 
     8  #CONFIG += static 
     9  #DEFINES += STATIC 
     10 
     11  CONFIG(debug) { 
     12    LIBS += ../../../lib/libpjproject-i386-Win32-vc8-Debug.lib 
     13  } else { 
     14    LIBS += ../../../lib/libpjproject-i386-Win32-vc8-Release.lib 
     15  } 
     16  LIBS += Iphlpapi.lib  dsound.lib \ 
    417          dxguid.lib netapi32.lib mswsock.lib ws2_32.lib odbc32.lib \ 
    518          odbccp32.lib ole32.lib user32.lib gdi32.lib advapi32.lib  
Note: See TracChangeset for help on using the changeset viewer.