X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_properties.c;h=e84ee0725bf8adcb261237b23b16772a01eaff40;hb=2e467c2eeba2b51aecddda21d4bb97bef4cd1459;hp=1d13714634b051a3e815981dd76650378de08452;hpb=7ed168fe4e839d9cfa97b844f45cfb4ee2f63f71;p=melted diff --git a/src/framework/mlt_properties.c b/src/framework/mlt_properties.c index 1d13714..e84ee07 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 ); @@ -188,6 +202,19 @@ int mlt_properties_dec_ref( mlt_properties this ) return 0; } +/** Return the ref count of this object. +*/ + +int mlt_properties_ref_count( mlt_properties this ) +{ + if ( this != NULL ) + { + property_list *list = this->local; + return list->ref_count; + } + return 0; +} + /** Allow the specification of a mirror. */ @@ -648,6 +675,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" );