remove spurious return in get_audio
[melted] / src / miracle / miracle_unit.c
index 0469ae5..cacdc50 100644 (file)
@@ -129,51 +129,7 @@ void miracle_unit_set_notifier( miracle_unit this, valerie_notifier notifier, ch
 
 static mlt_producer create_producer( char *file )
 {
-       mlt_producer result = NULL;
-
-       // 1st Line preferences
-       if ( strstr( file, ".inigo" ) )
-               result = mlt_factory_producer( "inigo_file", file );
-       else if ( strstr( file, ".westley" ) )
-               result = mlt_factory_producer( "westley", file );
-       else if ( strstr( file, ".mpg" ) )
-               result = mlt_factory_producer( "mcmpeg", file );
-       else if ( strstr( file, ".mpeg" ) )
-               result = mlt_factory_producer( "mcmpeg", file );
-       else if ( strstr( file, ".dv" ) )
-               result = mlt_factory_producer( "mcdv", file );
-       else if ( strstr( file, ".dif" ) )
-               result = mlt_factory_producer( "mcdv", file );
-       else if ( strstr( file, ".jpg" ) )
-               result = mlt_factory_producer( "pixbuf", file );
-       else if ( strstr( file, ".JPG" ) )
-               result = mlt_factory_producer( "pixbuf", file );
-       else if ( strstr( file, ".jpeg" ) )
-               result = mlt_factory_producer( "pixbuf", file );
-       else if ( strstr( file, ".png" ) )
-               result = mlt_factory_producer( "pixbuf", file );
-       else if ( strstr( file, ".tga" ) )
-               result = mlt_factory_producer( "pixbuf", file );
-       else if ( strstr( file, ".txt" ) )
-               result = mlt_factory_producer( "pango", file );
-       else if ( strstr( file, ".ogg" ) )
-               result = mlt_factory_producer( "vorbis", file );
-
-       // 2nd Line fallbacks
-       if ( result == NULL && strstr( file, ".dv" ) )
-               result = mlt_factory_producer( "libdv", file );
-       else if ( result == NULL && strstr( file, ".dif" ) )
-               result = mlt_factory_producer( "libdv", file );
-
-       // 3rd line fallbacks 
-       if ( result == NULL )
-               result = mlt_factory_producer( "avformat", file );
-
-       // 4th line fallbacks 
-       if ( result == NULL )
-               result = mlt_factory_producer( "ffmpeg", file );
-
-       return result;
+       return mlt_factory_producer( "fezzik", file );
 }
 
 /** Create or locate a producer for the file specified.
@@ -626,8 +582,20 @@ void miracle_unit_step( miracle_unit unit, int64_t offset )
 
 int miracle_unit_set( miracle_unit unit, char *name_value )
 {
-       mlt_playlist playlist = mlt_properties_get_data( unit->properties, "playlist", NULL );
-       mlt_properties properties = mlt_playlist_properties( playlist );
+       mlt_properties properties = NULL;
+
+       if ( strncmp( name_value, "consumer.", 9 ) )
+       {
+               mlt_playlist playlist = mlt_properties_get_data( unit->properties, "playlist", NULL );
+               properties = mlt_playlist_properties( playlist );
+       }
+       else
+       {
+               mlt_consumer consumer = mlt_properties_get_data( unit->properties, "consumer", NULL );
+               properties = mlt_consumer_properties( consumer );
+               name_value += 9;
+       }
+
        return mlt_properties_parse( properties, name_value );
 }