Changeset 4060


Ignore:
Timestamp:
Apr 17, 2012 9:55:30 AM (8 years ago)
Author:
ming
Message:

Re #1355: vidgui: new rendering window may cause all rendering processes to stop
Despite this fix, there is still a possibility that the rendering window can occasionally get stuck because SDL_PollEvent() gets stuck. This is most likely because there are two unsynchronized event pollers, Qt and SDL. The problem only happened on Windows with SDL 1.3 r5538, runs fine on Mac.

Location:
pjproject/trunk
Files:
4 edited

Legend:

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

    r3930 r4060  
    261261 
    262262        video_prev_ = new VidWin(&wi.hwnd); 
    263         vbox_left->addWidget(video_prev_, 1); 
     263        video_prev_->putIntoLayout(vbox_left); 
    264264        //Using this will cause SDL window to display blank 
    265265        //screen sometimes, probably because it's using different 
     
    340340 
    341341            video_= new VidWin(&wi.hwnd); 
    342             vbox_left->addWidget(video_, 1); 
     342            video_->putIntoLayout(vbox_left); 
    343343 
    344344            break; 
  • pjproject/trunk/pjsip-apps/src/vidgui/vidwin.cpp

    r3728 r4060  
    5151} 
    5252 
     53void VidWin::putIntoLayout(QBoxLayout *box) 
     54{ 
     55    box->addWidget(this, 1); 
     56    show(); 
     57    activateWindow(); 
     58} 
     59 
    5360bool VidWin::event(QEvent *e) 
    5461{ 
  • pjproject/trunk/pjsip-apps/src/vidgui/vidwin.h

    r3728 r4060  
    2222#include <pjsua.h> 
    2323#include <QWidget> 
     24#include <QBoxLayout> 
    2425 
    2526class VidWin : public QWidget 
     
    3334    virtual ~VidWin(); 
    3435    QSize sizeHint() const { return size_hint; } 
     36 
     37    void putIntoLayout(QBoxLayout *layout); 
    3538 
    3639protected: 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_vid.c

    r4051 r4060  
    174174    p->rend_id = PJMEDIA_VID_DEFAULT_RENDER_DEV; 
    175175    p->show = PJ_TRUE; 
     176    p->wnd_flags = 0; 
    176177} 
    177178 
Note: See TracChangeset for help on using the changeset viewer.