]> git.sesse.net Git - mlt/blobdiff - src/modules/core/transition_luma.c
move binary modules to libdir - affects MLT_REPOSITORY
[mlt] / src / modules / core / transition_luma.c
index f8ce18a79e7b7296746fff5b19a4c89d1e3e42e5..55e9e3efe72a5e8198dbcd7442a2a527d24064b7 100644 (file)
@@ -3,6 +3,9 @@
  * Copyright (C) 2003-2004 Ushodaya Enterprises Limited
  * Author: Dan Dennedy <dan@dennedy.org>
  *
+ * Adapted from Kino Plugin Timfx, which is
+ * Copyright (C) 2002 Timothy M. Shead <tshead@k-3d.com>
+ *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
@@ -18,7 +21,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include "transition_luma.h"
 #include <framework/mlt.h>
 
 #include <stdio.h>
@@ -395,7 +397,7 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f
                if ( strchr( resource, '%' ) )
                {
                        FILE *test;
-                       sprintf( temp, "%s/lumas/%s/%s", mlt_factory_prefix( ), mlt_environment( "MLT_NORMALISATION" ), strchr( resource, '%' ) + 1 );
+                       sprintf( temp, "%s/lumas/%s/%s", mlt_environment( "MLT_DATA" ), mlt_environment( "MLT_NORMALISATION" ), strchr( resource, '%' ) + 1 );
                        test = fopen( temp, "r" );
                        if ( test == NULL )
                                strcat( temp, ".png" );
@@ -428,7 +430,8 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f
                        char *factory = mlt_properties_get( properties, "factory" );
 
                        // Create the producer
-                       mlt_producer producer = mlt_factory_producer( factory, resource );
+                       mlt_profile profile = mlt_service_profile( MLT_TRANSITION_SERVICE( transition ) );
+                       mlt_producer producer = mlt_factory_producer( profile, factory, resource );
 
                        // If we have one
                        if ( producer != NULL )
@@ -560,7 +563,7 @@ static mlt_frame transition_process( mlt_transition transition, mlt_frame a_fram
 /** Constructor for the filter.
 */
 
-mlt_transition transition_luma_init( char *lumafile )
+mlt_transition transition_luma_init( mlt_profile profile, mlt_service_type type, const char *id, char *lumafile )
 {
        mlt_transition transition = mlt_transition_new( );
        if ( transition != NULL )