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

Remove CPU capability from modules

This is not needed anymore. Modules are not in the bank at all anymore
if they require an incompatible CPU feature.
parent ade985f6
......@@ -195,11 +195,6 @@ enum vlc_module_properties
if (vlc_plugin_set (p_module, NULL, VLC_SUBMODULE_CREATE, &p_submodule)) \
goto error;
#define add_requirement( cap ) \
if (vlc_module_set (p_module, VLC_MODULE_CPU_REQUIREMENT, \
(int)(CPU_CAPABILITY_##cap))) \
goto error;
#define add_shortcut( shortcut ) \
if (vlc_module_set (p_submodule, VLC_MODULE_SHORTCUT, \
(const char *)(shortcut))) \
......
......@@ -33,7 +33,6 @@ vlc_module_begin ()
set_description (N_("ARM NEON video chroma conversions"))
set_capability ("video filter2", 250)
set_callbacks (Open, NULL)
add_requirement (NEON)
vlc_module_end ()
void i420_yuyv_neon (uint8_t *out, const uint8_t **in,
......
......@@ -85,7 +85,7 @@ static int CacheSaveConfig ( module_t *, FILE * );
/* Sub-version number
* (only used to avoid breakage in dev version when cache structure changes) */
#define CACHE_SUBVERSION_NUM 6
#define CACHE_SUBVERSION_NUM 7
/* Format string for the cache filename */
#define CACHENAME_FORMAT \
......@@ -285,7 +285,6 @@ void CacheLoad( vlc_object_t *p_this, module_bank_t *p_bank, bool b_delete )
}
LOAD_STRING( pp_cache[i]->p_module->psz_capability );
LOAD_IMMEDIATE( pp_cache[i]->p_module->i_score );
LOAD_IMMEDIATE( pp_cache[i]->p_module->i_cpu );
LOAD_IMMEDIATE( pp_cache[i]->p_module->b_unloadable );
LOAD_IMMEDIATE( pp_cache[i]->p_module->b_submodule );
......@@ -311,7 +310,6 @@ void CacheLoad( vlc_object_t *p_this, module_bank_t *p_bank, bool b_delete )
}
LOAD_STRING( p_module->psz_capability );
LOAD_IMMEDIATE( p_module->i_score );
LOAD_IMMEDIATE( p_module->i_cpu );
LOAD_IMMEDIATE( p_module->b_unloadable );
}
}
......@@ -563,7 +561,6 @@ void CacheSave( vlc_object_t *p_this, module_bank_t *p_bank )
}
SAVE_STRING( pp_cache[i]->p_module->psz_capability );
SAVE_IMMEDIATE( pp_cache[i]->p_module->i_score );
SAVE_IMMEDIATE( pp_cache[i]->p_module->i_cpu );
SAVE_IMMEDIATE( pp_cache[i]->p_module->b_unloadable );
SAVE_IMMEDIATE( pp_cache[i]->p_module->b_submodule );
......@@ -622,7 +619,6 @@ static int CacheSaveSubmodule( FILE *file, module_t *p_module )
SAVE_STRING( p_module->psz_capability );
SAVE_IMMEDIATE( p_module->i_score );
SAVE_IMMEDIATE( p_module->i_cpu );
SAVE_IMMEDIATE( p_module->b_unloadable );
return 0;
......
......@@ -65,7 +65,6 @@ module_t *vlc_module_create (vlc_object_t *obj)
module->pp_shortcuts[i] = NULL;
module->psz_capability = (char*)"";
module->i_score = 1;
module->i_cpu = 0;
module->b_unloadable = true;
module->b_submodule = false;
module->pf_activate = NULL;
......@@ -116,7 +115,6 @@ module_t *vlc_submodule_create (module_t *module)
submodule->psz_longname = module->psz_longname;
submodule->psz_capability = module->psz_capability;
submodule->i_score = module->i_score;
submodule->i_cpu = module->i_cpu;
submodule->b_submodule = true;
return submodule;
}
......@@ -178,11 +176,6 @@ int vlc_plugin_set (module_t *module, module_config_t *item, int propid, ...)
break;
}
case VLC_MODULE_CPU_REQUIREMENT:
assert (!module->b_submodule);
module->i_cpu |= va_arg (ap, int);
break;
case VLC_MODULE_SHORTCUT:
{
unsigned i;
......
......@@ -81,7 +81,6 @@
#include "vlc_charset.h"
#include "vlc_arrays.h"
#include <vlc_cpu.h>
#include "modules/modules.h"
......@@ -466,7 +465,6 @@ module_t * __module_need( vlc_object_t *p_this, const char *psz_capability,
size_t count;
module_t **p_all = module_list_get (&count);
p_list = malloc( count * sizeof( module_list_t ) );
unsigned i_cpu = vlc_CPU();
/* Parse the module list for capabilities and probe each of them */
count = 0;
......@@ -477,9 +475,6 @@ module_t * __module_need( vlc_object_t *p_this, const char *psz_capability,
/* Test that this module can do what we need */
if( !module_provides( p_module, psz_capability ) )
continue;
/* Test if we have the required CPU */
if( (p_module->i_cpu & i_cpu) != p_module->i_cpu )
continue;
/* If we required a shortcut, check this plugin provides it. */
if( i_shortcuts > 0 )
......
......@@ -116,7 +116,6 @@ struct module_t
char *psz_capability; /**< Capability */
int i_score; /**< Score for the capability */
uint32_t i_cpu; /**< Required CPU capabilities */
bool b_unloadable; /**< Can we be dlclosed? */
bool b_submodule; /**< Is this a submodule? */
......
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