#include <string.h>
#include <assert.h>
-#include "glsl_manager.h"
+#include "filter_glsl_manager.h"
#include <movit/padding_effect.h>
static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format, int *width, int *height, int writable )
// Get the image as requested
// *format = (mlt_image_format) mlt_properties_get_int( MLT_PRODUCER_PROPERTIES(producer), "_movit image_format" );
*format = mlt_image_none;
+ if ( mlt_properties_get_int( properties, "test_image" ) )
+ *format = mlt_image_yuv422;
error = mlt_frame_get_image( frame, image, format, width, height, writable );
// Skip processing if requested.
mlt_log_debug( MLT_FILTER_SERVICE(filter), "%dx%d -> %dx%d\n", *width, *height, owidth, oheight);
- Effect* effect = GlslManager::get_effect( filter, frame );
+ GlslManager::get_instance()->lock_service( frame );
+ Effect* effect = GlslManager::get_effect( MLT_FILTER_SERVICE( filter ), frame );
if ( effect ) {
bool ok = effect->set_int( "width", owidth );
ok |= effect->set_int( "height", oheight );
*width = owidth;
*height = oheight;
}
+ GlslManager::get_instance()->unlock_service( frame );
}
return error;
{
mlt_producer producer = mlt_producer_cut_parent( mlt_frame_get_original_producer( frame ) );
if ( !GlslManager::init_chain( MLT_PRODUCER_SERVICE(producer) ) ) {
- Effect* effect = GlslManager::add_effect( filter, frame, new PaddingEffect );
+ Effect* effect = GlslManager::add_effect( MLT_FILTER_SERVICE( filter ), frame, new PaddingEffect );
RGBATuple border_color( 0.0f, 0.0f, 0.0f, 1.0f );
bool ok = effect->set_vec4( "border_color", (float*) &border_color );
assert(ok);