X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Favformat%2Ffactory.c;h=fe2d65f2e487ecd63770b44c9200992af3128626;hb=b92d5da5f5adff2046024e06e3cbe9fa9d51c5f4;hp=c197d901e68029b4e08abafa12584e55f9a1db94;hpb=d33f444d4ef4c7bc4074d07a49eca0ab7d108394;p=melted diff --git a/src/modules/avformat/factory.c b/src/modules/avformat/factory.c index c197d90..fe2d65f 100644 --- a/src/modules/avformat/factory.c +++ b/src/modules/avformat/factory.c @@ -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; -} -