Ignore:
Timestamp:
Aug 15, 2011 10:29:14 PM (13 years ago)
Author:
nanang
Message:

Re #1327, some fixes on the simple GUI app:

  • Removed timer usage in resizing window, window resizing can be done real-time now (see r3698).
  • Fixed linking problem on Windows platform: undefined 'main' function.
  • Fixed build problem on Mac, compiling .cpp file containing objective C/C++ codes with g++ needs '-ObjC++' flag.
  • Minor changes in vidgui, e.g: function/variable rename, cleaning up unused/junk lines.
File:
1 edited

Legend:

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

    r3697 r3699  
    2020#include "vidwin.h" 
    2121 
     22#if defined(PJ_WIN32) 
     23#   define SDL_MAIN_HANDLED 
     24#endif 
     25 
    2226#include <SDL.h> 
    2327#include <assert.h> 
     
    5155MainWin::~MainWin() 
    5256{ 
     57    quit(); 
    5358    theInstance_ = NULL; 
    5459} 
     
    95100    connect(hangupButton_, SIGNAL(clicked()), this, SLOT(hangup())); 
    96101    connect(quitButton_, SIGNAL(clicked()), this, SLOT(quit())); 
    97     connect(this, SIGNAL(close()), this, SLOT(quit())); 
     102    //connect(this, SIGNAL(close()), this, SLOT(quit())); 
    98103} 
    99104 
     
    168173        pjsua_vid_win_id wid; 
    169174        pjsua_vid_win_info wi; 
     175        pjsua_vid_preview_param pre_param; 
    170176        pj_status_t status; 
    171177 
    172         status = pjsua_vid_preview_start(DEFAULT_CAP_DEV, NULL); 
     178        pj_bzero(&pre_param, sizeof(pre_param)); 
     179        pre_param.rend_id = DEFAULT_REND_DEV; 
     180 
     181        status = pjsua_vid_preview_start(DEFAULT_CAP_DEV, &pre_param); 
    173182        if (status != PJ_SUCCESS) { 
    174183            char errmsg[PJ_ERR_MSG_SIZE]; 
     
    180189        pjsua_vid_win_get_info(wid, &wi); 
    181190 
    182         video_prev_= new VidWin(&wi.hwnd); 
    183         video_prev_->setMinimumSize(320,200); 
     191        video_prev_ = new VidWin(&wi.hwnd); 
    184192        vbox_left->addWidget(video_prev_, 1); 
    185193 
Note: See TracChangeset for help on using the changeset viewer.