X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_factory.c;h=9795770ba430f94ac293b4e3b6689bf37087d687;hb=1a50e779cfd5e1bc6a80054f6f56e64280c2dc41;hp=5d7187b3b2e61e4f99fe3a07f0baa66c6ce6f3e9;hpb=4ed2712bbdac2182c7c0d6477ac77c9f92aaf02a;p=melted diff --git a/src/framework/mlt_factory.c b/src/framework/mlt_factory.c index 5d7187b..9795770 100644 --- a/src/framework/mlt_factory.c +++ b/src/framework/mlt_factory.c @@ -24,10 +24,12 @@ #include "mlt_properties.h" #include +#include /** Singleton repositories */ +static char *mlt_prefix = NULL; static mlt_properties object_list = NULL; static mlt_repository producers = NULL; static mlt_repository filters = NULL; @@ -43,6 +45,9 @@ int mlt_factory_init( char *prefix ) if ( prefix == NULL ) prefix = PREFIX_DATA; + // Store the prefix for later retrieval + mlt_prefix = strdup( prefix ); + // Create the object list. object_list = calloc( sizeof( struct mlt_properties_s ), 1 ); mlt_properties_init( object_list, NULL ); @@ -56,6 +61,14 @@ int mlt_factory_init( char *prefix ) return 0; } +/** Fetch the prefix used in this instance. +*/ + +const char *mlt_factory_prefix( ) +{ + return mlt_prefix; +} + /** Fetch a producer from the repository. */ @@ -98,6 +111,7 @@ void mlt_factory_close( ) mlt_repository_close( transitions ); mlt_repository_close( consumers ); mlt_properties_close( object_list ); + free( mlt_prefix ); free( object_list ); }