]> git.sesse.net Git - mlt/blobdiff - src/modules/videostab/filter_videostab2.c
Convert backtick to $(shell) in Makefiles.
[mlt] / src / modules / videostab / filter_videostab2.c
index 474c7f7fa48990473e5c1fda464f3e55966c96a0..63d2374c0826eda83976573ff9ed432973ba8bbf 100644 (file)
@@ -134,6 +134,13 @@ static int filter_get_image( mlt_frame frame, uint8_t **image, mlt_image_format
                // Service locks are for concurrency control
                mlt_service_lock( MLT_FILTER_SERVICE( filter ) );
 
+               // Handle signal from app to re-init data
+               if ( mlt_properties_get_int( MLT_FILTER_PROPERTIES(filter) , "refresh" ) )
+               {
+                       mlt_properties_set( MLT_FILTER_PROPERTIES(filter) , "refresh", NULL );
+                       data->initialized = 0;
+               }
+
                if ( !vectors) {
                        if ( !data->initialized )
                        {
@@ -172,7 +179,7 @@ static int filter_get_image( mlt_frame frame, uint8_t **image, mlt_image_format
                                        // Load analysis results from property
                                        data->initialized = 2;
 
-                                       int interp = 2;
+                                       int interp = 2; // default to bilinear
                                        float scale_zoom=1.0;
                                        if ( *width != mlt_properties_get_int( MLT_FRAME_PROPERTIES( frame ), "meta.media.width" ) )
                                                scale_zoom = (float) *width / (float) mlt_properties_get_int( MLT_FRAME_PROPERTIES( frame ), "meta.media.width" );
@@ -180,17 +187,11 @@ static int filter_get_image( mlt_frame frame, uint8_t **image, mlt_image_format
                                                interp = 0;
                                        else if ( strcmp( interps, "tiles" ) == 0 || strcmp( interps, "fast_bilinear" ) == 0 )
                                                interp = 1;
-                                       else if ( strcmp( interps, "bilinear" ) == 0 )
-                                               interp = 2;
-                                       else if ( strcmp( interps, "bicubic" ) == 0 )
-                                               interp = 3;
-                                       else if ( strcmp( interps, "bicublin" ) == 0 )
-                                               interp = 4;
 
                                        data->trans->interpoltype = interp;
                                        data->trans->smoothing = mlt_properties_get_int( MLT_FILTER_PROPERTIES(filter), "smoothing" );
                                        data->trans->maxshift = mlt_properties_get_int( MLT_FILTER_PROPERTIES(filter), "maxshift" );
-                                       data->trans->maxangle = mlt_properties_get_int( MLT_FILTER_PROPERTIES(filter), "maxangle" );
+                                       data->trans->maxangle = mlt_properties_get_double( MLT_FILTER_PROPERTIES(filter), "maxangle" );
                                        data->trans->crop = mlt_properties_get_int( MLT_FILTER_PROPERTIES(filter), "crop" );
                                        data->trans->invert = mlt_properties_get_int( MLT_FILTER_PROPERTIES(filter), "invert" );
                                        data->trans->relative = mlt_properties_get_int( MLT_FILTER_PROPERTIES(filter), "relative" );