*****************************************************************************/
static int Open ( vlc_object_t * );
static void Close ( vlc_object_t * );
-static void Run ( intf_thread_t * );
static int ItemChange( vlc_object_t *, const char *,
vlc_value_t, vlc_value_t, void * );
* Module descriptor
****************************************************************************/
-
#define APPLICATION_NAME "VLC media player"
#define TIMEOUT_TEXT N_("Timeout (ms)")
var_AddCallback( p_playlist, "playlist-current", ItemChange, p_intf );
pl_Release( p_intf );
- p_intf->pf_run = Run;
return VLC_SUCCESS;
}
notify_uninit();
}
-/*****************************************************************************
- * Run
- *****************************************************************************/
-static void Run( intf_thread_t *p_this )
-{
- msleep( 10*INTF_IDLE_SLEEP );
-}
-
/*****************************************************************************
* ItemChange: Playlist item change callback
*****************************************************************************/
}
else
{
+ /* This interface doesn't need to be run */
+ if( !p_intf->pf_run )
+ {
+ return VLC_SUCCESS;
+ }
/* Run the interface in a separate thread */
if( !strcmp( p_intf->p_module->psz_object_name, "macosx" ) )
{
}
else
{
+ /* This interface doesn't need to be run */
+ if( !p_intf->pf_run )
+ return VLC_SUCCESS;
+
/* Run the interface in a separate thread */
if( vlc_thread_create( p_intf, "interface", RunInterface,
VLC_THREAD_PRIORITY_LOW, VLC_FALSE ) )
}
/* Wait for the thread to exit */
- vlc_thread_join( p_intf );
+ if( p_intf->pf_run )
+ vlc_thread_join( p_intf );
}
/**