1 /*****************************************************************************
2 * vlc.c: the vlc player
3 *****************************************************************************
4 * Copyright (C) 1998-2001 VideoLAN
5 * $Id: vlc.c,v 1.6 2002/07/20 18:01:43 sam Exp $
7 * Authors: Vincent Seguin <seguin@via.ecp.fr>
8 * Samuel Hocevar <sam@zoy.org>
9 * Gildas Bazin <gbazin@netcourrier.com>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
24 *****************************************************************************/
25 #include <signal.h> /* SIGHUP, SIGINT, SIGKILL */
26 #include <stdio.h> /* fprintf() */
27 #include <stdlib.h> /* putenv(), strtol(), */
31 /*****************************************************************************
32 * main: parse command line, start interface and spawn threads
33 *****************************************************************************/
34 int main(int i_argc, char *ppsz_argv[], char *ppsz_env[])
40 /* Activate malloc checking routines to detect heap corruptions. */
41 putenv( "MALLOC_CHECK_=2" );
43 /* Disable the ugly Gnome crash dialog so that we properly segfault */
44 putenv( "GNOME_DISABLE_CRASH_DIALOG=1" );
48 /* Create the vlc structure */
50 if( err != VLC_SUCCESS )
56 err = vlc_init( i_argc, ppsz_argv );
57 if( err != VLC_SUCCESS )
63 /* Run vlc, in non-blocking mode */
66 /* Add background interfaces */
67 //{ int i; for( i=10; i--; ) vlc_add_intf( NULL, "dummy", 0 ); }
68 //vlc_add_intf( NULL, "dummy", VLC_FALSE );
69 //vlc_add_intf( NULL, "logger", VLC_FALSE );
70 //vlc_add_intf( NULL, "xosd", VLC_FALSE );
71 //vlc_add_intf( NULL, "gtk", VLC_FALSE );
72 //vlc_add_intf( NULL, "kde", VLC_FALSE );
73 vlc_add_intf( "rc", VLC_FALSE );
75 /* Add a blocking interface and keep the return value */
76 err = vlc_add_intf( NULL, VLC_TRUE );
78 /* Finish the interface */
81 /* Finish all threads */
84 /* Destroy the vlc structure */