X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodules%2Fvideostab%2Ffilter_videostab2.c;h=63d2374c0826eda83976573ff9ed432973ba8bbf;hb=e847902313efa55aeb46ba102433ccddb046edeb;hp=474c7f7fa48990473e5c1fda464f3e55966c96a0;hpb=24647b4d299b1416c1d484f5c1d10e766b4f597e;p=mlt diff --git a/src/modules/videostab/filter_videostab2.c b/src/modules/videostab/filter_videostab2.c index 474c7f7f..63d2374c 100644 --- a/src/modules/videostab/filter_videostab2.c +++ b/src/modules/videostab/filter_videostab2.c @@ -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" );