Changeset 12b188309df1e63cd65c7988c97d78aa857e21aa

Show
Ignore:
Timestamp:
25/06/08 21:29:49 (4 months ago)
Author:
Rémi Denis-Courmont <rdenis@simphalempin.com>
git-committer:
Rémi Denis-Courmont <rdenis@simphalempin.com> 1214422189 +0300
git-parent:

[c4c75ec7733e6dbceff2babccc73b21e733a8f3a]

git-author:
Rémi Denis-Courmont <rdenis@simphalempin.com> 1214422189 +0300
Message:

Allow more than one use of the video widget

However, I suspect the Qt4 interface will break if there is more than
one video output _at_the_same_time_

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/gui/qt4/qt4.cpp

    rc4c75ec r12b1883  
    334334    DialogsProvider::getInstance( p_intf ); 
    335335 
     336    QPointer<MainInterface> *miP = NULL; 
     337 
    336338    /* Create the normal interface in non-DP mode */ 
    337339    if( !p_intf->pf_show_dialog ) 
     
    342344        p_intf->p_sys->b_isDialogProvider = false; 
    343345 
    344         val.p_address = new QPointer<MainInterface> (p_intf->p_sys->p_mi); 
     346        miP = new QPointer<MainInterface> (p_intf->p_sys->p_mi); 
     347        val.p_address = miP; 
    345348        QMutexLocker locker (&windowLock); 
    346349        var_Set (p_intf, "window_widget", val); 
     
    404407    /* And quit */ 
    405408 
    406     windowLock.lock (); 
    407     var_Get (p_intf, "window_widget", &val); 
    408     if (val.p_address) 
    409         delete (QPointer<MainInterface> *)val.p_address
    410     val.p_address = NULL
    411     var_Set (p_intf, "window_widget", val)
    412     windowLock.unlock(); 
     409    if (miP) 
     410    { 
     411        QMutexLocker locker (&windowLock); 
     412        val.p_address = NULL
     413        var_Set (p_intf, "window_widget", val)
     414        delete miP
     415    } 
    413416 
    414417    /* Destroy first the main interface because it is connected to some slots 
     
    487490    msg_Dbg (obj, "requesting window..."); 
    488491    QPointer<MainInterface> *miP = (QPointer<MainInterface> *)ptrval.p_address; 
    489     ptrval.p_address = NULL; 
    490     /* take ownership */ 
    491     var_Set (intf, "window_widget", ptrval); 
     492    miP = new QPointer<MainInterface> (*miP); /* create our own copy */ 
    492493    vlc_object_release (intf); 
    493494