Merge ../mlt
[melted] / src / modules / motion_est / factory.c
index 742367d..1df0929 100644 (file)
  */
 
 #include <string.h>
+#include <framework/mlt.h>
 
-#include "filter_motion_est.h"
+extern mlt_filter filter_motion_est_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
+extern mlt_filter filter_vismv_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
+extern mlt_filter filter_crop_detect_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
+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 );
 
-extern mlt_filter filter_motion_est_init(char *);
-extern mlt_filter filter_vismv_init(char *);
-extern mlt_filter filter_crop_detect_init(char *);
-extern mlt_filter filter_autotrack_rectangle_init(char *);
-
-void *mlt_create_filter( char *id, void *arg )
+MLT_REPOSITORY
 {
-       if ( !strcmp( id, "motion_est" ) )
-               return filter_motion_est_init( arg );
-       if ( !strcmp( id, "vismv" ) )
-               return filter_vismv_init( arg );
-       if ( !strcmp( id, "crop_detect" ) )
-               return filter_crop_detect_init( arg );
-       if ( !strcmp( id, "autotrack_rectangle" ) )
-               return filter_autotrack_rectangle_init( 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 );
 }