Merge ../mlt
[melted] / mlt++ / src / MltFilter.cpp
index 90a178e..6fbc93a 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 #include "MltFilter.h"
+#include "MltProfile.h"
 using namespace Mlt;
 
-Filter::Filter( char *id, char *arg ) :
+Filter::Filter( Profile& profile, const char *id, const char *arg ) :
        instance( NULL )
 {
        if ( arg != NULL )
        {
-               instance = mlt_factory_filter( id, arg );
+               instance = mlt_factory_filter( profile.get_profile(), id, arg );
        }
        else
        {
@@ -37,12 +38,12 @@ Filter::Filter( char *id, char *arg ) :
                        char *temp = strdup( id );
                        char *arg = strchr( temp, ':' ) + 1;
                        *( arg - 1 ) = '\0';
-                       instance = mlt_factory_filter( temp, arg );
+                       instance = mlt_factory_filter( profile.get_profile(), temp, arg );
                        free( temp );
                }
                else
                {
-                       instance = mlt_factory_filter( id, NULL );
+                       instance = mlt_factory_filter( profile.get_profile(), id, NULL );
                }
        }
 }
@@ -58,6 +59,7 @@ Filter::Filter( Service &filter ) :
 }
 
 Filter::Filter( Filter &filter ) :
+       Mlt::Service( filter ),
        instance( filter.get_filter( ) )
 {
        inc_ref( );