- /* Run libvlc, in non-blocking mode */
- err = vlc_play();
-
- /* Add background interfaces */
-#if 0
- { int i; for( i=10; i--; ) vlc_add_intf( NULL, "dummy", 0 ); }
- vlc_add_intf( NULL, "dummy", VLC_FALSE );
- vlc_add_intf( NULL, "logger", VLC_FALSE );
- vlc_add_intf( NULL, "xosd", VLC_FALSE );
- vlc_add_intf( NULL, "gtk", VLC_FALSE );
- vlc_add_intf( NULL, "kde", VLC_FALSE );
- vlc_add_intf( "rc", VLC_FALSE );
-#endif
-
- /* Add a blocking interface and keep the return value */
- err = vlc_add_intf( NULL, VLC_TRUE );
-
- /* Finish the threads */
- vlc_stop();
-
- /* Destroy the libvlc structure */
- vlc_destroy();
-
- return err;
-}
-
-#ifndef WIN32
-/*****************************************************************************
- * SigHandler: system signal handler
- *****************************************************************************
- * This function is called when a fatal signal is received by the program.
- * It tries to end the program in a clean way.
- *****************************************************************************/
-static void SigHandler( int i_signal )
-{
- static time_t abort_time = 0;
- static volatile vlc_bool_t b_die = VLC_FALSE;
-
- /* Once a signal has been trapped, the termination sequence will be
- * armed and subsequent signals will be ignored to avoid sending signals
- * to a libvlc structure having been destroyed */
-
- if( !b_die )