]> git.sesse.net Git - mlt/blobdiff - src/modules/opengl/filter_movit_crop.cpp
Rename glsl_manager.h to filter_glsl_manager.h, to be consistent with the .cpp file.
[mlt] / src / modules / opengl / filter_movit_crop.cpp
index 1bacd1a71230b8f581f7ce0174e41486cad7e9a7..1c346460ae69ade1d880409f904326c56bdab8e3 100644 (file)
@@ -21,7 +21,7 @@
 #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 )
@@ -51,6 +51,8 @@ static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format
        // 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.
@@ -74,6 +76,7 @@ static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format
 
                mlt_log_debug( MLT_FILTER_SERVICE(filter), "%dx%d -> %dx%d\n", *width, *height, owidth, oheight);
 
+               GlslManager::get_instance()->lock_service( frame );
                Effect* effect = GlslManager::get_effect( filter, frame );
                if ( effect ) {
                        bool ok = effect->set_int( "width", owidth );
@@ -84,6 +87,7 @@ static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format
                        *width = owidth;
                        *height = oheight;
                }
+               GlslManager::get_instance()->unlock_service( frame );
        }
 
        return error;