From: blendamedt Date: Thu, 30 Oct 2008 21:43:10 +0000 (+0000) Subject: frei0r/factory.c: yml files can be used now for critical plugins X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=8146191b1bac94ea07ce11fc5d3810a3e0592812;p=melted frei0r/factory.c: yml files can be used now for critical plugins git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1215 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/src/modules/frei0r/factory.c b/src/modules/frei0r/factory.c index 6c14611..568ffb1 100644 --- a/src/modules/frei0r/factory.c +++ b/src/modules/frei0r/factory.c @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -36,6 +37,28 @@ extern mlt_frame transition_process( mlt_transition transition, mlt_frame a_fram static mlt_properties fill_param_info ( mlt_service_type type, const char *service_name, char *name ) { + char file[ PATH_MAX ]; + char servicetype[ 1024 ]=""; + struct stat stat_buff; + + switch ( type ) { + case filter_type: + strcpy ( servicetype , "filter" ); + break; + case transition_type: + strcpy ( servicetype , "transition" ) ; + break; + default: + strcpy ( servicetype , "" ); + }; + + snprintf( file, PATH_MAX, "%s/frei0r/%s_%s.yml", mlt_environment( "MLT_DATA" ), servicetype, service_name ); + stat(file,&stat_buff); + + if (S_ISREG(stat_buff.st_mode)){ + return mlt_properties_parse_yaml( file ); + } + void* handle=dlopen(name,RTLD_LAZY); if (!handle) return NULL; void (*plginfo)(f0r_plugin_info_t*)=dlsym(handle,"f0r_get_plugin_info");