]> git.sesse.net Git - mlt/commitdiff
mlt_filter.c
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Wed, 20 Jul 2005 06:32:10 +0000 (06:32 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Wed, 20 Jul 2005 06:32:10 +0000 (06:32 +0000)
mlt_service.c
+ Filter disable property

git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@772 d19143bc-622f-0410-bfdd-b5b2a6649095

src/framework/mlt_filter.c
src/framework/mlt_service.c

index 6ca7afb4b960fdf2fb6e32ee81690745ab6d12bd..e97d6e075147ba13507e180ac622c1a4b87b5465 100644 (file)
@@ -147,7 +147,8 @@ mlt_position mlt_filter_get_out( mlt_filter this )
 
 mlt_frame mlt_filter_process( mlt_filter this, mlt_frame frame )
 {
-       if ( this->process == NULL )
+       int disable = mlt_properties_get_int( MLT_FILTER_PROPERTIES( this ), "disable" );
+       if ( disable || this->process == NULL )
                return frame;
        else
                return this->process( this, frame );
index 1301fd27eaacc9cf61903edb9049585d48efac3e..75e598cc93feea4eea2580e5e3bded776105e186 100644 (file)
@@ -338,7 +338,8 @@ void mlt_service_apply_filters( mlt_service this, mlt_frame frame, int index )
                        {
                                mlt_position in = mlt_filter_get_in( base->filters[ i ] );
                                mlt_position out = mlt_filter_get_out( base->filters[ i ] );
-                               if ( ( in == 0 && out == 0 ) || ( position >= in && ( position <= out || out == 0 ) ) )
+                               int disable = mlt_properties_get_int( MLT_FILTER_PROPERTIES( base->filters[ i ] ), "disable" );
+                               if ( !disable && ( in == 0 && out == 0 ) || ( position >= in && ( position <= out || out == 0 ) ) )
                                {
                                        mlt_properties_set_position( frame_properties, "in", in == 0 ? this_in : in );
                                        mlt_properties_set_position( frame_properties, "out", out == 0 ? this_out : out );