* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "config.h"
#include <string.h>
#include <framework/mlt.h>
#include <gdk/gdk.h>
}
}
-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( );
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 );
return NULL;
}
+static mlt_properties metadata( mlt_service_type type, const char *id, void *data )
+{
+ char file[ PATH_MAX ];
+ snprintf( file, PATH_MAX, "%s/gtk2/%s", mlt_environment( "MLT_DATA" ), (char*) data );
+ return mlt_properties_parse_yaml( file );
+}
+
+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 );
+
+ MLT_REGISTER_METADATA( consumer_type, "gtk2_preview", metadata, "consumer_gtk2_preview.yml" );
+ MLT_REGISTER_METADATA( filter_type, "gtkrescale", metadata, "filter_rescale.yml" );
+ MLT_REGISTER_METADATA( producer_type, "pango", metadata, "producer_pango.yml" );
+ MLT_REGISTER_METADATA( producer_type, "pixbuf", metadata, "producer_pixbuf.yml" );
+}