Changeset f02445b5a33a8e657497bc00b59c7520f3f1c8a8

Show
Ignore:
Timestamp:
15/09/07 17:27:13 (1 year ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1189870033 +0000
git-parent:

[25314fa74d0249571274795804ad4a363af92d14]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1189870033 +0000
Message:

Remove interface b_block property.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/vlc_interface.h

    r25314fa rf02445b  
    5555 
    5656    /* Thread properties and locks */ 
    57     vlc_bool_t          b_block; 
    5857    vlc_bool_t          b_play; 
    5958 
  • modules/codec/cmml/cmml.c

    r6ee1e19 rf02445b  
    128128    /* initialise the CMML responder interface */ 
    129129    p_sys->p_intf = intf_Create( p_dec, "cmml", 0, NULL ); 
    130     p_sys->p_intf->b_block = VLC_FALSE; 
    131130    intf_RunThread( p_sys->p_intf ); 
    132131 
  • modules/control/ntservice.c

    r81c5ac2 rf02445b  
    325325 
    326326            /* Try to run the interface */ 
    327             p_new_intf->b_block = VLC_FALSE; 
    328327            if( intf_RunThread( p_new_intf ) ) 
    329328            { 
  • modules/control/rc.c

    r7b75f68 rf02445b  
    14631463    if( p_newintf ) 
    14641464    { 
    1465         p_newintf->b_block = VLC_FALSE; 
    14661465        if( intf_RunThread( p_newintf ) ) 
    14671466        { 
  • src/interface/interface.c

    r6ee1e19 rf02445b  
    137137 * intf_RunThread: launch the interface thread 
    138138 ***************************************************************************** 
    139  * This function either creates a new thread and runs the interface in it, 
    140  * or runs the interface in the current thread, depending on b_block. 
     139 * This function either creates a new thread and runs the interface in it. 
    141140 *****************************************************************************/ 
    142141/** 
    143  * Run the interface thread. 
    144  * 
    145  * If b_block is not set, runs the interface in the thread, else, 
    146  * creates a new thread and runs the interface. 
     142 * Starts and runs the interface thread. 
     143 * 
    147144 * \param p_intf the interface thread 
    148145 * \return VLC_SUCCESS on success, an error number else 
     
    173170    else 
    174171#endif 
    175     if( p_intf->b_block ) 
    176     { 
    177         /* If we are clivlc+macosx, don't run the macosx GUI */ 
    178         if( !strcmp( p_intf->p_module->psz_object_name, "macosx" ) ) 
    179         { 
    180             msg_Err( p_intf, "You cannot run the MacOS X module as an " 
    181                              "interface in clivlc mode. Please read the " 
    182                              "README.MacOSX.rtf file."); 
    183             return VLC_EGENERIC; 
    184         } 
    185   
    186         /* If the main interface does not have a run function, 
    187          * implement a waiting loop ourselves 
    188          */ 
    189         if( p_intf->pf_run ) 
    190             RunInterface( p_intf ); 
    191         else 
    192         { 
    193             while( !intf_ShouldDie( p_intf ) ) 
    194                 msleep( INTF_IDLE_SLEEP * 2); 
    195         } 
    196         vlc_object_kill( p_intf ); 
    197     } 
    198     else 
    199     { 
    200         /* This interface doesn't need to be run */ 
    201         if( !p_intf->pf_run ) 
    202             return VLC_SUCCESS; 
    203  
    204         /* Run the interface in a separate thread */ 
    205         if( !strcmp( p_intf->p_module->psz_object_name, "macosx" ) ) 
    206         { 
    207             msg_Err( p_intf, "You cannot run the MacOS X module as an " 
    208                              "extra interface. Please read the " 
    209                              "README.MacOSX.rtf file."); 
    210             return VLC_EGENERIC; 
    211         } 
    212  
    213         /* Run the interface in a separate thread */ 
    214         if( vlc_thread_create( p_intf, "interface", RunInterface, 
    215                                VLC_THREAD_PRIORITY_LOW, VLC_FALSE ) ) 
    216         { 
    217             msg_Err( p_intf, "cannot spawn interface thread" ); 
    218             return VLC_EGENERIC; 
    219         } 
     172 
     173    /* This interface doesn't need to be run */ 
     174    if( p_intf->pf_run == NULL ) 
     175        return VLC_SUCCESS; 
     176 
     177    /* Run the interface in a separate thread */ 
     178    if( !strcmp( p_intf->p_module->psz_object_name, "macosx" ) ) 
     179    { 
     180        msg_Err( p_intf, "You cannot run the MacOS X module as an " 
     181                         "extra interface. Please read the " 
     182                         "README.MacOSX.rtf file."); 
     183        return VLC_EGENERIC; 
     184    } 
     185 
     186    /* Run the interface in a separate thread */ 
     187    if( vlc_thread_create( p_intf, "interface", RunInterface, 
     188                           VLC_THREAD_PRIORITY_LOW, VLC_FALSE ) ) 
     189    { 
     190        msg_Err( p_intf, "cannot spawn interface thread" ); 
     191        return VLC_EGENERIC; 
    220192    } 
    221193 
     
    233205{ 
    234206    /* Tell the interface to die */ 
    235     if( !p_intf->b_block ) 
    236     { 
    237         vlc_object_kill( p_intf ); 
    238         if( p_intf->pf_run ) 
    239         { 
    240             vlc_cond_signal( &p_intf->object_wait ); 
    241             vlc_thread_join( p_intf ); 
    242         } 
     207    vlc_object_kill( p_intf ); 
     208    if( p_intf->pf_run != NULL ) 
     209    { 
     210        vlc_cond_signal( &p_intf->object_wait ); 
     211        vlc_thread_join( p_intf ); 
    243212    } 
    244213} 
     
    427396 
    428397    /* Try to run the interface */ 
    429     p_intf->b_block = VLC_FALSE; 
    430398    if( intf_RunThread( p_intf ) != VLC_SUCCESS ) 
    431399    { 
  • src/libvlc-common.c

    r6ee1e19 rf02445b  
    11331133    /* Try to run the interface */ 
    11341134    p_intf->b_play = b_play; 
    1135     p_intf->b_block = b_block; 
    11361135    i_err = intf_RunThread( p_intf ); 
    11371136    if( i_err ) 
     
    11421141        return i_err; 
    11431142    } 
     1143 
     1144    if( b_block ) 
     1145    { 
     1146        /* FIXME: should be moved to interface/interface.c */ 
     1147        if( p_intf->pf_run ) 
     1148            vlc_thread_join( p_intf ); 
     1149        else 
     1150    { 
     1151            vlc_mutex_lock( &p_intf->object_lock ); 
     1152            vlc_cond_wait( &p_intf->object_wait, &p_intf->object_lock ); 
     1153            vlc_mutex_unlock( &p_intf->object_lock ); 
     1154        } 
     1155        vlc_object_detach( p_intf ); 
     1156        intf_Destroy( p_intf ); 
     1157    } 
     1158 
    11441159    return VLC_SUCCESS; 
    11451160}; 
  • src/video_output/vout_intf.c

    r6ee1e19 rf02445b  
    108108    { 
    109109        p_intf = (intf_thread_t *)p_list->p_values[i].p_object; 
    110         if( p_intf->b_block && p_intf->pf_request_window ) break; 
     110        if( p_intf->pf_request_window ) break; 
    111111        p_intf = NULL; 
    112112    }