]> git.sesse.net Git - mlt/blobdiff - src/framework/mlt_log.c
Massive refactoring of image conversion.
[mlt] / src / framework / mlt_log.c
index 6fb6233ed19ee6cf973889dd4b2a7b2ce6715cff..568b2d71b7fc0ce243b720f541c435b08a09fed0 100644 (file)
@@ -38,11 +38,17 @@ void default_callback( void* ptr, int level, const char* fmt, va_list vl )
        if ( print_prefix && properties )
        {
                char *mlt_type = mlt_properties_get( properties, "mlt_type" );
+               char *mlt_service = mlt_properties_get( properties, "mlt_service" );
                char *resource = mlt_properties_get( properties, "resource" );
        
-               if ( resource && *resource && resource[0] == '<' && resource[ strlen(resource) - 1 ] == '>' )
-                       mlt_type = resource;
-               fprintf( stderr, "[%s @ %p]", mlt_type, ptr );
+               if ( !( resource && *resource && resource[0] == '<' && resource[ strlen(resource) - 1 ] == '>' ) )
+                       mlt_type = mlt_properties_get( properties, "mlt_type" );
+               if ( mlt_service )
+                       fprintf( stderr, "[%s %s] ", mlt_type, mlt_service );
+               else
+                       fprintf( stderr, "[%s %p] ", mlt_type, ptr );
+               if ( resource )
+                       fprintf( stderr, "%s\n    ", resource );
        }
        print_prefix = strstr( fmt, "\n" ) != NULL;
        vfprintf( stderr, fmt, vl );