X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Ffrei0r%2Ffactory.c;h=132123f4a9e3fe16716071877db74faa571ade0b;hb=b9402bbbbcc5c6569d55700564275f59cd9e2242;hp=8d37cacac24bb599f059d777987f23a7d7593093;hpb=8eb9c37e92c6e8b874baa649f1a0933aabbfd093;p=melted diff --git a/src/modules/frei0r/factory.c b/src/modules/frei0r/factory.c index 8d37cac..132123f 100644 --- a/src/modules/frei0r/factory.c +++ b/src/modules/frei0r/factory.c @@ -28,6 +28,9 @@ #include #include #include +#include + +#define FREI0R_PLUGIN_PATH "/usr/lib/frei0r-1:/usr/local/lib/frei0r-1:/opt/local/lib/frei0r-1" extern mlt_filter filter_frei0r_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); extern mlt_frame filter_process( mlt_filter this, mlt_frame frame ); @@ -40,7 +43,7 @@ static mlt_properties fill_param_info ( mlt_service_type type, const char *servi char file[ PATH_MAX ]; char servicetype[ 1024 ]=""; struct stat stat_buff; - + switch ( type ) { case filter_type: strcpy ( servicetype , "filter" ); @@ -51,14 +54,14 @@ static mlt_properties fill_param_info ( mlt_service_type type, const char *servi 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"); @@ -90,13 +93,13 @@ static mlt_properties fill_param_info ( mlt_service_type type, const char *servi default: break; } - + mlt_properties parameter = mlt_properties_new ( ); mlt_properties_set_data ( metadata , "parameters" , parameter , 0 , ( mlt_destructor )mlt_properties_close, NULL ); mlt_properties tags = mlt_properties_new ( ); mlt_properties_set_data ( metadata , "tags" , tags , 0 , ( mlt_destructor )mlt_properties_close, NULL ); mlt_properties_set ( tags , "0" , "Video" ); - + for (j=0;jprocess = filter_process; - this->close = filter_close; + this->close = filter_close; f0r_init(); properties=MLT_FILTER_PROPERTIES ( this ); - + for (i=0;i