X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_properties.c;h=01c4ba2d9a736a1ed04565d238abe14281ec0b27;hb=52fa2474c1a2472022dd12ccea5c794f66532012;hp=189f8affac439b041b8961c9bf1b25a34ec274e2;hpb=52c1bb26fcbb895824cd9237c228ea4834ce1433;p=melted diff --git a/src/framework/mlt_properties.c b/src/framework/mlt_properties.c index 189f8af..01c4ba2 100644 --- a/src/framework/mlt_properties.c +++ b/src/framework/mlt_properties.c @@ -116,6 +116,7 @@ mlt_properties mlt_properties_load( char *filename ) { // Temp string char temp[ 1024 ]; + char last[ 1024 ] = ""; // Read each string from the file while( fgets( temp, 1024, file ) ) @@ -123,6 +124,19 @@ mlt_properties mlt_properties_load( char *filename ) // Chomp the string temp[ strlen( temp ) - 1 ] = '\0'; + // Check if the line starts with a . + if ( temp[ 0 ] == '.' ) + { + char temp2[ 1024 ]; + sprintf( temp2, "%s%s", last, temp ); + strcpy( temp, temp2 ); + } + else if ( strchr( temp, '=' ) ) + { + strcpy( last, temp ); + *( strchr( last, '=' ) ) = '\0'; + } + // Parse and set the property if ( strcmp( temp, "" ) && temp[ 0 ] != '#' ) mlt_properties_parse( this, temp ); @@ -373,6 +387,8 @@ int mlt_properties_set( mlt_properties this, char *name, char *value ) mlt_properties_do_mirror( this, name ); } + mlt_events_fire( this, "property-changed", name, NULL ); + return error; } @@ -500,6 +516,8 @@ int mlt_properties_set_int( mlt_properties this, char *name, int value ) mlt_properties_do_mirror( this, name ); } + mlt_events_fire( this, "property-changed", name, NULL ); + return error; } @@ -529,6 +547,8 @@ int mlt_properties_set_double( mlt_properties this, char *name, double value ) mlt_properties_do_mirror( this, name ); } + mlt_events_fire( this, "property-changed", name, NULL ); + return error; } @@ -558,6 +578,8 @@ int mlt_properties_set_position( mlt_properties this, char *name, mlt_position v mlt_properties_do_mirror( this, name ); } + mlt_events_fire( this, "property-changed", name, NULL ); + return error; } @@ -584,6 +606,8 @@ int mlt_properties_set_data( mlt_properties this, char *name, void *value, int l if ( property != NULL ) error = mlt_property_set_data( property, value, length, destroy, serialise ); + mlt_events_fire( this, "property-changed", name, NULL ); + return error; } @@ -638,6 +662,8 @@ void mlt_properties_debug( mlt_properties this, char *title, FILE *output ) for ( i = 0; i < list->count; i ++ ) if ( mlt_properties_get( this, list->name[ i ] ) != NULL ) fprintf( output, ", %s=%s", list->name[ i ], mlt_properties_get( this, list->name[ i ] ) ); + else + fprintf( output, ", %s=%p", list->name[ i ], mlt_properties_get_data( this, list->name[ i ], NULL ) ); fprintf( output, " ]" ); } fprintf( stderr, "\n" );