]> git.sesse.net Git - vlc/commitdiff
* FAQ: updated FAQ with config file issues.
authorGildas Bazin <gbazin@videolan.org>
Thu, 3 Oct 2002 17:01:59 +0000 (17:01 +0000)
committerGildas Bazin <gbazin@videolan.org>
Thu, 3 Oct 2002 17:01:59 +0000 (17:01 +0000)
* 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.

FAQ
configure.ac.in
include/interface.h
include/vlc_threads_funcs.h
modules/control/rc/rc.c
modules/misc/dummy/interface.c
modules/misc/logger/logger.c
src/misc/threads.c

diff --git a/FAQ b/FAQ
index dc3d5a7350c3003b50bb41cd878de701f9082740..746e27fbfbbd727ddb6bd1f1beed0d9100eed858 100644 (file)
--- 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
 
index 150c26a22bc8bc9aaffa1ced586d406ced07e2ab..da470c4a3c34d148cc0ff6fbf34fe52fcecc64e4 100644 (file)
@@ -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"
index 20d64ac960ef540fb5012c2b53aa966b7560ff00..64bfb909b9441e826a4b39e937eacbc0946b4406 100644 (file)
@@ -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 <seguin@via.ecp.fr>
  *
@@ -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
index 6bb523c2916b987a6f5f97ad00894e3a49f3c902..d9586bde593996fa41788524f8ad8cc27dbc2fe1 100644 (file)
@@ -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 <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@via.ecp.fr>
@@ -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
index 82f1f3596e78014e6e47ffe907a06505f00dd1eb..30bd4e17137cf22a5c2594cba219be28ddbceed9 100644 (file)
@@ -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 <shurdeek@panorama.sth.ac.at>
  *
@@ -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;
index d6c8848c7316bdb83752d06e5ef66043cb877b19..cf377945c69ab51a525f9779f95acbb661343f9d 100644 (file)
@@ -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 <sam@zoy.org>
  *
@@ -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;
 
index 1e30ceffc912e4b388c0814e24aec5aa32cdf582..8457516839cdb964f2a18aa89eb5f659308d2483 100644 (file)
@@ -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 <sam@zoy.org>
  *
@@ -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 ) );
index aba753da7a64062bee8faf2cef1ce708cd9913d7..3b4b5f5b1575e2f23adf5b5d8e38f8a5cc9a940c 100644 (file)
@@ -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 <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -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 */