draw_rectangle_outline(*image, boundry.x, boundry.y, boundry.w, boundry.h, 100);
}
+ if( mlt_properties_get_int( filter_properties, "obscure" ) == 1 )
+ {
+ mlt_filter obscure = mlt_properties_get_data( filter_properties, "_obscure", NULL );
+
+ mlt_properties_pass_list( MLT_FILTER_PROPERTIES(obscure), filter_properties, "in, out");
+
+ // Because filter_obscure needs to be rewritten to use mlt_geometry
+ char geom[100];
+ sprintf( geom, "%d,%d:%dx%d", (int)boundry.x, (int)boundry.y, (int)boundry.w, (int)boundry.h );
+ mlt_properties_set( MLT_FILTER_PROPERTIES( obscure ), "start", geom );
+ mlt_properties_set( MLT_FILTER_PROPERTIES( obscure ), "end", geom );
+ }
+
+
return error;
}
if( mlt_properties_get_int( MLT_FILTER_PROPERTIES(this), "debug" ) == 1 )
{
mlt_filter vismv = mlt_properties_get_data( MLT_FILTER_PROPERTIES(this), "_vismv", NULL );
- if( vismv == NULL ) {
+ if( vismv == NULL )
+ {
vismv = mlt_factory_filter( "vismv", NULL );
mlt_properties_set_data( MLT_FILTER_PROPERTIES(this), "_vismv", vismv, 0, (mlt_destructor)mlt_filter_close, NULL );
}
mlt_filter_process( vismv, frame );
}
+ if( mlt_properties_get_int( MLT_FILTER_PROPERTIES(this), "obscure" ) == 1 )
+ {
+ mlt_filter obscure = mlt_properties_get_data( MLT_FILTER_PROPERTIES(this), "_obscure", NULL );
+ if( obscure == NULL )
+ {
+ obscure = mlt_factory_filter( "obscure", NULL );
+ mlt_properties_set_data( MLT_FILTER_PROPERTIES(this), "_obscure", obscure, 0, (mlt_destructor)mlt_filter_close, NULL );
+ }
+
+ mlt_filter_process( obscure, frame );
+ }
return frame;
}
}
- // ... and attach it to the frame
+ // ... and attach it to the filter
mlt_properties_set_data( MLT_FILTER_PROPERTIES(this), "geometry", geometry, 0, (mlt_destructor)mlt_geometry_close, (mlt_serialiser)mlt_geometry_serialise );
- // create an instance of the motion_est filter
- mlt_filter motion_est = mlt_factory_filter("motion_est", NULL);
+ // create an instance of the motion_est and obscure filter
+ mlt_filter motion_est = mlt_factory_filter( "motion_est", NULL );
if( motion_est != NULL )
mlt_properties_set_data( MLT_FILTER_PROPERTIES(this), "_motion_est", motion_est, 0, (mlt_destructor)mlt_filter_close, NULL );
else {