]> git.sesse.net Git - mlt/commitdiff
mlt_repository.[hc]:
authorddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Wed, 6 Feb 2008 08:58:48 +0000 (08:58 +0000)
committerddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Wed, 6 Feb 2008 08:58:48 +0000 (08:58 +0000)
  - dynamically locate and register modules instead of reading .dat files
  - added mlt_repository_register() and macros for modules and apps(!) to
    register their service factory functions
mlt_factory.[hc]: change mlt_factory_init() to return mlt_repository to app
mlt_properties.c: let mlt_properties_dir_list() take a NULL filter pattern
src/modules/*:
  - adapt to new module registration system - much simpler!
  - remove unncessary configure scripts (now optional!)

git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1058 d19143bc-622f-0410-bfdd-b5b2a6649095

56 files changed:
src/framework/mlt.h
src/framework/mlt_factory.c
src/framework/mlt_factory.h
src/framework/mlt_properties.c
src/framework/mlt_repository.c
src/framework/mlt_repository.h
src/modules/Makefile
src/modules/avformat/configure
src/modules/avformat/factory.c
src/modules/configure
src/modules/core/configure [deleted file]
src/modules/core/factory.c
src/modules/dv/configure
src/modules/dv/factory.c
src/modules/effectv/configure [deleted file]
src/modules/effectv/factory.c
src/modules/feeds/configure [deleted file]
src/modules/fezzik/configure [deleted file]
src/modules/fezzik/factory.c
src/modules/gtk2/configure
src/modules/gtk2/factory.c
src/modules/inigo/configure [deleted file]
src/modules/inigo/factory.c
src/modules/inigo/producer_inigo.c
src/modules/jackrack/configure
src/modules/jackrack/factory.c
src/modules/kdenlive/configure [deleted file]
src/modules/kdenlive/factory.c
src/modules/kino/configure
src/modules/kino/factory.c
src/modules/motion_est/configure
src/modules/motion_est/factory.c
src/modules/normalize/configure [deleted file]
src/modules/normalize/factory.c
src/modules/oldfilm/configure [deleted file]
src/modules/oldfilm/factory.c
src/modules/plus/configure [deleted file]
src/modules/plus/factory.c
src/modules/qimage/configure
src/modules/qimage/factory.c
src/modules/resample/configure
src/modules/resample/factory.c
src/modules/sdl/configure
src/modules/sdl/factory.c
src/modules/sox/configure
src/modules/sox/factory.c
src/modules/valerie/configure [deleted file]
src/modules/valerie/factory.c
src/modules/vmfx/configure [deleted file]
src/modules/vmfx/factory.c
src/modules/vorbis/configure
src/modules/vorbis/factory.c
src/modules/westley/configure
src/modules/westley/factory.c
src/modules/xine/configure
src/modules/xine/factory.c

index 6f974436d9f6a2cba081f5c519fe0a823abca6de..9e4f962eac78c52d14af6c8d3012154d1dafa16f 100644 (file)
@@ -42,6 +42,7 @@ extern "C"
 #include "mlt_parser.h"
 #include "mlt_geometry.h"
 #include "mlt_profile.h"
+#include "mlt_repository.h"
 
 #ifdef __cplusplus
 }
index d81c0c231d864651cc3a550332dbe7325b5a4a83..ec885b6e79478a732a7e4485a03600b0f7ad7aaf 100644 (file)
 
 static char *mlt_prefix = NULL;
 static mlt_properties global_properties = NULL;
-static mlt_properties object_list = NULL;
-static mlt_repository producers = NULL;
-static mlt_repository filters = NULL;
-static mlt_repository transitions = NULL;
-static mlt_repository consumers = NULL;
+static mlt_repository repository = NULL;
 static mlt_properties event_object = NULL;
 static int unique_id = 0;
 
@@ -59,7 +55,7 @@ static void mlt_factory_create_done( mlt_listener listener, mlt_properties owner
 /** Construct the factories.
 */
 
-int mlt_factory_init( const char *prefix )
+mlt_repository mlt_factory_init( const char *prefix )
 {
        // Only initialise once
        if ( mlt_prefix == NULL )
@@ -93,14 +89,8 @@ int mlt_factory_init( const char *prefix )
                // Create the global properties
                global_properties = mlt_properties_new( );
 
-               // Create the object list.
-               object_list = mlt_properties_new( );
-
-               // Create a repository for each service type
-               producers = mlt_repository_init( object_list, prefix, "producers", "mlt_create_producer" );
-               filters = mlt_repository_init( object_list, prefix, "filters", "mlt_create_filter" );
-               transitions = mlt_repository_init( object_list, prefix, "transitions", "mlt_create_transition" );
-               consumers = mlt_repository_init( object_list, prefix, "consumers", "mlt_create_consumer" );
+               // Create the repository of services
+               repository = mlt_repository_init( prefix );
 
                // Force a clean up when app closes
                atexit( mlt_factory_close );
@@ -118,7 +108,7 @@ int mlt_factory_init( const char *prefix )
        }
 
 
-       return 0;
+       return repository;
 }
 
 /** Fetch the events object.
@@ -186,7 +176,7 @@ mlt_producer mlt_factory_producer( mlt_profile profile, const char *service, voi
        // Try to instantiate via the specified service
        if ( obj == NULL )
        {
-               obj = mlt_repository_fetch( producers, profile, producer_type, service, input );
+               obj = mlt_repository_fetch( repository, profile, producer_type, service, input );
                mlt_events_fire( event_object, "producer-create-done", service, input, obj, NULL );
                if ( obj != NULL )
                {
@@ -209,7 +199,7 @@ mlt_filter mlt_factory_filter( mlt_profile profile, const char *service, void *i
 
        if ( obj == NULL )
        {
-               obj = mlt_repository_fetch( filters, profile, filter_type, service, input );
+               obj = mlt_repository_fetch( repository, profile, filter_type, service, input );
                mlt_events_fire( event_object, "filter-create-done", service, input, obj, NULL );
        }
 
@@ -233,7 +223,7 @@ mlt_transition mlt_factory_transition( mlt_profile profile, const char *service,
 
        if ( obj == NULL )
        {
-               obj = mlt_repository_fetch( transitions, profile, filter_type, service, input );
+               obj = mlt_repository_fetch( repository, profile, transition_type, service, input );
                mlt_events_fire( event_object, "transition-create-done", service, input, obj, NULL );
        }
 
@@ -260,7 +250,7 @@ mlt_consumer mlt_factory_consumer( mlt_profile profile, const char *service, voi
 
        if ( obj == NULL )
        {
-               obj = mlt_repository_fetch( consumers, profile, consumer_type, service, input );
+               obj = mlt_repository_fetch( repository, profile, consumer_type, service, input );
                mlt_events_fire( event_object, "consumer-create-done", service, input, obj, NULL );
        }
 
@@ -290,12 +280,8 @@ void mlt_factory_close( )
        if ( mlt_prefix != NULL )
        {
                mlt_properties_close( event_object );
-               mlt_repository_close( producers );
-               mlt_repository_close( filters );
-               mlt_repository_close( transitions );
-               mlt_repository_close( consumers );
                mlt_properties_close( global_properties );
-               mlt_properties_close( object_list );
+               mlt_repository_close( repository );
                free( mlt_prefix );
                mlt_prefix = NULL;
                mlt_pool_close( );
index d302521db02008c20cea4da61ec3b434877f69aa..82dc3ef0679d0eb1b43c504c6ff3ada6d1ca9a77 100644 (file)
@@ -23,8 +23,9 @@
 
 #include "mlt_types.h"
 #include "mlt_profile.h"
+#include "mlt_repository.h"
 
-extern int mlt_factory_init( const char *prefix );
+extern mlt_repository mlt_factory_init( const char *prefix );
 extern const char *mlt_factory_prefix( );
 extern char *mlt_environment( const char *name );
 extern int mlt_environment_set( const char *name, const char *value );
index c90c13294433b2e13f085e580365fc1b902747ef..47e7fb057500a93989f2ea87f3783bd5964a038d 100644 (file)
@@ -844,7 +844,9 @@ int mlt_properties_dir_list( mlt_properties this, const char *dirname, const cha
                {
                        sprintf( key, "%d", mlt_properties_count( this ) );
                        snprintf( fullname, 1024, "%s/%s", dirname, de->d_name );
-                       if ( de->d_name[ 0 ] != '.' && mlt_fnmatch( pattern, de->d_name ) )
+                       if ( pattern == NULL )
+                               mlt_properties_set( this, key, fullname );
+                       else if ( de->d_name[ 0 ] != '.' && mlt_fnmatch( pattern, de->d_name ) )
                                mlt_properties_set( this, key, fullname );
                        de = readdir( dir );
                }
index 826268dc0afb7405baeeb51e6894a9ec953daca9..7f474f33a8ff4c87e7f16b0f65545126757b1766 100644 (file)
 
 struct mlt_repository_s
 {
-       struct mlt_properties_s parent;
+       struct mlt_properties_s parent; // a list of object files
+       mlt_properties consumers; // lists of entry points
+       mlt_properties filters;
+       mlt_properties producers;
+       mlt_properties transitions;
 };
 
-static char *construct_full_file( char *output, const char *prefix, const char *file )
+mlt_repository mlt_repository_init( const char *prefix )
 {
-       strcpy( output, prefix );
-       if ( prefix[ strlen( prefix ) - 1 ] != '/' )
-               strcat( output, "/" );
-       strcat( output, file );
-       return output;
-}
-
-static char *chomp( char *input )
-{
-       if ( input[ strlen( input ) - 1 ] == '\n' )
-               input[ strlen( input ) - 1 ] = '\0';
-       return input;
-}
-
-static mlt_properties construct_object( const char *prefix, const char *id )
-{
-       mlt_properties output = mlt_properties_new( );
-       mlt_properties_set( output, "prefix", prefix );
-       mlt_properties_set( output, "id", id );
-       return output;
-}
-
-static mlt_properties construct_service( mlt_properties object, const char *id )
-{
-       mlt_properties output = mlt_properties_new( );
-       mlt_properties_set_data( output, "object", object, 0, NULL, NULL );
-       mlt_properties_set( output, "id", id );
-       return output;
-}
-
-static void *construct_instance( mlt_properties service_properties, mlt_profile profile, mlt_service_type type, const char *symbol, void *input )
-{
-       // Extract the service
-       char *service = mlt_properties_get( service_properties, "id" );
-
-       // Get the object properties
-       void *object_properties = mlt_properties_get_data( service_properties, "object", NULL );
-
-       // Get the dlopen'd object
-       void *object = mlt_properties_get_data( object_properties, "dlopen", NULL );
-
-       // Get the dlsym'd symbol
-       void *( *symbol_ptr )( mlt_profile, mlt_service_type, const char *, void * ) = mlt_properties_get_data( object_properties, symbol, NULL );
-
-       // Check that we have object and open if we don't
-       if ( object == NULL )
+       // Construct the repository
+       mlt_repository this = calloc( sizeof( struct mlt_repository_s ), 1 );
+       mlt_properties_init( &this->parent, this );
+       this->consumers = mlt_properties_new();
+       this->filters = mlt_properties_new();
+       this->producers = mlt_properties_new();
+       this->transitions = mlt_properties_new();
+       
+       // Get the directory list
+       mlt_properties dir = mlt_properties_new();
+       int count = mlt_properties_dir_list( dir, prefix, NULL, 0 );
+       int i;
+       
+       // Iterate over files
+       for ( i = 0; i < count; i++ )
        {
-               char full_file[ 512 ];
-
-               // Get the prefix and id of the shared object
-               char *prefix = mlt_properties_get( object_properties, "prefix" );
-               char *file = mlt_properties_get( object_properties, "id" );
                int flags = RTLD_NOW;
+               const char *object_name = mlt_properties_get_value( dir, i);
 
                // Very temporary hack to allow the quicktime plugins to work
                // TODO: extend repository to allow this to be used on a case by case basis
-               if ( !strcmp( service, "kino" ) )
+               if ( strstr( object_name, "libmltkino" ) )
                        flags |= RTLD_GLOBAL;
 
-               // Construct the full file
-               construct_full_file( full_file, prefix, file );
-
                // Open the shared object
-               object = dlopen( full_file, flags );
+               void *object = dlopen( object_name, flags );            
                if ( object != NULL )
                {
-                       // Set it on the properties
-                       mlt_properties_set_data( object_properties, "dlopen", object, 0, ( mlt_destructor )dlclose, NULL );
-               }
-               else
-               {
-                       fprintf( stderr, "Failed to load plugin: %s\n", dlerror() );
+                       // Get the registration function
+                       int ( *symbol_ptr )( mlt_repository ) = dlsym( object, "mlt_register" );
+                       
+                       // Call the registration function
+                       if ( symbol_ptr != NULL )
+                       {
+                               symbol_ptr( this );
+                               
+                               // Register the object file for closure
+                               mlt_properties_set_data( &this->parent, object_name, object, 0, ( mlt_destructor )dlclose, NULL );
+                       }
+                       else
+                       {
+                               dlclose( object );
+                       }
                }
        }
-
-       // Now check if we have this symbol pointer
-       if ( object != NULL && symbol_ptr == NULL )
-       {
-               // Construct it now
-               symbol_ptr = dlsym( object, symbol );
-
-               // Set it on the properties
-               mlt_properties_set_data( object_properties, "dlsym", symbol_ptr, 0, NULL, NULL );
-       }
-
-       // Construct the service
-       return symbol_ptr != NULL ? symbol_ptr( profile, type, service, input ) : NULL;
+       
+       return this;
 }
 
-mlt_repository mlt_repository_init( mlt_properties object_list, const char *prefix, const char *data, const char *symbol )
+void mlt_repository_register( mlt_repository this, mlt_service_type service_type, const char *service, void *symbol )
 {
-       char full_file[ 512 ];
-       FILE *file;
-
-       // Construct the repository
-       mlt_repository this = calloc( sizeof( struct mlt_repository_s ), 1 );
-       mlt_properties_init( &this->parent, this );
-
-       // Add the symbol to THIS repository properties.
-       mlt_properties_set( &this->parent, "_symbol", symbol );
-
-       // Construct full file
-       construct_full_file( full_file, prefix, data );
-       strcat( full_file, ".dat" );
-
-       // Open the file
-       file = fopen( full_file, "r" );
-
-       // Parse the contents
-       if ( file != NULL )
+       // Add the entry point to the corresponding service list
+       switch ( service_type )
        {
-               char full[ 512 ];
-               char service[ 256 ];
-               char object[ 256 ];
-
-               while( fgets( full, 512, file ) )
-               {
-                       chomp( full );
-
-                       if ( full[ 0 ] != '#' && full[ 0 ] != '\0' && sscanf( full, "%s %s", service, object ) == 2 )
-                       {
-                               // Get the object properties first
-                               mlt_properties object_properties = mlt_properties_get_data( object_list, object, NULL );
-
-                               // If their are no properties, create them now
-                               if ( object_properties == NULL )
-                               {
-                                       // Construct the object
-                                       object_properties = construct_object( prefix, object );
-
-                                       // Add it to the object list
-                                       mlt_properties_set_data( object_list, object, object_properties, 0, ( mlt_destructor )mlt_properties_close, NULL );
-                               }
-
-                               // Now construct a property for the service
-                               mlt_properties service_properties = construct_service( object_properties, service );
-
-                               // Add it to the repository
-                               mlt_properties_set_data( &this->parent, service, service_properties, 0, ( mlt_destructor )mlt_properties_close, NULL );
-                       }
-               }
-
-               // Close the file
-               fclose( file );
+               case consumer_type:
+                       mlt_properties_set_data( this->consumers, service, symbol, 0, NULL, NULL );
+                       break;
+               case filter_type:
+                       mlt_properties_set_data( this->filters, service, symbol, 0, NULL, NULL );
+                       break;
+               case producer_type:
+                       mlt_properties_set_data( this->producers, service, symbol, 0, NULL, NULL );
+                       break;
+               case transition_type:
+                       mlt_properties_set_data( this->transitions, service, symbol, 0, NULL, NULL );
+                       break;
+               default:
+                       break;
        }
-
-       return this;
 }
 
 void *mlt_repository_fetch( mlt_repository this, mlt_profile profile, mlt_service_type type, const char *service, void *input )
 {
-       // Get the service properties
-       mlt_properties service_properties = mlt_properties_get_data( &this->parent, service, NULL );
+       void *( *symbol_ptr )( mlt_profile, mlt_service_type, const char *, void * ) = NULL;
 
-       // If the service exists
-       if ( service_properties != NULL )
+       // Get the entry point from the corresponding service list
+       switch ( type )
        {
-               // Get the symbol that is used to generate this service
-               char *symbol = mlt_properties_get( &this->parent, "_symbol" );
-
-               // Now get an instance of the service
-               return construct_instance( service_properties, profile, type, symbol, input );
+               case consumer_type:
+                       symbol_ptr = mlt_properties_get_data( this->consumers, service, NULL );
+                       break;
+               case filter_type:
+                       symbol_ptr = mlt_properties_get_data( this->filters, service, NULL );
+                       break;
+               case producer_type:
+                       symbol_ptr = mlt_properties_get_data( this->producers, service, NULL );
+                       break;
+               case transition_type:
+                       symbol_ptr = mlt_properties_get_data( this->transitions, service, NULL );
+                       break;
+               default:
+                       break;
        }
-
-       return NULL;
+       
+       // Construct the service
+       return ( symbol_ptr != NULL ) ? symbol_ptr( profile, type, service, input ) : NULL;
 }
 
 void mlt_repository_close( mlt_repository this )
 {
+       mlt_properties_close( this->consumers );
+       mlt_properties_close( this->filters );
+       mlt_properties_close( this->producers );
+       mlt_properties_close( this->transitions );
        mlt_properties_close( &this->parent );
        free( this );
 }
-
-
index f4b2e2c3974afc8eb920339b29375a829d149dfd..c4e41427fc15c38dacb2e37abef289b10b496857 100644 (file)
 
 typedef struct mlt_repository_s *mlt_repository;
 
+/** This macro can be used to register services if the function is declared as 
+*   void mlt_register( mlt_repository )
+*/
+#define MLT_REPOSITORY void mlt_register( mlt_repository repository )
+#define MLT_REGISTER( type, service, symbol  ) ( mlt_repository_register( repository, (type), (service), (symbol) ) )
+
 /** Public functions.
 */
 
-extern mlt_repository mlt_repository_init( mlt_properties object_list, const char *prefix, const char *file, const char *symbol );
+extern mlt_repository mlt_repository_init( const char *prefix );
+extern void mlt_repository_register( mlt_repository self, mlt_service_type service_type, const char *service, void *symbol );
 extern void *mlt_repository_fetch( mlt_repository self, mlt_profile profile, mlt_service_type type, const char *service, void *input );
 extern void mlt_repository_close( mlt_repository self );
 
index 251806a8b0018183cc5fa67ef269109de7352b2b..fcbf3ea6830a4a5943812d349e3223e6618a3d8c 100644 (file)
@@ -19,7 +19,6 @@ distclean:
        done
 
 install:
-       install -m 644 producers.dat filters.dat transitions.dat consumers.dat "$(DESTDIR)$(libdir)/mlt"
        list='$(SUBDIRS)'; \
        for subdir in $$list; do \
                if [ -f $$subdir/Makefile -a ! -f disable-$$subdir ] ; \
index eace4d08d2d2bdcb367d18222b489df924a1b720..e52d58e76c27307227793f6578332d9c88a846dc 100755 (executable)
@@ -141,19 +141,5 @@ else
        echo "EXTRA_LIBS=$extra_libs" >> config.mak
        echo "AVFORMAT_SUFFIX=$avformat_suffix" >> config.mak
 
-cat << EOF >> ../producers.dat
-avformat               libmltavformat$LIBSUF
-EOF
-
-cat << EOF >> ../filters.dat
-avdeinterlace  libmltavformat$LIBSUF
-avresample             libmltavformat$LIBSUF
-avcolour_space libmltavformat$LIBSUF
-EOF
-
-cat << EOF >> ../consumers.dat
-avformat               libmltavformat$LIBSUF
-EOF
-
 fi
 
index c197d901e68029b4e08abafa12584e55f9a1db94..fe2d65f2e487ecd63770b44c9200992af3128626 100644 (file)
@@ -92,17 +92,16 @@ static void avformat_init( )
        }
 }
 
-void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const char *id, void *arg )
+static void *create_service( mlt_profile profile, mlt_service_type type, const char *id, void *arg )
 {
        avformat_init( );
        if ( !strcmp( id, "avformat" ) )
-               return producer_avformat_init( profile, arg );
-       return NULL;
-}
-
-void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char *id, void *arg )
-{
-       avformat_init( );
+       {
+               if ( type == producer_type )
+                       return producer_avformat_init( profile, arg );
+               else if ( type == consumer_type )
+                       return consumer_avformat_init( profile, arg );          
+       }
        if ( !strcmp( id, "avcolour_space" ) )
                return filter_avcolour_space_init( arg );
 #ifdef USE_MMX
@@ -114,16 +113,12 @@ void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char
        return NULL;
 }
 
-void *mlt_create_transition( mlt_profile profile, mlt_service_type type, const char *id, void *arg )
+MLT_REPOSITORY
 {
-       return NULL;
+       MLT_REGISTER( consumer_type, "avformat", create_service );
+       MLT_REGISTER( producer_type, "avformat", create_service );
+       MLT_REGISTER( filter_type, "avcolour_space", create_service );
+       MLT_REGISTER( filter_type, "avcolor_space", create_service );
+       MLT_REGISTER( filter_type, "avdeinterlace", create_service );
+       MLT_REGISTER( filter_type, "avresample", create_service );
 }
-
-void *mlt_create_consumer( mlt_profile profile, mlt_service_type type, const char *id, void *arg )
-{
-       avformat_init( );
-       if ( !strcmp( id, "avformat" ) )
-               return consumer_avformat_init( profile, arg );
-       return NULL;
-}
-
index ee654132529f53502ba844d8a080b86a6b6a8d54..e80a585d7f1f6df3b47729fde68ea6a8cd2ab3ef 100755 (executable)
@@ -4,7 +4,7 @@
 [ "$help" != "1" ] && rm -f disable-* producers.dat filters.dat transitions.dat consumers.dat
 
 # Create the make.inc file
-echo SUBDIRS = `find . -maxdepth 1 -type d | grep -v CVS | grep -v "^.$" | sed 's/\.\///'` > make.inc
+echo SUBDIRS = `find . -maxdepth 1 -type d | grep -v .svn | grep -v "^.$" | sed 's/\.\///'` > make.inc
 
 # Iterate through arguments
 for i in "$@"
@@ -17,16 +17,22 @@ done
 # Iterate through each of the components
 for i in *
 do
-       if [ -x $i/configure -a \( "$help" = "1" -o ! -f disable-$i \) ]
+       if [ -d $i -a \( "$help" = "1" -o ! -f disable-$i \) ]
        then
                if [ "$gpl" = "true" -o ! -f $i/gpl ]
                then
-                       [ "$help" = "0" ] && echo "Configuring modules/$i:"
-                       olddir2=`pwd`
-                       cd $i
-                       ./configure "$@"
-                       [ $? != 0 ] && exit 1
-                       cd $olddir2
+                       [ -f $i/Makefile -a "$help" = "0" ] && echo "Configuring modules/$i:"
+                       if [ -x $i/configure ]
+                       then
+                               olddir2=`pwd`
+                               cd $i
+                               ./configure "$@"
+                               [ $? != 0 ] && exit 1
+                               cd $olddir2
+                       elif [ -f $i/configure ]
+                       then
+                               echo "  configure script is not set executable!"
+                       fi
                elif [ "$help" = "0" ]
                then
                        touch disable-$i
diff --git a/src/modules/core/configure b/src/modules/core/configure
deleted file mode 100755 (executable)
index 160844b..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/sh
-
-if [ "$help" != "1" ]
-then
-
-cat << EOF >> ../producers.dat
-color                  libmltcore$LIBSUF
-colour                 libmltcore$LIBSUF
-noise                  libmltcore$LIBSUF
-ppm                            libmltcore$LIBSUF
-EOF
-
-cat << EOF >> ../filters.dat
-brightness             libmltcore$LIBSUF
-channelcopy            libmltcore$LIBSUF
-data_feed              libmltcore$LIBSUF
-data_show              libmltcore$LIBSUF
-gamma                  libmltcore$LIBSUF
-greyscale              libmltcore$LIBSUF
-luma                   libmltcore$LIBSUF
-mirror                 libmltcore$LIBSUF
-mono                   libmltcore$LIBSUF
-obscure                        libmltcore$LIBSUF
-region                 libmltcore$LIBSUF
-rescale                        libmltcore$LIBSUF
-resize                 libmltcore$LIBSUF
-transition             libmltcore$LIBSUF
-watermark              libmltcore$LIBSUF
-EOF
-
-cat << EOF >> ../transitions.dat
-composite              libmltcore$LIBSUF
-luma                   libmltcore$LIBSUF
-mix                            libmltcore$LIBSUF
-region                 libmltcore$LIBSUF
-EOF
-
-cat << EOF >> ../consumers.dat
-null                   libmltcore$LIBSUF
-EOF
-
-fi
index 2c92efb65956fd35a387c9d12a5e290a2c5acc10..5590764549458842d20b0d72a11a61189097429f 100644 (file)
@@ -45,70 +45,31 @@ extern mlt_transition transition_luma_init( mlt_profile profile, mlt_service_typ
 extern mlt_transition transition_mix_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 #include "transition_region.h"
 
-void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const char *id, void *arg )
+MLT_REPOSITORY
 {
-       if ( !strcmp( id, "color" ) )
-               return producer_colour_init( profile, type, id, arg );
-       if ( !strcmp( id, "colour" ) )
-               return producer_colour_init( profile, type, id, arg );
-       if ( !strcmp( id, "noise" ) )
-               return producer_noise_init( profile, type, id, arg );
-       if ( !strcmp( id, "ppm" ) )
-               return producer_ppm_init( profile, type, id, arg );
-       return NULL;
-}
-
-void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char *id, void *arg )
-{
-       if ( !strcmp( id, "brightness" ) )
-               return filter_brightness_init( profile, type, id, arg );
-       if ( !strcmp( id, "channelcopy" ) )
-               return filter_channelcopy_init( profile, type, id, arg );
-       if ( !strcmp( id, "data_feed" ) )
-               return filter_data_feed_init( profile, type, id, arg );
-       if ( !strcmp( id, "data_show" ) )
-               return filter_data_show_init( profile, type, id, arg );
-       if ( !strcmp( id, "gamma" ) )
-               return filter_gamma_init( profile, type, id, arg );
-       if ( !strcmp( id, "greyscale" ) )
-               return filter_greyscale_init( profile, type, id, arg );
-       if ( !strcmp( id, "luma" ) )
-               return filter_luma_init( profile, type, id, arg );
-       if ( !strcmp( id, "mirror" ) )
-               return filter_mirror_init( profile, type, id, arg );
-       if ( !strcmp( id, "mono" ) )
-               return filter_mono_init( profile, type, id, arg );
-       if ( !strcmp( id, "obscure" ) )
-               return filter_obscure_init( profile, type, id, arg );
-       if ( !strcmp( id, "region" ) )
-               return filter_region_init( profile, type, id, arg );
-       if ( !strcmp( id, "rescale" ) )
-               return filter_rescale_init( profile, type, id, arg );
-       if ( !strcmp( id, "resize" ) )
-               return filter_resize_init( profile, type, id, arg );
-       if ( !strcmp( id, "transition" ) )
-               return filter_transition_init( profile, type, id, arg );
-       if ( !strcmp( id, "watermark" ) )
-               return filter_watermark_init( profile, type, id, arg );
-       return NULL;
-}
-
-void *mlt_create_transition( mlt_profile profile, mlt_service_type type, const char *id, void *arg )
-{
-       if ( !strcmp( id, "composite" ) )
-               return transition_composite_init( profile, type, id, arg );
-       if ( !strcmp( id, "luma" ) )
-               return transition_luma_init( profile, type, id, arg );
-       if ( !strcmp( id, "mix" ) )
-               return transition_mix_init( profile, type, id, arg );
-       if ( !strcmp( id, "region" ) )
-               return transition_region_init( profile, type, id, arg );
-       return NULL;
-}
-
-void *mlt_create_consumer( mlt_profile profile, mlt_service_type type, const char *id, void *arg )
-{
-       if ( !strcmp( id, "null" ) )
-               return consumer_null_init( profile, type, id, arg );
-       return NULL;
+       MLT_REGISTER( consumer_type, "null", consumer_null_init );
+       MLT_REGISTER( filter_type, "brightness", filter_brightness_init );
+       MLT_REGISTER( filter_type, "channelcopy", filter_channelcopy_init );
+       MLT_REGISTER( filter_type, "data_feed", filter_data_feed_init );
+       MLT_REGISTER( filter_type, "data_show", filter_data_show_init );
+       MLT_REGISTER( filter_type, "gamma", filter_gamma_init );
+       MLT_REGISTER( filter_type, "greyscale", filter_greyscale_init );
+       MLT_REGISTER( filter_type, "grayscale", filter_greyscale_init );
+       MLT_REGISTER( filter_type, "luma", filter_luma_init );
+       MLT_REGISTER( filter_type, "mirror", filter_mirror_init );
+       MLT_REGISTER( filter_type, "mono", filter_mono_init );
+       MLT_REGISTER( filter_type, "obscure", filter_obscure_init );
+       MLT_REGISTER( filter_type, "region", filter_region_init );
+       MLT_REGISTER( filter_type, "rescale", filter_rescale_init );
+       MLT_REGISTER( filter_type, "resize", filter_resize_init );
+       MLT_REGISTER( filter_type, "transition", filter_transition_init );
+       MLT_REGISTER( filter_type, "watermark", filter_watermark_init );
+       MLT_REGISTER( producer_type, "color", producer_colour_init );
+       MLT_REGISTER( producer_type, "colour", producer_colour_init );
+       MLT_REGISTER( producer_type, "noise", producer_noise_init );
+       MLT_REGISTER( producer_type, "ppm", producer_ppm_init );
+       MLT_REGISTER( transition_type, "composite", transition_composite_init );
+       MLT_REGISTER( transition_type, "luma", transition_luma_init );
+       MLT_REGISTER( transition_type, "mix", transition_mix_init );
+       MLT_REGISTER( transition_type, "region", transition_region_init );
 }
index 41b860ad58e72f34ad2bb72741c1257ded70c4e4..6712ea61350423ec3195382c95d88fa97b456daa 100755 (executable)
@@ -6,13 +6,11 @@ then
        pkg-config libdv 2> /dev/null
        disable_libdv=$?
 
-       if [ "$disable_libdv" = "0" ]
+       if [ "$disable_libdv" != "0" ]
        then
-               echo "libdv                     libmltdv$LIBSUF" >> ../producers.dat
-               echo "libdv                     libmltdv$LIBSUF" >> ../consumers.dat
-       else
                echo "- libdv not found: disabling"
                touch ../disable-dv
+               exit 0
        fi
 
 fi
index 694032cf5293ca53c038e856939899587ba1f1f2..305fb9cd15a82fe5bfccfd07210aaf813c86be2c 100644 (file)
 
 #include <string.h>
 
-#include <framework/mlt_consumer.h>
-#include <framework/mlt_producer.h>
+#include <framework/mlt.h>
 
 extern mlt_consumer consumer_libdv_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 extern mlt_producer producer_libdv_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 
-
-void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       if ( !strcmp( id, "libdv" ) )
-               return producer_libdv_init( profile, type, id, arg );
-       return NULL;
-}
-
-void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
+MLT_REPOSITORY
 {
-       return NULL;
+       MLT_REGISTER( consumer_type, "libdv", consumer_libdv_init );
+       MLT_REGISTER( producer_type, "libdv", producer_libdv_init );
 }
-
-void *mlt_create_transition( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_consumer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       if ( !strcmp( id, "libdv" ) )
-               return consumer_libdv_init( profile, type, id, arg );
-       return NULL;
-}
-
diff --git a/src/modules/effectv/configure b/src/modules/effectv/configure
deleted file mode 100755 (executable)
index 25f1d82..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-if [ "$help" != "1" ]
-then
-
-cat << EOF >> ../producers.dat
-EOF
-
-cat << EOF >> ../filters.dat
-BurningTV      libmlteffectv$LIBSUF
-EOF
-
-cat << EOF >> ../transitions.dat
-EOF
-
-cat << EOF >> ../consumers.dat
-EOF
-
-fi
index 2092b40aa719602e7fd5741201e07c7d98fe2afc..e28d765a0c5cefd71f6b6c424c682f60409d55a0 100644 (file)
 
 extern mlt_filter filter_burn_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 
-void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
+MLT_REPOSITORY
 {
-       return NULL;
-}
-
-void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       if ( !strcmp( id, "BurningTV" ) )
-               return filter_burn_init( profile, type, id, arg );
-       return NULL;
-}
-
-void *mlt_create_transition( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_consumer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
+       MLT_REGISTER( filter_type, "BurningTV", filter_burn_init );
+       MLT_REGISTER( filter_type, "burningtv", filter_burn_init );
 }
diff --git a/src/modules/feeds/configure b/src/modules/feeds/configure
deleted file mode 100755 (executable)
index e69de29..0000000
diff --git a/src/modules/fezzik/configure b/src/modules/fezzik/configure
deleted file mode 100755 (executable)
index 9d26d18..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-if [ "$help" != "1" ]
-then
-
-cat << EOF >> ../producers.dat
-fezzik                 libmltfezzik$LIBSUF
-hold                   libmltfezzik$LIBSUF
-EOF
-
-fi
-
index 33bfb079ea1e5d7bb55771445ba82874b300602f..87f22b98ad68e7b93ab402b7ec773903b5f201dc 100644 (file)
 extern mlt_producer producer_fezzik_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 extern mlt_producer producer_hold_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 
-void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
+MLT_REPOSITORY
 {
-       if ( !strcmp( id, "fezzik" ) )
-               return producer_fezzik_init( profile, type, id, arg );
-       if ( !strcmp( id, "hold" ) )
-               return producer_hold_init( profile, type, id, arg );
-       return NULL;
+       MLT_REGISTER( producer_type, "fezzik", producer_fezzik_init );
+       MLT_REGISTER( producer_type, "hold", producer_hold_init );
 }
-
-void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_transition( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_consumer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
index d6c7f3fe68cf974e2694fc845c5bc0a5628abf8e..725350bdb4bc0057717227ea32fc4d072e6a0446 100755 (executable)
@@ -33,11 +33,6 @@ then
        [ "$disable_pixbuf" = "0" ] && echo "USE_PIXBUF=1" >> config.mak
        [ "$disable_pango" = "0" ] && echo "USE_PANGO=1" >> config.mak
 
-       [ "$disable_pixbuf" = "0" ] && echo "pixbuf                     libmltgtk2$LIBSUF" >> ../producers.dat
-       [ "$disable_pango" = "0" ] && echo "pango                       libmltgtk2$LIBSUF" >> ../producers.dat
-       [ "$disable_pixbuf" = "0" ] && echo "gtkrescale         libmltgtk2$LIBSUF" >> ../filters.dat
-       [ "$disable_gtk2" = "0" ] && echo "gtk2_preview libmltgtk2$LIBSUF" >> ../consumers.dat
-
        exit 0
 fi
 
index 8b5e1123002c225a83c9f2100c2a877223b02e9d..34d62e263b4c030bc93852cfe526c990006add50 100644 (file)
@@ -46,7 +46,7 @@ static void initialise( )
        }
 }
 
-void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
+void *create_service( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
 {
        initialise( );
 
@@ -60,30 +60,11 @@ void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const cha
                return producer_pango_init( arg );
 #endif
 
-       return NULL;
-}
-
-void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       initialise( );
-
 #ifdef USE_PIXBUF
        if ( !strcmp( id, "gtkrescale" ) )
                return filter_rescale_init( profile, arg );
 #endif
 
-       return NULL;
-}
-
-void *mlt_create_transition( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_consumer( mlt_profile profile, mlt_service_type type, const char *id, void *arg )
-{
-       initialise( );
-
 #ifdef USE_GTK2
        if ( !strcmp( id, "gtk2_preview" ) )
                return consumer_gtk2_preview_init( profile, arg );
@@ -92,3 +73,10 @@ void *mlt_create_consumer( mlt_profile profile, mlt_service_type type, const cha
        return NULL;
 }
 
+MLT_REPOSITORY
+{
+       MLT_REGISTER( consumer_type, "gtk2_preview", create_service );
+       MLT_REGISTER( filter_type, "gtkrescale", create_service );
+       MLT_REGISTER( producer_type, "pango", create_service );
+       MLT_REGISTER( producer_type, "pixbuf", create_service );
+}
diff --git a/src/modules/inigo/configure b/src/modules/inigo/configure
deleted file mode 100755 (executable)
index 5296827..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-if [ "$help" != "1" ]
-then
-
-cat << EOF >> ../producers.dat
-inigo                  libmltinigo$LIBSUF
-inigo_file             libmltinigo$LIBSUF
-EOF
-
-fi
-
index ef8efcd18c84696db7e87987df9d6dd37c0e26d9..c1b2d0e7126dc39b521c6fe9851fd0b26379f5a3 100644 (file)
 #include <string.h>
 #include <framework/mlt.h>
 
-extern mlt_producer producer_inigo_file_init( mlt_profile profile, char *file );
-extern mlt_producer producer_inigo_init( mlt_profile profile, char **argv );
+extern mlt_producer producer_inigo_file_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
+extern mlt_producer producer_inigo_init( mlt_profile profile, mlt_service_type type, const char *id, char **argv );
 
-void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const char *id, void *arg )
+MLT_REPOSITORY
 {
-       if ( !strcmp( id, "inigo_file" ) )
-               return producer_inigo_file_init( profile, arg );
-       if ( !strcmp( id, "inigo" ) )
-               return producer_inigo_init( profile, arg );
-       return NULL;
+       MLT_REGISTER( producer_type, "inigo", producer_inigo_init );
+       MLT_REGISTER( producer_type, "inigo_file", producer_inigo_file_init );
 }
-
-void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_transition( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_consumer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
index 1970f9c212b7bc4249d3f46e94e0998468089eaf..0ecbde44aedce4903f9d5edd73d952d4cee0a3ab 100644 (file)
@@ -24,9 +24,9 @@
 
 #include <framework/mlt.h>
 
-mlt_producer producer_inigo_init( mlt_profile profile, char **argv );
+mlt_producer producer_inigo_init( mlt_profile profile, mlt_service_type type, const char *id, char **argv );
 
-mlt_producer producer_inigo_file_init( mlt_profile profile, char *file )
+mlt_producer producer_inigo_file_init( mlt_profile profile, mlt_service_type type, const char *id, char *file )
 {
        FILE *input = fopen( file, "r" );
        char **args = calloc( sizeof( char * ), 1000 );
@@ -43,7 +43,7 @@ mlt_producer producer_inigo_file_init( mlt_profile profile, char *file )
                }
        }
 
-       mlt_producer result = producer_inigo_init( profile, args );
+       mlt_producer result = producer_inigo_init( profile, type, id, args );
 
        if ( result != NULL )
        {
@@ -120,7 +120,7 @@ static mlt_transition create_transition( mlt_profile profile, mlt_field field, c
        return transition;
 }
 
-mlt_producer producer_inigo_init( mlt_profile profile, char **argv )
+mlt_producer producer_inigo_init( mlt_profile profile, mlt_service_type type, const char *id, char **argv )
 {
        int i;
        int track = 0;
index 01c8cddd781355f35b04a47ae65ec9da86f40730..d10b2942afde8a40fdf6aeab28d5e2db693a909f 100755 (executable)
@@ -17,15 +17,12 @@ then
                disable_ladspa=`[ -f "$ladspa_prefix/include/ladspa.h" ] && echo 1 || echo 0`
        fi
 
-       if [ "$disable_jack" = "0" -a "$disable_xml2" = "0" -a "$disable_ladspa" = "0" ]
+       if [ "$disable_jack" = "1" -o "$disable_xml2" = "1" -o "$disable_ladspa" = "1" ]
        then
-               echo "jackrack          libmltjackrack$LIBSUF" >> ../filters.dat
-               echo "ladspa            libmltjackrack$LIBSUF" >> ../filters.dat
-       else
                [ "$disable_jack" = "1" ] && echo "- jackrack not found: disabling"
                [ "$disable_xml2" = "1" ] && echo "- xml2 not found: disabling jackrack"
                [ "$disable_ladspa" = "1" ] && echo "- ladspa not found; disabling"
                touch ../disable-jackrack
        fi
-
+       exit 0
 fi
index e3121f26e82b70cfedde4c61207c27373590e5c5..1476b153d27beb7c125cde02eb6f2e1cd43cffaa 100644 (file)
 extern mlt_filter filter_jackrack_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 extern mlt_filter filter_ladspa_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 
-void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
+MLT_REPOSITORY
 {
-       return NULL;
-}
-
-void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       if ( !strcmp( id, "jackrack" ) )
-               return filter_jackrack_init( profile, type, id, arg );
-       else if ( !strcmp( id, "ladspa" ) )
-               return filter_ladspa_init( profile, type, id, arg );
-       return NULL;
-}
-
-void *mlt_create_transition( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_consumer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
+       MLT_REGISTER( filter_type, "jackrack", filter_jackrack_init );
+       MLT_REGISTER( filter_type, "ladspa", filter_ladspa_init );
 }
diff --git a/src/modules/kdenlive/configure b/src/modules/kdenlive/configure
deleted file mode 100755 (executable)
index 792b6f2..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-if [ "$help" != "1" ]
-then
-       echo "boxblur           libmltkdenlive$LIBSUF" >> ../filters.dat
-       echo "wave              libmltkdenlive$LIBSUF" >> ../filters.dat
-       echo "framebuffer       libmltkdenlive$LIBSUF" >> ../producers.dat
-fi
index 1cc4dc6a262e7bd0f8d2108de90c2e36e01cdd11..430a24c84890aeb759977edb2800d1b921730d5b 100644 (file)
@@ -24,28 +24,9 @@ extern mlt_filter filter_boxblur_init( mlt_profile profile, mlt_service_type typ
 extern mlt_filter filter_wave_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 extern mlt_producer producer_framebuffer_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 
-void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
+MLT_REPOSITORY
 {
-       if ( !strcmp( id, "framebuffer" ) )
-               return producer_framebuffer_init( profile, type, id, arg );
-       return NULL;
-}
-
-void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       if ( !strcmp( id, "boxblur" ) )
-               return filter_boxblur_init( profile, type, id, arg );
-       if ( !strcmp( id, "wave" ) )
-               return filter_wave_init( profile, type, id, arg );
-       return NULL;
-}
-
-void *mlt_create_transition( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_consumer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
+       MLT_REGISTER( filter_type, "boxblur", filter_boxblur_init );
+       MLT_REGISTER( filter_type, "wave", filter_wave_init );
+       MLT_REGISTER( producer_type, "framebuffer", producer_framebuffer_init );
 }
index 17c00f3e694dd0610a2e3bdb09f6789a35029e4f..ae766d1ca6d2711b3e140aecb5c13dd635e4cf3b 100755 (executable)
@@ -17,8 +17,7 @@ then
        [ "$libdv_disabled" = "0" ] && echo "HAVE_LIBDV=1" >> config.mak
 
        [ "$lqt_disabled" != "0" ] && echo "- libquicktime not found: only enabling dv avi support"
-       [ "$libdv_disabled" != 0 -a "$lqt_disabled" = "0" ] && echo "- libdv not found: mov dv may not have audio"
-
-       echo "kino                      libmltkino$LIBSUF" >> ../producers.dat
+       [ "$libdv_disabled" != "0" -a "$lqt_disabled" = "0" ] && echo "- libdv not found: mov dv may not have audio"
+       
+       exit 0
 fi
-
index 9316abb8ae0c2711cb017cc646c776d7b4cd7885..13e8def8a27169bc3e858a1ce1ec79f899f9f796 100644 (file)
 
 extern mlt_producer producer_kino_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 
-void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
+MLT_REPOSITORY
 {
-       if ( !strcmp( id, "kino" ) )
-               return producer_kino_init( profile, type, id, arg );
-       return NULL;
+       MLT_REGISTER( producer_type, "kino", producer_kino_init );
 }
-
-void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_transition( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_consumer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
index 578862c830449a69a8318ed90b577692e438739e..6116a9a1b9de9615e501e8b38771d9d667351454 100755 (executable)
@@ -7,17 +7,6 @@ if [ "$motionest" = "false" ]
 then
        touch ../disable-motion_est
        echo "- motion estimation components disabled. Add --enable-motion-est to enable." 
-else
-cat << EOF >> ../producers.dat
-slowmotion             libmltmotion_est.so
-EOF
-
-cat << EOF >> ../filters.dat
-motion_est             libmltmotion_est.so
-vismv                  libmltmotion_est.so
-crop_detect            libmltmotion_est.so
-autotrack_rectangle    libmltmotion_est.so
-EOF
 fi
 
 fi
index 493d37f446c8384038e917daf106d731b733abcb..1df0929aeb5f23480ed6a0d2ccec98fdc7053d41 100644 (file)
@@ -23,22 +23,11 @@ extern mlt_filter filter_crop_detect_init( mlt_profile profile, mlt_service_type
 extern mlt_filter filter_autotrack_rectangle_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 extern mlt_producer producer_slowmotion_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 
-void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
+MLT_REPOSITORY
 {
-       if ( !strcmp( id, "motion_est" ) )
-               return filter_motion_est_init( profile, type, id, arg );
-       if ( !strcmp( id, "vismv" ) )
-               return filter_vismv_init( profile, type, id, arg );
-       if ( !strcmp( id, "crop_detect" ) )
-               return filter_crop_detect_init( profile, type, id, arg );
-       if ( !strcmp( id, "autotrack_rectangle" ) )
-               return filter_autotrack_rectangle_init( profile, type, id, arg );
-       return NULL;
-}
-
-void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       if ( !strcmp( id, "slowmotion" ) )
-               return producer_slowmotion_init( profile, type, id, arg );
-       return NULL;
+       MLT_REGISTER( filter_type, "motion_est", filter_motion_est_init );
+       MLT_REGISTER( filter_type, "vismv", filter_vismv_init );
+       MLT_REGISTER( filter_type, "crop_detect", filter_crop_detect_init );
+       MLT_REGISTER( filter_type, "autotrack_rectangle", filter_autotrack_rectangle_init );
+       MLT_REGISTER( producer_type, "slowmotion", producer_slowmotion_init );
 }
diff --git a/src/modules/normalize/configure b/src/modules/normalize/configure
deleted file mode 100755 (executable)
index ec36a0e..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-if [ "$help" != "1" ]
-then
-
-cat << EOF >> ../filters.dat
-volume         libmltnormalize$LIBSUF
-EOF
-
-fi
index 24862506ee4a2b110cdcfd3bd78399c71d4f1eaf..3736d7d2a3cac612c0cdfa9b57cb5b7dd511c813 100644 (file)
 
 extern mlt_filter filter_volume_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 
-void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
+MLT_REPOSITORY
 {
-       return NULL;
-}
-
-void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       if ( !strcmp( id, "volume" ) )
-               return filter_volume_init( profile, type, id, arg );
-       return NULL;
-}
-
-void *mlt_create_transition( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_consumer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
+       MLT_REGISTER( filter_type, "volume", filter_volume_init );
 }
diff --git a/src/modules/oldfilm/configure b/src/modules/oldfilm/configure
deleted file mode 100755 (executable)
index 124baa8..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-if [ "$help" != "1" ]
-then
-       echo "grain             libmltoldfilm$LIBSUF" >> ../filters.dat
-       echo "oldfilm           libmltoldfilm$LIBSUF" >> ../filters.dat
-       echo "lines             libmltoldfilm$LIBSUF" >> ../filters.dat
-       echo "dust              libmltoldfilm$LIBSUF" >> ../filters.dat
-fi
index fab7729124956d243705eb6436f2dc9f349d4e3a..2ec90a17d9e1c3164b2426c8fe9e97ddf2937a5f 100644 (file)
@@ -25,31 +25,10 @@ extern mlt_filter filter_grain_init( mlt_profile profile, mlt_service_type type,
 extern mlt_filter filter_lines_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 extern mlt_filter filter_oldfilm_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 
-void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
+MLT_REPOSITORY
 {
-       return NULL;
-}
-
-void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       if ( !strcmp( id, "oldfilm" ) )
-               return filter_oldfilm_init( profile, type, id, arg );
-       if ( !strcmp( id, "dust" ) )
-               return filter_dust_init( profile, type, id, arg );
-       if ( !strcmp( id, "lines" ) )
-               return filter_lines_init( profile, type, id, arg );
-       if ( !strcmp( id, "grain" ) )
-               return filter_grain_init( profile, type, id, arg );
-
-       return NULL;
-}
-
-void *mlt_create_transition( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_consumer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
+       MLT_REGISTER( filter_type, "oldfilm", filter_oldfilm_init );
+       MLT_REGISTER( filter_type, "dust", filter_dust_init );
+       MLT_REGISTER( filter_type, "lines", filter_lines_init );
+       MLT_REGISTER( filter_type, "grain", filter_grain_init );
 }
diff --git a/src/modules/plus/configure b/src/modules/plus/configure
deleted file mode 100755 (executable)
index 77d9ce0..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-if [ "$help" != "1" ]
-then
-
-cat << EOF >> ../producers.dat
-EOF
-
-cat << EOF >> ../filters.dat
-affine                 libmltplus$LIBSUF
-charcoal               libmltplus$LIBSUF
-invert                 libmltplus$LIBSUF
-sepia                  libmltplus$LIBSUF
-EOF
-
-cat << EOF >> ../transitions.dat
-affine                 libmltplus$LIBSUF
-EOF
-
-cat << EOF >> ../consumers.dat
-EOF
-
-fi
index 2ff28657ebe6ce732bbd1023ced00fb010f8e2c4..2666f7ffb437774eddf4951dc7f06b544677981e 100644 (file)
@@ -27,32 +27,11 @@ extern mlt_filter filter_invert_init( mlt_profile profile, mlt_service_type type
 extern mlt_filter filter_sepia_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 extern mlt_transition transition_affine_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 
-void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
+MLT_REPOSITORY
 {
-       return NULL;
-}
-
-void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       if ( !strcmp( id, "affine" ) )
-               return filter_affine_init( profile, type, id, arg );
-       if ( !strcmp( id, "charcoal" ) )
-               return filter_charcoal_init( profile, type, id, arg );
-       if ( !strcmp( id, "invert" ) )
-               return filter_invert_init( profile, type, id, arg );
-       if ( !strcmp( id, "sepia" ) )
-               return filter_sepia_init( profile, type, id, arg );
-       return NULL;
-}
-
-void *mlt_create_transition( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       if ( !strcmp( id, "affine" ) )
-               return transition_affine_init( profile, type, id, arg );
-       return NULL;
-}
-
-void *mlt_create_consumer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
+       MLT_REGISTER( filter_type, "affine", filter_affine_init );
+       MLT_REGISTER( filter_type, "charcoal", filter_charcoal_init );
+       MLT_REGISTER( filter_type, "invert", filter_invert_init );
+       MLT_REGISTER( filter_type, "sepia", filter_sepia_init );
+       MLT_REGISTER( transition_type, "affine", transition_affine_init );
 }
index 0e648f00fb5f5228cc77b704f5603ae12fc2e1a5..559404da603ad47611fb91c50278bf8f53de0c15 100755 (executable)
@@ -71,7 +71,6 @@ else
                        echo QTCXXFLAGS=-I$qimage_includedir >> config.mak
                        echo QTLIBS=-L$qimage_libdir/lib -lqt-mt >> config.mak
                fi
-               echo qimage             libmltqimage$LIBSUF >> ../producers.dat
        else
                echo "qimage: QT environment not found - disabling"
                touch ../disable-qimage
index f9d58860fd33bf0ca9b7d23f2ce3624096ee39bd..61cb0ec0ee25a9040a0db607e0d77a194fbf4dd3 100644 (file)
 
 extern mlt_producer producer_qimage_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 
-void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
+MLT_REPOSITORY
 {
-       if ( !strcmp( id, "qimage" ) )
-               return producer_qimage_init( profile, type, id, arg );
-       return NULL;
+       MLT_REGISTER( producer_type, "qimage", producer_qimage_init );
 }
-
-void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_transition( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_consumer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
index 58dd85be638ca511ddf1e8037daf55cd477c0925..954cb048c596199488645b5bb7a59a73e5bb4bfa 100755 (executable)
@@ -6,13 +6,11 @@ then
        pkg-config samplerate 2> /dev/null
        disable_samplerate=$?
 
-       if [ "$disable_samplerate" = "0" ]
+       if [ "$disable_samplerate" != "0" ]
        then
-               echo "resample          libmltresample$LIBSUF" >> ../filters.dat
-       else
                echo "- libsamplerate not found: disabling"
                touch ../disable-resample
        fi
-
+       exit 0
 fi
 
index 769e96e952d2b804f39bc18b06ed685412d98c99..c61ec5162079d365093a5a70dd666d4f4b8f21ab 100644 (file)
 
 extern mlt_filter filter_resample_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 
-void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
+MLT_REPOSITORY
 {
-       return NULL;
+       MLT_REGISTER( filter_type, "resample", filter_resample_init );
 }
-
-void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       if ( !strcmp( id, "resample" ) )
-               return filter_resample_init( profile, type, id, arg );
-       return NULL;
-}
-
-void *mlt_create_transition( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_consumer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
index af5568c436c10b5aa7b1e800970ca42c0b26dd1e..43b90d9c9265fe5e94dd1c6bc6c4862f88d6e5ab 100755 (executable)
@@ -10,18 +10,14 @@ then
        then
                echo > config.mak
                image=`sdl-config --prefix`/include/SDL/SDL_image.h
-               echo "sdl                               libmltsdl$LIBSUF" >> ../consumers.dat
-               echo "sdl_preview               libmltsdl$LIBSUF" >> ../consumers.dat
-               echo "sdl_still                 libmltsdl$LIBSUF" >> ../consumers.dat
                if [ -f "$image" ]
                then
-                       echo "sdl_image                 libmltsdl$LIBSUF" >> ../producers.dat
                        echo "WITH_SDL_IMAGE=1" >> config.mak
                fi
        else
                echo "- sdl development libs not found: disabling"
                touch ../disable-sdl
        fi
-
+       exit 0
 fi
 
index 6ec79c003083a3d158cf165759b9882457c0b032..68301c2f39b0e209a60521f0b7ff1f5be1ef2910 100644 (file)
@@ -29,33 +29,12 @@ extern mlt_consumer consumer_sdl_preview_init( mlt_profile profile, mlt_service_
 extern mlt_producer producer_sdl_image_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 #endif
 
-void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
+MLT_REPOSITORY
 {
+       MLT_REGISTER( consumer_type, "sdl", consumer_sdl_init );
+       MLT_REGISTER( consumer_type, "sdl_preview", consumer_sdl_preview_init );
+       MLT_REGISTER( consumer_type, "sdl_still", consumer_sdl_still_init );
 #ifdef WITH_SDL_IMAGE
-       if ( !strcmp( id, "sdl_image" ) )
-               return producer_sdl_image_init( profile, type, id, arg );
+       MLT_REGISTER( producer_type, "sdl_image", producer_sdl_image_init );
 #endif
-       return NULL;
 }
-
-void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_transition( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_consumer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       if ( !strcmp( id, "sdl" ) )
-               return consumer_sdl_init( profile, type, id, arg );
-       if ( !strcmp( id, "sdl_still" ) )
-               return consumer_sdl_still_init( profile, type, id, arg );
-       if ( !strcmp( id, "sdl_preview" ) )
-               return consumer_sdl_preview_init( profile, type, id, arg );
-       return NULL;
-}
-
index e306c0b99b6167af294bb96dd45f55c1a89b94b5..c29d40a1762d2a8eec829f18bc3b08b068276b64 100755 (executable)
@@ -15,15 +15,15 @@ then
                if [ $disable_sox -eq 0 ]
                then
                        LIBDIR=lib
-                       #bits=$(uname -m)
-                       #case $bits in
-                       #x86_64)
-                       #       export LIBDIR=lib64
-                       #       ;;
-                       #*)
-                       #       export LIBDIR=lib
-                       #       ;;
-                       #esac
+                       bits=$(uname -m)
+                       case $bits in
+                       x86_64)
+                               [ -d /usr/lib/lib64 ] && export LIBDIR=lib64 || export LIBDIR=lib
+                               ;;
+                       *)
+                               export LIBDIR=lib
+                               ;;
+                       esac
 
                        sox=$(which sox)
                        # chop sox
@@ -35,12 +35,11 @@ then
                fi
        fi
 
-       if [ "$disable_sox" = "0" ]
+       if [ "$disable_sox" != "0" ]
        then
-               echo "sox               libmltsox$LIBSUF" >> ../filters.dat
-       else
                echo "- sox not found: disabling"
                touch ../disable-sox
        fi
 
+       exit 0
 fi
index fc6448d2b47d90a1dbd98e8c290bf38640882b06..048d3bc500ea08256a7846d6e7c933f204e32968 100644 (file)
 
 extern mlt_filter filter_sox_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 
-void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
+MLT_REPOSITORY
 {
-       return NULL;
-}
-
-void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       if ( !strcmp( id, "sox" ) )
-               return filter_sox_init( profile, type, id, arg );
-       return NULL;
-}
-
-void *mlt_create_transition( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_consumer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
+       MLT_REGISTER( filter_type, "sox", filter_sox_init );
 }
diff --git a/src/modules/valerie/configure b/src/modules/valerie/configure
deleted file mode 100755 (executable)
index 4149c6d..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-if [ "$help" != "1" ]
-then
-
-cat << EOF >> ../consumers.dat
-valerie                        libmltvalerie$LIBSUF
-EOF
-
-fi
-
index affef35ffec51a2eef2c113b481bcf454e97603e..6dcae27e5dab6a55edffab89ebbb4a2a762f3474 100644 (file)
 
 extern mlt_consumer consumer_valerie_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 
-void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
+MLT_REPOSITORY
 {
-       return NULL;
+       MLT_REGISTER( consumer_type, "valerie", consumer_valerie_init );
 }
-
-void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_transition( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_consumer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       if ( !strcmp( id, "valerie" ) )
-               return consumer_valerie_init( profile, type, id, arg );
-       return NULL;
-}
-
diff --git a/src/modules/vmfx/configure b/src/modules/vmfx/configure
deleted file mode 100755 (executable)
index 70339bb..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-if [ "$help" != "1" ]
-then
-
-cat << EOF >> ../producers.dat
-pgm                            libmltvmfx$LIBSUF
-EOF
-
-cat << EOF >> ../filters.dat
-chroma                 libmltvmfx$LIBSUF
-chroma_hold            libmltvmfx$LIBSUF
-threshold              libmltvmfx$LIBSUF
-shape                  libmltvmfx$LIBSUF
-EOF
-
-cat << EOF >> ../transitions.dat
-EOF
-
-cat << EOF >> ../consumers.dat
-EOF
-
-fi
index 7dac57669c9901d3561f1b1e264fa21e7f60753b..3477bb8aa8b560536dd502a9ca781e92618577d4 100644 (file)
@@ -27,32 +27,11 @@ extern mlt_filter filter_mono_init( mlt_profile profile, mlt_service_type type,
 extern mlt_filter filter_shape_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 extern mlt_producer producer_pgm_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 
-void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
+MLT_REPOSITORY
 {
-       if ( !strcmp( id, "pgm" ) )
-               return producer_pgm_init( profile, type, id, arg );
-       return NULL;
-}
-
-void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       if ( !strcmp( id, "chroma" ) )
-               return filter_chroma_init( profile, type, id, arg );
-       if ( !strcmp( id, "chroma_hold" ) )
-               return filter_chroma_hold_init( profile, type, id, arg );
-       if ( !strcmp( id, "threshold" ) )
-               return filter_mono_init( profile, type, id, arg );
-       if ( !strcmp( id, "shape" ) )
-               return filter_shape_init( profile, type, id, arg );
-       return NULL;
-}
-
-void *mlt_create_transition( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_consumer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
+       MLT_REGISTER( filter_type, "chroma", filter_chroma_init );
+       MLT_REGISTER( filter_type, "chroma_hold", filter_chroma_hold_init );
+       MLT_REGISTER( filter_type, "threshold", filter_mono_init );
+       MLT_REGISTER( filter_type, "shape", filter_shape_init );
+       MLT_REGISTER( producer_type, "pgm", producer_pgm_init );
 }
index bfc404327c7f370f98643ec073a2d6a2b1b0d568..2f8c1178125f4257c502ed6e8737ddb69b30eeae 100755 (executable)
@@ -6,13 +6,11 @@ then
        pkg-config vorbisfile 2> /dev/null
        disable_vorbis=$?
 
-       if [ "$disable_vorbis" = "0" ]
+       if [ "$disable_vorbis" != "0" ]
        then
-               echo "vorbis            libmltvorbis$LIBSUF" >> ../producers.dat
-       else
                echo "- ogg vorbis not found: disabling"
                touch ../disable-vorbis
        fi
-
+       exit 0
 fi
 
index 080e151843a1fb4229fd50aff824fd0a1091be38..3df2e7524f72a6cc0c569b78f4a5696afbe7ad5b 100644 (file)
 
 extern mlt_producer producer_vorbis_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 
-void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
+MLT_REPOSITORY
 {
-       if ( !strcmp( id, "vorbis" ) )
-               return producer_vorbis_init( profile, type, id, arg );
-       return NULL;
+       MLT_REGISTER( producer_type, "vorbis", producer_vorbis_init );
 }
-
-void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_transition( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_consumer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
index 65cbb5f13217c8512119e6f285d055627b4cc877..53aacd25fa97b5384758bf276492264e35080656 100755 (executable)
@@ -6,14 +6,11 @@ then
        which xml2-config > /dev/null 2>&1
        disable_xml2=$?
 
-       if [ "$disable_xml2" = "0" ]
+       if [ "$disable_xml2" != "0" ]
        then
-               echo "westley                   libmltwestley$LIBSUF" >> ../producers.dat
-               echo "westley-xml               libmltwestley$LIBSUF" >> ../producers.dat
-               echo "westley                   libmltwestley$LIBSUF" >> ../consumers.dat
-       else
                echo "- xml2 not found: disabling westley modules"
                touch ../disable-westley
        fi
+       exit 0
 fi
 
index 91ed5d14d6e298c837dc71c4be48c3970fd428fe..87853f897613d015be442311a2e1afceb8a6425c 100644 (file)
 extern mlt_consumer consumer_westley_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 extern mlt_producer producer_westley_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 
-void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
+MLT_REPOSITORY
 {
-       if ( !strcmp( id, "westley" ) )
-               return producer_westley_init( profile, type, id, arg );
-       if ( !strcmp( id, "westley-xml" ) )
-               return producer_westley_init( profile, type, id, arg );
-       return NULL;
+       MLT_REGISTER( consumer_type, "westley", consumer_westley_init );
+       MLT_REGISTER( producer_type, "westley", producer_westley_init );
+       MLT_REGISTER( producer_type, "westley-xml", producer_westley_init );
 }
-
-void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_transition( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_consumer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       if ( !strcmp( id, "westley" ) )
-               return consumer_westley_init( profile, type, id, arg );
-       return NULL;
-}
-
index d3211294d0d422c1f12d0be5ac0523dbbabe8192..f7b80d29516ab29d92f0521710f66348bd4e2487 100755 (executable)
@@ -7,12 +7,11 @@ then
        grep mmx /proc/cpuinfo > /dev/null 2>&1
        disable_xine=$?
 
-       if [ "$disable_xine" = "0" ]
+       if [ "$disable_xine" != "0" ]
        then
-               echo "deinterlace               libmltxine$LIBSUF" >> ../filters.dat
-       else
                echo "- MMX Capabalities not found: disabling xine deinterlacing module"
                touch ../disable-xine
        fi
+       exit 0
 fi
 
index bdcf50db787ed356e737424c29c6ef4e2d1c5a5e..11d2c15bbb509d81aa56c4670110cea98a3cc9f1 100644 (file)
 
 extern mlt_filter filter_deinterlace_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 
-void *mlt_create_producer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
+MLT_REPOSITORY
 {
-       return NULL;
-}
-
-void *mlt_create_filter( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       if ( !strcmp( id, "deinterlace" ) )
-               return filter_deinterlace_init( profile, type, id, arg );
-       return NULL;
-}
-
-void *mlt_create_transition( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
-}
-
-void *mlt_create_consumer( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
-{
-       return NULL;
+       MLT_REGISTER( filter_type, "deinterlace", filter_deinterlace_init );
 }