// Only initialise once
if ( mlt_prefix == NULL )
{
+ // Allow user over rides
+ if ( prefix == NULL )
+ prefix = getenv( "MLT_REPOSITORY" );
+
// If no directory is specified, default to install directory
if ( prefix == NULL )
prefix = PREFIX_DATA;
// Create the global properties
global_properties = mlt_properties_new( );
- mlt_properties_set( global_properties, "MLT_NORMALISATION", getenv( "MLT_NORMALISATION" ) );
+ mlt_properties_set_or_default( global_properties, "MLT_NORMALISATION", getenv( "MLT_NORMALISATION" ), "PAL" );
+ 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" );
// Create the object list.
object_list = mlt_properties_new( );
mlt_producer mlt_factory_producer( char *service, void *input )
{
- mlt_producer obj = mlt_repository_fetch( producers, service, input );
+ mlt_producer obj = NULL;
+
+ // Pick up the default normalising producer if necessary
+ if ( service == NULL )
+ service = mlt_environment( "MLT_PRODUCER" );
+
+ // Try to instantiate via the specified service
+ obj = mlt_repository_fetch( producers, service, input );
+
if ( obj != NULL )
{
mlt_properties properties = mlt_producer_properties( obj );
mlt_consumer mlt_factory_consumer( char *service, void *input )
{
- mlt_consumer obj = mlt_repository_fetch( consumers, service, input );
+ mlt_consumer obj = NULL;
+
+ if ( service == NULL )
+ service = mlt_environment( "MLT_CONSUMER" );
+
+ obj = mlt_repository_fetch( consumers, service, input );
+
if ( obj != NULL )
{
mlt_properties properties = mlt_consumer_properties( obj );