Constness changes
[melted] / src / modules / core / filter_data_show.c
index 3dfd7cb..d62bd58 100644 (file)
@@ -18,7 +18,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include "filter_data.h"
 #include <framework/mlt.h>
 #include <stdlib.h>
 #include <string.h>
@@ -51,9 +50,9 @@ static mlt_filter obtain_filter( mlt_filter filter, char *type )
 
                // If none is specified, pick up the default for this normalisation
                if ( profile == NULL )
-                       sprintf( temp, "%s/feeds/%s/data_fx.properties", mlt_factory_prefix( ), mlt_environment( "MLT_NORMALISATION" ) );
+                       sprintf( temp, "%s/feeds/%s/data_fx.properties", mlt_environment( "MLT_DATA" ), mlt_environment( "MLT_NORMALISATION" ) );
                else if ( strchr( profile, '%' ) )
-                       sprintf( temp, "%s/feeds/%s/%s", mlt_factory_prefix( ), mlt_environment( "MLT_NORMALISATION" ), strchr( profile, '%' ) + 1 );
+                       sprintf( temp, "%s/feeds/%s/%s", mlt_environment( "MLT_DATA" ), mlt_environment( "MLT_NORMALISATION" ), strchr( profile, '%' ) + 1 );
                else
                        strcpy( temp, profile );
 
@@ -72,7 +71,7 @@ static mlt_filter obtain_filter( mlt_filter filter, char *type )
                        char *value = mlt_properties_get_value( profile_properties, i );
        
                        if ( result == NULL && !strcmp( name, type ) && result == NULL )
-                               result = mlt_factory_filter( value, NULL );
+                               result = mlt_factory_filter( mlt_service_profile( MLT_FILTER_SERVICE( filter ) ), value, NULL );
                        else if ( result != NULL && !strncmp( name, type, type_len ) && name[ type_len ] == '.' )
                                mlt_properties_set( MLT_FILTER_PROPERTIES( result ), name + type_len + 1, value );
                        else if ( result != NULL )
@@ -145,7 +144,7 @@ static int process_feed( mlt_properties feed, mlt_filter filter, mlt_frame frame
        {
                int i = 0;
                mlt_properties properties = MLT_FILTER_PROPERTIES( requested );
-               static char *prefix = "properties.";
+               static const char *prefix = "properties.";
                int len = strlen( prefix );
 
                // Determine if this is an absolute or relative feed
@@ -206,7 +205,7 @@ static int process_feed( mlt_properties feed, mlt_filter filter, mlt_frame frame
                                                                {
                                                                        // special case: replace #timecode# with current frame timecode
                                                                        int pos = mlt_properties_get_int( feed, "position" );
-                                                                       char *tc = frame_to_timecode( pos, mlt_profile_fps( NULL ) );
+                                                                       char *tc = frame_to_timecode( pos, mlt_profile_fps( mlt_service_profile( MLT_FILTER_SERVICE( filter ) ) ) );
                                                                        strcat( result, tc );
                                                                        free( tc );
                                                                }
@@ -321,7 +320,7 @@ static mlt_frame filter_process( mlt_filter this, mlt_frame frame )
 /** Constructor for the filter.
 */
 
-mlt_filter filter_data_show_init( char *arg )
+mlt_filter filter_data_show_init( mlt_profile profile, mlt_service_type type, const char *id, void *arg )
 {
        // Create the filter
        mlt_filter this = mlt_filter_new( );