return value;
}
-static int filter_scale( mlt_frame this, uint8_t **image, mlt_image_format *format, int iwidth, int iheight, int owidth, int oheight )
+static int filter_scale( mlt_frame frame, uint8_t **image, mlt_image_format *format, int iwidth, int iheight, int owidth, int oheight )
{
// Get the properties
- mlt_properties properties = MLT_FRAME_PROPERTIES( this );
+ mlt_properties properties = MLT_FRAME_PROPERTIES( frame );
// Get the requested interpolation method
char *interps = mlt_properties_get( properties, "rescale.interp" );
if ( alpha_size > 0 && alpha_size != ( owidth * oheight ) )
{
// Create the context and output image
- uint8_t *alpha = mlt_frame_get_alpha_mask( this );
+ uint8_t *alpha = mlt_frame_get_alpha_mask( frame );
if ( alpha )
{
avformat = PIX_FMT_GRAY8;
sws_freeContext( context );
// Set it back on the frame
- mlt_properties_set_data( MLT_FRAME_PROPERTIES( this ), "alpha", output.data[0], owidth * oheight, mlt_pool_release, NULL );
+ mlt_properties_set_data( MLT_FRAME_PROPERTIES( frame ), "alpha", output.data[0], owidth * oheight, mlt_pool_release, NULL );
}
}
}
// Create a new scaler
- mlt_filter this = mlt_factory_filter( profile, "rescale", NULL );
+ mlt_filter filter = mlt_factory_filter( profile, "rescale", NULL );
// If successful, then initialise it
- if ( this != NULL )
+ if ( filter != NULL )
{
// Get the properties
- mlt_properties properties = MLT_FILTER_PROPERTIES( this );
+ mlt_properties properties = MLT_FILTER_PROPERTIES( filter );
// Set the inerpolation
mlt_properties_set( properties, "interpolation", "bilinear" );
mlt_properties_set_data( properties, "method", filter_scale, 0, NULL, NULL );
}
- return this;
+ return filter;
}