Commit 85faf5c5 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Same as previous commit

parent 7b0773e6
......@@ -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 */
......
......@@ -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 )
......
......@@ -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 );
......
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment