if (!handle) return NULL;
void (*plginfo)(f0r_plugin_info_t*)=dlsym(handle,"f0r_get_plugin_info");
void (*param_info)(f0r_param_info_t*,int param_index)=dlsym(handle,"f0r_get_param_info");
+ void (*f0r_init)(void)=dlsym(handle,"f0r_init");
+ void (*f0r_deinit)(void)=dlsym(handle,"f0r_deinit");
if (!plginfo || !param_info) {
dlclose(handle);
return NULL;
char string[48];
int j=0;
+ f0r_init();
plginfo(&info);
snprintf ( string, sizeof(string) , "%d.%d" , info.major_version , info.minor_version );
mlt_properties_set ( metadata, "schema_version" , "0.1" );
mlt_properties_set ( pnum , "readonly" , "no" );
}
}
+ f0r_deinit();
dlclose(handle);
free(name);
mlt_tokeniser tokeniser = mlt_tokeniser_init ( );
int dircount=mlt_tokeniser_parse_new (
tokeniser ,
- getenv("MLT_FREI0R_PLUGIN_PATH") ? getenv("MLT_FREI0R_PLUGIN_PATH") : FREI0R_PLUGIN_PATH,
+ getenv("MLT_FREI0R_PLUGIN_PATH") ? getenv("MLT_FREI0R_PLUGIN_PATH") : FREI0R_PLUGIN_PATH,
":"
);
+ char temp[ 1024 ];
+ sprintf( temp, "%s/frei0r/blacklist.txt", mlt_environment( "MLT_DATA" ) );
+ mlt_properties blacklist = mlt_properties_load( temp );
while (dircount--){
char* dirname = mlt_tokeniser_get_string ( tokeniser , dircount ) ;
mlt_properties_dir_list(direntries, dirname ,"*.so",1);
- for (i=0;i<mlt_properties_count(direntries);i++){
+ for (i=0; i<mlt_properties_count(direntries);i++){
char* name=mlt_properties_get_value(direntries,i);
char* shortname=name+strlen(dirname)+1;
char fname[1024]="";
char* firstname = strtok_r ( shortname , "." , &save_firstptr );
strcat(pluginname,firstname);
+ if ( mlt_properties_get( blacklist, firstname ) )
+ continue;
+
void* handle=dlopen(strcat(name,".so"),RTLD_LAZY);
if (handle){
void (*plginfo)(f0r_plugin_info_t*)=dlsym(handle,"f0r_get_plugin_info");
mlt_properties_close(direntries);
}
mlt_tokeniser_close ( tokeniser );
+ mlt_properties_close( blacklist );
}