]> git.sesse.net Git - vlc/commitdiff
Same as previous commit
authorRémi Denis-Courmont <rem@videolan.org>
Sat, 19 May 2007 21:44:01 +0000 (21:44 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sat, 19 May 2007 21:44:01 +0000 (21:44 +0000)
modules/gui/macosx/voutqt.m
modules/gui/pda/pda.c
src/audio_output/output.c
src/modules/modules.c

index 4f737fc2933465684e4821f6044684f90e9c1e46..3a7e0ee69d434e21c4cb9fd7b30e799b02bea84c 100644 (file)
@@ -146,8 +146,8 @@ int E_(OpenVideoQT) ( vlc_object_t *p_this )
     else
         p_vout->p_sys->b_embedded = VLC_FALSE;
 
-    p_vout->p_sys->b_cpu_has_simd = (p_vout->p_libvlc_global->i_cpu & CPU_CAPABILITY_ALTIVEC)
-                                  | (p_vout->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMXEXT);
+    p_vout->p_sys->b_cpu_has_simd =
+        vlc_CPU() & (CPU_CAPABILITY_ALTIVEC|CPU_CAPABILITY_MMXEXT);
     msg_Dbg( p_vout, "we do%s have SIMD enabled CPU", p_vout->p_sys->b_cpu_has_simd ? "" : "n't" );
     
     /* Initialize QuickTime */
index d3a86cbee906bef74f2d497e939b9a237f89c834..e891a1ba6b5d6a2e118ffcd1a04a33983cc650e6 100644 (file)
@@ -326,7 +326,7 @@ static void Run( intf_thread_t *p_intf )
         /* Sleep to avoid using all CPU - since some interfaces need to
          * access keyboard events, a 100ms delay is a good compromise */
         gdk_threads_leave();
-        if (p_intf->p_libvlc_global->i_cpu & CPU_CAPABILITY_FPU)
+        if (vlc_CPU() & CPU_CAPABILITY_FPU)
             msleep( INTF_IDLE_SLEEP );
         else
             msleep( 1000 );
@@ -336,7 +336,7 @@ static void Run( intf_thread_t *p_intf )
     msg_Dbg( p_intf, "Manage GTK keyboard events using timeouts" );
     /* Sleep to avoid using all CPU - since some interfaces needs to access
      * keyboard events, a 1000ms delay is a good compromise */
-    if (p_intf->p_libvlc_global->i_cpu & CPU_CAPABILITY_FPU)
+    if (vlc_CPU() & CPU_CAPABILITY_FPU)
         i_dummy = gtk_timeout_add( INTF_IDLE_SLEEP / 1000, (GtkFunction)Manage, p_intf );
     else
         i_dummy = gtk_timeout_add( 1000, (GtkFunction)Manage, p_intf );
@@ -447,7 +447,7 @@ static int Manage( intf_thread_t *p_intf )
             i_time = var_GetTime( p_intf->p_sys->p_input, "time" );
             i_length = var_GetTime( p_intf->p_sys->p_input, "length" );
 
-            if (p_intf->p_libvlc_global->i_cpu & CPU_CAPABILITY_FPU)
+            if (vlc_CPU() & CPU_CAPABILITY_FPU)
             {
                 /* Manage the slider for CPU_CAPABILITY_FPU hardware */
                 if( p_intf->p_sys->b_playing )
index 4120e7861530e259f12135197c80d880f10ebc51..4b555645719ae348f3e235423c5b4a60b4c1a759 100644 (file)
@@ -175,7 +175,7 @@ int aout_OutputNew( aout_instance_t * p_aout,
     {
         /* Non-S/PDIF mixer only deals with float32 or fixed32. */
         p_aout->mixer.mixer.i_format
-                     = (p_aout->p_libvlc_global->i_cpu & CPU_CAPABILITY_FPU) ?
+                     = (vlc_CPU() & CPU_CAPABILITY_FPU) ?
                         VLC_FOURCC('f','l','3','2') :
                         VLC_FOURCC('f','i','3','2');
         aout_FormatPrepare( &p_aout->mixer.mixer );
index f10ed549137a0f99bb0f2f75f6f72d04a0f539e8..f80f09564cb23624dcb14de93367296f6889cf32 100644 (file)
@@ -76,6 +76,7 @@
 #endif
 
 #include "modules/configuration.h"
+#include "libvlc.h"
 
 #include "vlc_interface.h"
 #include "vlc_playlist.h"
@@ -481,6 +482,7 @@ module_t * __module_Need( vlc_object_t *p_this, const char *psz_capability,
     p_all = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE );
     p_list = malloc( p_all->i_count * sizeof( module_list_t ) );
     p_first = NULL;
+    unsigned i_cpu = vlc_CPU();
 
     /* Parse the module list for capabilities and probe each of them */
     for( i_which_module = 0; i_which_module < p_all->i_count; i_which_module++ )
@@ -498,7 +500,7 @@ module_t * __module_Need( vlc_object_t *p_this, const char *psz_capability,
         }
 
         /* Test if we have the required CPU */
-        if( (p_module->i_cpu & p_this->p_libvlc_global->i_cpu) != p_module->i_cpu )
+        if( (p_module->i_cpu & i_cpu) != p_module->i_cpu )
         {
             continue;
         }