#ifdef WIN32
#define LIBSUF ".dll"
-#define FREI0R_PLUGIN_PATH "lib\\frei0r-1"
+#define FREI0R_PLUGIN_PATH "\\..\\..\\lib\\frei0r-1"
#else
#define LIBSUF ".so"
#define FREI0R_PLUGIN_PATH "lib/frei0r-1:/usr/lib/frei0r-1:/usr/lib64/frei0r-1:/opt/local/lib/frei0r-1:/usr/local/lib/frei0r-1:$HOME/.frei0r-1/lib"
extern void transition_close( mlt_transition this );
extern mlt_frame transition_process( mlt_transition transition, mlt_frame a_frame, mlt_frame b_frame );
+static char* get_frei0r_path()
+{
+#ifdef WIN32
+ char *dirname = malloc( strlen( mlt_environment( "MLT_DATA" ) ) + strlen( FREI0R_PLUGIN_PATH ) + 1 );
+ strcpy( dirname, mlt_environment( "MLT_DATA" ) );
+ strcat( dirname, FREI0R_PLUGIN_PATH );
+ return dirname;
+#else
+ return strdup( GET_FREI0R_PATH );
+#endif
+}
+
static void check_thread_safe( mlt_properties properties, const char *name )
{
char dirname[PATH_MAX];
static void * create_frei0r_item ( mlt_profile profile, mlt_service_type type, const char *id, void *arg){
mlt_tokeniser tokeniser = mlt_tokeniser_init ( );
+ char *frei0r_path = get_frei0r_path();
int dircount=mlt_tokeniser_parse_new (
tokeniser,
- GET_FREI0R_PATH,
+ frei0r_path,
":"
);
void* ret=NULL;
free( myid );
}
mlt_tokeniser_close ( tokeniser );
+ free( frei0r_path );
return ret;
}
{
int i=0;
mlt_tokeniser tokeniser = mlt_tokeniser_init ( );
+ char *frei0r_path = get_frei0r_path();
int dircount=mlt_tokeniser_parse_new (
tokeniser ,
- GET_FREI0R_PATH,
+ frei0r_path,
":"
);
char dirname[PATH_MAX];
}
mlt_tokeniser_close ( tokeniser );
mlt_properties_close( blacklist );
+ free( frei0r_path );
}
ladspa_path = g_strdup (getenv ("LADSPA_PATH"));
if (!ladspa_path)
#ifdef WIN32
- ladspa_path = g_strdup ("lib\\ladspa");
+ {
+ ladspa_path = malloc (strlen (mlt_environment("MLT_DATA")) + strlen ("\\..\\..\\lib\\ladspa") + 1);
+ strcpy (ladspa_path, mlt_environment("MLT_DATA"));
+ strcat (ladspa_path, "\\..\\..\\lib\\ladspa");
+ printf("LADSPA_PATH=%s\n", ladspa_path);
+ }
#else
ladspa_path = g_strdup ("lib/ladspa:/usr/local/lib/ladspa:/usr/lib/ladspa:/usr/lib64/ladspa");
#endif