X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_factory.c;h=3d7759c5c22deccaeeeb576f54e1d332d50326d8;hb=f7e7842cf52946218db15c6a45958644a96248d6;hp=b624113350f0ba641a6468d710e32a8a6ea26b8a;hpb=1804df8f27dd733057de14a186070b6714185430;p=melted diff --git a/src/framework/mlt_factory.c b/src/framework/mlt_factory.c index b624113..3d7759c 100644 --- a/src/framework/mlt_factory.c +++ b/src/framework/mlt_factory.c @@ -111,8 +111,20 @@ int mlt_factory_init( const char *prefix ) mlt_properties_set_or_default( global_properties, "MLT_PRODUCER", getenv( "MLT_PRODUCER" ), "fezzik" ); mlt_properties_set_or_default( global_properties, "MLT_CONSUMER", getenv( "MLT_CONSUMER" ), "sdl" ); mlt_properties_set( global_properties, "MLT_TEST_CARD", getenv( "MLT_TEST_CARD" ) ); + mlt_properties_set_or_default( global_properties, "MLT_PROFILE", getenv( "MLT_PROFILE" ), "dv_pal" ); + + // Load the most appropriate profile + // MLT_PROFILE preferred + if ( getenv( "MLT_PROFILE" ) ) + mlt_profile_select( mlt_environment( "MLT_PROFILE" ) ); + // MLT_NORMALISATION backwards compatibility + else if ( strcmp( mlt_environment( "MLT_NORMALISATION" ), "PAL" ) ) + mlt_profile_select( "dv_ntsc" ); + else + mlt_profile_select( "dv_pal" ); } + return 0; } @@ -140,6 +152,14 @@ char *mlt_environment( const char *name ) return mlt_properties_get( global_properties, name ); } +/** Set a value in the environment. +*/ + +int mlt_environment_set( const char *name, const char *value ) +{ + return mlt_properties_set( global_properties, name, value ); +} + /** Fetch a producer from the repository. */ @@ -279,6 +299,6 @@ void mlt_factory_close( ) free( mlt_prefix ); mlt_prefix = NULL; mlt_pool_close( ); + mlt_profile_close(); } } -