From: Gildas Bazin Date: Thu, 3 Oct 2002 17:01:59 +0000 (+0000) Subject: * FAQ: updated FAQ with config file issues. X-Git-Tag: 0.5.0~909 X-Git-Url: http://git.videolan.org/gitweb.cgi/vlc.git/?p=vlc.git;p=vlc.git;a=commitdiff_plain;h=6dafa419846a89a815750f3de722d8d675699658 * FAQ: updated FAQ with config file issues. * configure.ac.in: use -mms-bitfields instead of -fnative-struct for mingw32 gcc-3.x. * include/interface.h, modules/misc/dummy/interface.c, modules/misc/logger/logger.c, modules/control/rc/rc.c: Display message on Win32 explaining how to get back to the GUI mode. * src/misc/threads.c, include/vlc_threads_funcs.h: ignore the win9x-cv-method config option on WinNT when fast-mutex is not enabled. --- diff --git a/FAQ b/FAQ index dc3d5a7350..746e27fbfb 100644 --- a/FAQ +++ b/FAQ @@ -1,5 +1,5 @@ Frequentely Asked Questions for VideoLAN Client -$Id: FAQ,v 1.10 2002/07/25 22:34:37 lool Exp $ +$Id: FAQ,v 1.11 2002/10/03 17:01:59 gbazin Exp $ 1. Using VLC @@ -74,6 +74,33 @@ For binary packages, remove old packages first and install the new ones deb ftp://ftp.videolan.org/pub/videolan/ debian/ deb-src ftp://ftp.videolan.org/pub/videolan/ debian/ +1.10 How can I save my VLC configuration ? +---------------------------------------- +Currently, the only way to save the configuration options in VLC is through +the preferences menu in one of the graphical user interface plugins. + +1.11 Where does VLC store it's config file ? +------------------------------------------ +Currently, a config file is created on a per user basis (there is no global +configuration file). If you modify the available options in VLC and save the +new configuration, then a configuration file will be created in your user +directory. The precise location of this file depends on the Operating System +you are running: + +- Unices (linux, etc...): "~/.videolan/vlcrc" +- Windows: "Application Data\videolan\vlcrc" + +1.12 I don't have access to the GUI anymore +------------------------------------------- +If you change the default interface module in the preferences menu to a non +GUI module (ie. to a command line interface) and then save the configuration, +the only way to get VLC to show a GUI again is to run it directly from the +command line. +For instance on Windows, you need to open a dos command box, go to the +directory where you installed VLC (usually +c:\Program Files\VideoLAN\VideoLAN Client) and then type "vlc --intf win32" +You will then be able to modify the configuration again and save it. + 2. Troubleshooting diff --git a/configure.ac.in b/configure.ac.in index 150c26a22b..da470c4a3c 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -98,7 +98,6 @@ case "x${target_os}" in x*mingw32*) SYS=mingw32 AC_CHECK_TOOL(WINDRES, windres, :) - CFLAGS_save="${CFLAGS_save} -fnative-struct"; CFLAGS="${CFLAGS_save}" CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"; CPPFLAGS="${CPPFLAGS_save}" LDFLAGS_vlc="${LDFLAGS_vlc} -lws2_32 -lnetapi32 -mwindows -Xlinker --force-exe-suffix" LDFLAGS_ipv4="${LDFLAGS_ipv4} -lws2_32" @@ -144,15 +143,31 @@ AM_CONDITIONAL(HAVE_WIN32, test "x${SYS}" = "xmingw32") AC_MSG_CHECKING(for suffix of libraries) AC_MSG_RESULT(${LIBEXT}) +dnl Check for fnative-struct or mms-bitfields support for mingw32 +if test x$SYS = xmingw32 +then + AC_CACHE_CHECK([if \$CC accepts -mms-bitfields], + [ac_cv_c_mms_bitfields], + [CFLAGS="${CFLAGS_save} -mms-bitfields" + AC_TRY_COMPILE([],,ac_cv_c_mms_bitfields=yes, ac_cv_c_mms_bitfields=no)]) + if test x"$ac_cv_c_mms_bitfields" != x"no"; then + CFLAGS_mingw32_special="-mms-bitfields" + else + CFLAGS_mingw32_special="-fnative-struct" + fi + + CFLAGS_save="${CFLAGS_save} ${CFLAGS_mingw32_special}"; CFLAGS="${CFLAGS_save}" +fi + dnl Flags for plugin compilation case "x${SYS}" in xmingw32|xcygwin) - CFLAGS_pics="${CFLAGS_pics} -fnative-struct" - CXXFLAGS_pics="${CXXFLAGS_pics} -fnative-struct" - OBJCFLAGS_pics="${OBJCFLAGS_pics} -fnative-struct" - CFLAGS_plugins="${CFLAGS_plugins} -fnative-struct" - CXXFLAGS_plugins="${CXXFLAGS_plugins} -fnative-struct" - OBJCFLAGS_plugins="${OBJCFLAGS_plugins} -fnative-struct" + CFLAGS_pics="${CFLAGS_pics} ${CFLAGS_mingw32_special}" + CXXFLAGS_pics="${CXXFLAGS_pics} ${CFLAGS_mingw32_special}" + OBJCFLAGS_pics="${OBJCFLAGS_pics} ${CFLAGS_mingw32_special}" + CFLAGS_plugins="${CFLAGS_plugins} ${CFLAGS_mingw32_special}" + CXXFLAGS_plugins="${CXXFLAGS_plugins} ${CFLAGS_mingw32_special}" + OBJCFLAGS_plugins="${OBJCFLAGS_plugins} ${CFLAGS_mingw32_special}" ;; x*) CFLAGS_pics="${CFLAGS_pics} -fPIC" diff --git a/include/interface.h b/include/interface.h index 20d64ac960..64bfb909b9 100644 --- a/include/interface.h +++ b/include/interface.h @@ -4,7 +4,7 @@ * interface, such as message output. ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: interface.h,v 1.33 2002/07/31 20:56:50 sam Exp $ + * $Id: interface.h,v 1.34 2002/10/03 17:01:59 gbazin Exp $ * * Authors: Vincent Seguin * @@ -26,7 +26,7 @@ /***************************************************************************** * intf_thread_t: describe an interface thread ***************************************************************************** - * This structe describes all interface-specific data of the main (interface) + * This struct describes all interface-specific data of the main (interface) * thread. *****************************************************************************/ struct intf_thread_t @@ -59,3 +59,20 @@ VLC_EXPORT( vlc_error_t, intf_RunThread, ( intf_thread_t * ) ); VLC_EXPORT( void, intf_StopThread, ( intf_thread_t * ) ); VLC_EXPORT( void, intf_Destroy, ( intf_thread_t * ) ); +/***************************************************************************** + * Macros + *****************************************************************************/ +#ifdef WIN32 +# define CONSOLE_INTRO_MSG \ + AllocConsole(); \ + freopen( "CONOUT$", "w", stdout ); \ + freopen( "CONOUT$", "w", stderr ); \ + freopen( "CONIN$", "r", stdin ); \ + intf_Msg( VERSION_MESSAGE ); \ + intf_Msg( _("\nWarning: if you can't access the GUI anymore, "\ + "open a dos command box, go to the directory " \ + "where you installed VLC and run " \ + "\"vlc -I win32\"\n") ) +#else +# define CONSOLE_INTRO_MSG +#endif diff --git a/include/vlc_threads_funcs.h b/include/vlc_threads_funcs.h index 6bb523c291..d9586bde59 100644 --- a/include/vlc_threads_funcs.h +++ b/include/vlc_threads_funcs.h @@ -3,7 +3,7 @@ * This header provides a portable threads implementation. ***************************************************************************** * Copyright (C) 1999, 2002 VideoLAN - * $Id: vlc_threads_funcs.h,v 1.3 2002/08/30 19:16:05 sam Exp $ + * $Id: vlc_threads_funcs.h,v 1.4 2002/10/03 17:01:59 gbazin Exp $ * * Authors: Jean-Marc Dressler * Samuel Hocevar @@ -491,7 +491,7 @@ static inline int __vlc_cond_wait( char * psz_file, int i_line, /* Increase our wait count */ p_condvar->i_waiting_threads++; - if( p_condvar->SignalObjectAndWait && p_mutex->mutex ) + if( p_mutex->mutex ) { /* It is only possible to atomically release the mutex and * initiate the waiting on WinNT/2K/XP. Win9x doesn't have diff --git a/modules/control/rc/rc.c b/modules/control/rc/rc.c index 82f1f3596e..30bd4e1713 100644 --- a/modules/control/rc/rc.c +++ b/modules/control/rc/rc.c @@ -2,7 +2,7 @@ * rc.c : remote control stdin/stdout plugin for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: rc.c,v 1.6 2002/10/03 13:21:55 sam Exp $ + * $Id: rc.c,v 1.7 2002/10/03 17:01:59 gbazin Exp $ * * Authors: Peter Surda * @@ -96,13 +96,7 @@ static int Activate( vlc_object_t *p_this ) p_intf->pf_run = Run; -#ifdef WIN32 - AllocConsole(); - freopen( "CONOUT$", "w", stdout ); - freopen( "CONOUT$", "w", stderr ); - freopen( "CONIN$", "r", stdin ); - printf( VERSION_MESSAGE "\n" ); -#endif + CONSOLE_INTRO_MSG; printf( "remote control interface initialized, `h' for help\n" ); return 0; diff --git a/modules/misc/dummy/interface.c b/modules/misc/dummy/interface.c index d6c8848c73..cf377945c6 100644 --- a/modules/misc/dummy/interface.c +++ b/modules/misc/dummy/interface.c @@ -2,7 +2,7 @@ * intf_dummy.c: dummy interface plugin ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: interface.c,v 1.1 2002/08/04 17:23:43 sam Exp $ + * $Id: interface.c,v 1.2 2002/10/03 17:01:58 gbazin Exp $ * * Authors: Samuel Hocevar * @@ -41,14 +41,9 @@ static void Run ( intf_thread_t * ); int E_(OpenIntf) ( vlc_object_t *p_this ) { intf_thread_t *p_intf = (intf_thread_t*) p_this; -#ifdef WIN32 - AllocConsole(); - freopen( "CONOUT$", "w", stdout ); - freopen( "CONOUT$", "w", stderr ); - freopen( "CONIN$", "r", stdin ); - msg_Info( p_intf, VERSION_MESSAGE ); - msg_Info( p_intf, _("\nUsing the dummy interface plugin...") ); -#endif + + CONSOLE_INTRO_MSG; + msg_Info( p_intf, _("Using the dummy interface plugin...") ); p_intf->pf_run = Run; diff --git a/modules/misc/logger/logger.c b/modules/misc/logger/logger.c index 1e30ceffc9..8457516839 100644 --- a/modules/misc/logger/logger.c +++ b/modules/misc/logger/logger.c @@ -2,7 +2,7 @@ * logger.c : file logging plugin for vlc ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: logger.c,v 1.2 2002/08/24 17:04:36 gbazin Exp $ + * $Id: logger.c,v 1.3 2002/10/03 17:01:58 gbazin Exp $ * * Authors: Samuel Hocevar * @@ -98,14 +98,8 @@ static int Open( vlc_object_t *p_this ) intf_thread_t *p_intf = (intf_thread_t *)p_this; char *psz_mode, *psz_file; -#ifdef WIN32 - AllocConsole(); - freopen( "CONOUT$", "w", stdout ); - freopen( "CONOUT$", "w", stderr ); - freopen( "CONIN$", "r", stdin ); - msg_Info( p_intf, VERSION_MESSAGE ); - msg_Info( p_intf, _("\nUsing the logger interface plugin...") ); -#endif + CONSOLE_INTRO_MSG; + msg_Info( p_intf, _("Using the logger interface plugin...") ); /* Allocate instance and initialize some members */ p_intf->p_sys = (intf_sys_t *)malloc( sizeof( intf_sys_t ) ); diff --git a/src/misc/threads.c b/src/misc/threads.c index aba753da7a..3b4b5f5b15 100644 --- a/src/misc/threads.c +++ b/src/misc/threads.c @@ -2,7 +2,7 @@ * threads.c : threads implementation for the VideoLAN client ***************************************************************************** * Copyright (C) 1999, 2000, 2001, 2002 VideoLAN - * $Id: threads.c,v 1.18 2002/10/03 13:21:55 sam Exp $ + * $Id: threads.c,v 1.19 2002/10/03 17:01:58 gbazin Exp $ * * Authors: Jean-Marc Dressler * Samuel Hocevar @@ -381,7 +381,8 @@ int __vlc_cond_init( vlc_object_t *p_this, vlc_cond_t *p_condvar ) p_condvar->i_win9x_cv = p_this->p_vlc->i_win9x_cv; p_condvar->SignalObjectAndWait = p_this->p_vlc->SignalObjectAndWait; - if( p_this->p_vlc->i_win9x_cv == 0 ) + if( (p_condvar->SignalObjectAndWait && !p_this->p_vlc->b_fast_mutex) + || p_condvar->i_win9x_cv == 0 ) { /* Create an auto-reset event. */ p_condvar->event = CreateEvent( NULL, /* no security */