+ if ( global_properties )
+ return mlt_properties_get( global_properties, name );
+ else
+ return NULL;
+}
+
+/** Set a value in the environment.
+*/
+
+int mlt_environment_set( const char *name, const char *value )
+{
+ if ( global_properties )
+ return mlt_properties_set( global_properties, name, value );
+ else
+ return -1;
+}
+
+static void set_common_properties( mlt_properties properties, mlt_profile profile, const char *type, const char *service )
+{
+ mlt_properties_set_int( properties, "_unique_id", ++ unique_id );
+ mlt_properties_set( properties, "mlt_type", type );
+ if ( mlt_properties_get_int( properties, "_mlt_service_hidden" ) == 0 )
+ mlt_properties_set( properties, "mlt_service", service );
+ if ( profile != NULL )
+ mlt_properties_set_data( properties, "_profile", profile, 0, NULL, NULL );