X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_factory.c;h=0b4df21481c375f3b9a0bc640f339efaf3745362;hb=2af8bb9f6a61f6510aab8f45abf5f26e9e619c78;hp=cf568bf539986d0d799e6bad2dfcd9a678187df8;hpb=02e99cb00ed4a03a8f98c7f570cc9526478bfdc1;p=melted diff --git a/src/framework/mlt_factory.c b/src/framework/mlt_factory.c index cf568bf..0b4df21 100644 --- a/src/framework/mlt_factory.c +++ b/src/framework/mlt_factory.c @@ -30,6 +30,7 @@ */ static char *mlt_prefix = NULL; +static mlt_properties global_properties = NULL; static mlt_properties object_list = NULL; static mlt_repository producers = NULL; static mlt_repository filters = NULL; @@ -55,6 +56,10 @@ int mlt_factory_init( char *prefix ) // Initialise the pool mlt_pool_init( ); + // Create the global properties + global_properties = mlt_properties_new( ); + mlt_properties_set( global_properties, "MLT_NORMALISATION", getenv( "MLT_NORMALISATION" ) ); + // Create the object list. object_list = mlt_properties_new( ); @@ -76,6 +81,14 @@ const char *mlt_factory_prefix( ) return mlt_prefix; } +/** Get a value from the environment. +*/ + +char *mlt_environment( char *name ) +{ + return mlt_properties_get( global_properties, name ); +} + /** Fetch a producer from the repository. */ @@ -153,6 +166,7 @@ void mlt_factory_close( ) mlt_repository_close( transitions ); mlt_repository_close( consumers ); mlt_properties_close( object_list ); + mlt_properties_close( global_properties ); free( mlt_prefix ); mlt_prefix = NULL; mlt_pool_close( );