X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_filter.c;h=d83e42fbd4436848164b64e9cad6baabffa3d61b;hb=72b3bc4629d011be72a82a7c5351d49271af200b;hp=6e39e7971a04185e5e4b5abfe4d52b30d8b7117b;hpb=7c518e80321a87a22d2e48835442c9f5b70dcd17;p=melted diff --git a/src/framework/mlt_filter.c b/src/framework/mlt_filter.c index 6e39e79..d83e42f 100644 --- a/src/framework/mlt_filter.c +++ b/src/framework/mlt_filter.c @@ -54,6 +54,17 @@ int mlt_filter_init( mlt_filter this, void *child ) return 1; } +/** Create a new filter. +*/ + +mlt_filter mlt_filter_new( ) +{ + mlt_filter this = calloc( 1, sizeof( struct mlt_filter_s ) ); + if ( this != NULL ) + mlt_filter_init( this, NULL ); + return this; +} + /** Get the service associated to this filter */ @@ -62,6 +73,9 @@ mlt_service mlt_filter_service( mlt_filter this ) return &this->parent; } +/** Get the properties associated to this filter. +*/ + mlt_properties mlt_filter_properties( mlt_filter this ) { return mlt_service_properties( mlt_filter_service( this ) ); @@ -128,7 +142,7 @@ mlt_position mlt_filter_get_out( mlt_filter this ) /** Process the frame. */ -static mlt_frame filter_process( mlt_filter this, mlt_frame frame ) +mlt_frame mlt_filter_process( mlt_filter this, mlt_frame frame ) { if ( this->process == NULL ) return frame; @@ -154,12 +168,9 @@ static int filter_get_frame( mlt_service service, mlt_frame_ptr frame, int index int ret = mlt_service_get_frame( this->producer, frame, index ); if ( ret == 0 ) { - if ( !mlt_frame_is_test_card( *frame ) ) - { - mlt_position position = mlt_frame_get_position( *frame ); - if ( position >= in && ( out == 0 || position < out ) ) - *frame = filter_process( this, *frame ); - } + mlt_position position = mlt_frame_get_position( *frame ); + if ( position >= in && ( out == 0 || position < out ) ) + *frame = mlt_filter_process( this, *frame ); return 0; } else