]> git.sesse.net Git - vlc/commitdiff
- bye, bye "fast-mutex" and "win9x-cv-method" variables
authorDamien Fouilleul <damienf@videolan.org>
Mon, 21 May 2007 16:41:45 +0000 (16:41 +0000)
committerDamien Fouilleul <damienf@videolan.org>
Mon, 21 May 2007 16:41:45 +0000 (16:41 +0000)
activex/plugin.cpp
mozilla/vlcplugin.cpp
src/misc/threads.c

index 4dceeeaa8f1a6f627fa886c48bbfc17e7c6fe648..5196a262ed76a44c3ed821a98eac3900160efd00 100644 (file)
@@ -483,20 +483,6 @@ HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
         if( _b_autoloop )
             ppsz_argv[ppsz_argc++] = "--loop";
 
-        if( IsDebuggerPresent() )
-        {
-            /*
-            ** VLC default threading mechanism is designed to be as compatible
-            ** with POSIX as possible. However when debugged on win32, threads
-            ** lose signals and eventually VLC get stuck during initialization.
-            ** threading support can be configured to be more debugging friendly
-            ** but it will be less compatible with POSIX.
-            ** This is done by initializing with the following options:
-            */
-            ppsz_argv[ppsz_argc++] = "--fast-mutex";
-            ppsz_argv[ppsz_argc++] = "--win9x-cv-method=1";
-        }
-
         _p_libvlc = libvlc_new(ppsz_argc, ppsz_argv, NULL);
         if( NULL == _p_libvlc )
         {
index a9e1781d2ddb928c12036ed85605133ca4559058..05e18f9fa69b396ba52beacbce9f55cb1cb5e79a 100644 (file)
@@ -98,20 +98,6 @@ NPError VlcPlugin::init(int argc, char* const argn[], char* const argv[])
          RegCloseKey( h_key );
     }
     ppsz_argv[ppsz_argc++] = "--no-one-instance";
-    if( IsDebuggerPresent() )
-    {
-        /*
-        ** VLC default threading mechanism is designed to be as compatible
-        ** with POSIX as possible. However when debugged on win32, threads
-        ** lose signals and eventually VLC get stuck during initialization.
-        ** threading support can be configured to be more debugging friendly
-        ** but it will be less compatible with POSIX.
-        ** This is done by initializing with the following options:
-        */
-        ppsz_argv[ppsz_argc++] = "--fast-mutex";
-        ppsz_argv[ppsz_argc++] = "--win9x-cv-method=1";
-    }
-
 
 #if 0
     ppsz_argv[0] = "C:\\Cygwin\\home\\damienf\\vlc-trunk\\vlc";
index 4d67bdb08f7a9591ff4db8814a42c4babea43a31..52ac826bcb9b69e7b41323fafb27e972eb4c635e 100644 (file)
@@ -74,8 +74,17 @@ int __vlc_threads_init( vlc_object_t *p_this )
 #elif defined( ST_INIT_IN_ST_H )
 #elif defined( UNDER_CE )
 #elif defined( WIN32 )
-    b_fast_mutex = config_GetInt( p_this, "fast-mutex" );
-    i_win9x_cv = config_GetInt( p_this, "win9x-cv-method" );
+    if( IsDebuggerPresent() )
+    {
+        /* SignalObjectAndWait() API is problematic under a debugger */
+        b_fast_mutex = VLC_TRUE;
+        i_win9x_cv = 0;
+    }
+    else
+    {
+        b_fast_mutex = VLC_FALSE;
+        i_win9x_cv = 1;
+    }
 #elif defined( HAVE_KERNEL_SCHEDULER_H )
 #elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
     pthread_mutex_lock( &once_mutex );
@@ -508,7 +517,7 @@ int __vlc_cond_destroy( const char * psz_file, int i_line, vlc_cond_t *p_condvar
  *****************************************************************************/
 int __vlc_threadvar_create( vlc_object_t *p_this, vlc_threadvar_t *p_tls )
 {
-    int i_ret;
+    int i_ret = -1;
     (void)p_this;
 #if defined( PTH_INIT_IN_PTH_H )
     i_ret = pth_key_create( &p_tls->handle, NULL );