vlc_linux/vlc-3.0.16/modules/gui/qt/components/controller.cpp
/**
 * It is call to update the list of vout handled by the fullscreen controller
 */
It is call to update the list of vout handled by the fullscreen controller
It is call to update the list of vout handled by the fullscreen controller
void FullscreenControllerWidget::setVoutList( vout_thread_t **pp_vout, int i_vout )
{
    QList<vout_thread_t*> del;
    QList<vout_thread_t*> add;
    QList<vout_thread_t*> set;
    for( int i = 0; i < i_vout; i++ )
        set += pp_vout[i];
    vlc_mutex_lock( &lock );
    foreach( vout_thread_t *p_vout, vout )
    {
        if( !set.contains( p_vout ) )
            del += p_vout;
    }
    vlc_mutex_unlock( &lock );
    foreach( vout_thread_t *p_vout, del )
    {
        var_DelCallback( p_vout, "fullscreen",
                         FullscreenControllerWidget::FullscreenChanged, this );
        vlc_mutex_lock( &lock );
        fullscreenChanged( p_vout, false, 0 );
        vout.removeAll( p_vout );
        vlc_mutex_unlock( &lock );
        vlc_object_release( VLC_OBJECT(p_vout) );
    }
    vlc_mutex_lock( &lock );
    foreach( vout_thread_t *p_vout, set )
    {
        if( !vout.contains( p_vout ) )
            add += p_vout;
    }
    vlc_mutex_unlock( &lock );
    foreach( vout_thread_t *p_vout, add )
    {
        vlc_object_hold( VLC_OBJECT(p_vout) );
        vlc_mutex_lock( &lock );
        vout.append( p_vout );
        var_AddCallback( p_vout, "fullscreen",
                         FullscreenControllerWidget::FullscreenChanged, this );
        emit fullscreenChanged( p_vout, var_InheritBool( p_vout, "fullscreen" ),
                           var_GetInteger( p_vout, "mouse-hide-timeout" ) );
        vlc_mutex_unlock( &lock );
    }
}
void FullscreenControllerWidget :: setVoutList ( vout_thread_t * * pp_vout , int i_vout ) { QList < vout_thread_t * > del ; QList < vout_thread_t * > add ; QList < vout_thread_t * > set ; for ( int i = 0 ; i < i_vout ; i ++ ) set += pp_vout [ i ] ; vlc_mutex_lock ( & lock ) ; foreach ( vout_thread_t * p_vout , vout ) { if ( ! set . contains ( p_vout ) ) del += p_vout ; } vlc_mutex_unlock ( & lock ) ; foreach ( vout_thread_t * p_vout , del ) { var_DelCallback ( p_vout , " " , FullscreenControllerWidget :: FullscreenChanged , this ) ; vlc_mutex_lock ( & lock ) ; fullscreenChanged ( p_vout , false , 0 ) ; vout . removeAll ( p_vout ) ; vlc_mutex_unlock ( & lock ) ; vlc_object_release ( VLC_OBJECT ( p_vout ) ) ; } vlc_mutex_lock ( & lock ) ; foreach ( vout_thread_t * p_vout , set ) { if ( ! vout . contains ( p_vout ) ) add += p_vout ; } vlc_mutex_unlock ( & lock ) ; foreach ( vout_thread_t * p_vout , add ) { vlc_object_hold ( VLC_OBJECT ( p_vout ) ) ; vlc_mutex_lock ( & lock ) ; vout . append ( p_vout ) ; var_AddCallback ( p_vout , " " , FullscreenControllerWidget :: FullscreenChanged , this ) ; emit fullscreenChanged ( p_vout , var_InheritBool ( p_vout , " " ) , var_GetInteger ( p_vout , " " ) ) ; vlc_mutex_unlock ( & lock ) ; } }
It is call to update the list of vout handled by the fullscreen controller
It is call to update the list of vout handled by the fullscreen controller
/* */ /* Vout to remove */ /* Vout to track */ /* I miss a add and fire */