1 /*****************************************************************************
2 * vlc.c: the vlc player
3 *****************************************************************************
4 * Copyright (C) 1998-2001 VideoLAN
5 * $Id: vlc.c,v 1.4 2002/07/11 18:44:12 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[])
41 /* Activate malloc checking routines to detect heap corruptions. */
42 putenv( "MALLOC_CHECK_=2" );
44 /* Disable the ugly Gnome crash dialog so that we properly segfault */
45 putenv( "GNOME_DISABLE_CRASH_DIALOG=1" );
49 /* Create the vlc structure */
57 err = vlc_init( p_vlc, i_argc, ppsz_argv );
58 if( err != VLC_SUCCESS )
64 //vlc_add( p_vlc, "/home/sam/videolan/streams/mpeg/axe.mpeg" );
66 /* Run vlc, in non-blocking mode */
67 err = vlc_run( p_vlc );
69 /* Add background interfaces */
70 //{ int i; for( i=10; i--; ) vlc_add_intf( p_vlc, "dummy", 0 ); }
71 //vlc_add_intf( p_vlc, "dummy", VLC_FALSE );
72 //vlc_add_intf( p_vlc, "logger", VLC_FALSE );
73 //vlc_add_intf( p_vlc, "xosd", VLC_FALSE );
74 //vlc_add_intf( p_vlc, "gtk", VLC_FALSE );
75 //vlc_add_intf( p_vlc, "kde", VLC_FALSE );
76 vlc_add_intf( p_vlc, "rc", VLC_FALSE );
78 /* Add a blocking interface */
79 err = vlc_add_intf( p_vlc, NULL, VLC_TRUE );
80 if( err != VLC_SUCCESS )
87 /* Finish the interface */
90 /* Finish all threads */
93 /* Destroy the vlc structure */