X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fcore%2Ffactory.c;h=9157ce18e5cb337466b0ee3dd79608fd2054027a;hb=22be595e8fbe06332714ee47e1fc1f4b6a718c45;hp=1d037a0685f75237a381b273218080cd4a266bea;hpb=2e4eb8e703760fb408f86152451aeaf425f6a579;p=melted diff --git a/src/modules/core/factory.c b/src/modules/core/factory.c index 1d037a0..9157ce1 100644 --- a/src/modules/core/factory.c +++ b/src/modules/core/factory.c @@ -3,86 +3,75 @@ * Copyright (C) 2003-2004 Ushodaya Enterprises Limited * Author: Charles Yates * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include -#include "producer_ppm.h" -#include "filter_brightness.h" -#include "filter_gamma.h" -#include "filter_luma.h" -#include "filter_greyscale.h" -#include "filter_obscure.h" -#include "filter_resize.h" -#include "filter_region.h" -#include "filter_volume.h" -#include "filter_watermark.h" -#include "producer_colour.h" +extern mlt_consumer consumer_null_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); +extern mlt_filter filter_brightness_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); +extern mlt_filter filter_channelcopy_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); +extern mlt_filter filter_data_feed_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); +extern mlt_filter filter_data_show_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); +extern mlt_filter filter_gamma_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); +extern mlt_filter filter_greyscale_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); +extern mlt_filter filter_luma_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); +extern mlt_filter filter_mirror_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); +extern mlt_filter filter_mono_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); +extern mlt_filter filter_obscure_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); +extern mlt_filter filter_region_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); +extern mlt_filter filter_rescale_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); +extern mlt_filter filter_resize_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); +extern mlt_filter filter_transition_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); +extern mlt_filter filter_watermark_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); +extern mlt_producer producer_colour_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); +extern mlt_producer producer_consumer_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); +extern mlt_producer producer_noise_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); +extern mlt_producer producer_ppm_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); #include "transition_composite.h" -#include "transition_luma.h" -#include "transition_mix.h" +extern mlt_transition transition_luma_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); +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( char *id, void *arg ) +MLT_REPOSITORY { - if ( !strcmp( id, "colour" ) ) - return producer_colour_init( arg ); - if ( !strcmp( id, "ppm" ) ) - return producer_ppm_init( 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, "consumer", producer_consumer_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 ); } - -void *mlt_create_filter( char *id, void *arg ) -{ - if ( !strcmp( id, "brightness" ) ) - return filter_brightness_init( arg ); - if ( !strcmp( id, "gamma" ) ) - return filter_gamma_init( arg ); - if ( !strcmp( id, "greyscale" ) ) - return filter_greyscale_init( arg ); - if ( !strcmp( id, "luma" ) ) - return filter_luma_init( arg ); - if ( !strcmp( id, "obscure" ) ) - return filter_obscure_init( arg ); - if ( !strcmp( id, "region" ) ) - return filter_region_init( arg ); - if ( !strcmp( id, "resize" ) ) - return filter_resize_init( arg ); - if ( !strcmp( id, "volume" ) ) - return filter_volume_init( arg ); - if ( !strcmp( id, "watermark" ) ) - return filter_watermark_init( arg ); - return NULL; -} - -void *mlt_create_transition( char *id, void *arg ) -{ - if ( !strcmp( id, "composite" ) ) - return transition_composite_init( arg ); - if ( !strcmp( id, "luma" ) ) - return transition_luma_init( arg ); - if ( !strcmp( id, "mix" ) ) - return transition_mix_init( arg ); - if ( !strcmp( id, "region" ) ) - return transition_region_init( arg ); - return NULL; -} - -void *mlt_create_consumer( char *id, void *arg ) -{ - return NULL; -} -