#include <framework/mlt.h>
-mlt_producer producer_inigo_init( mlt_profile profile, char **argv );
+mlt_producer producer_inigo_init( mlt_profile profile, mlt_service_type type, const char *id, char **argv );
-mlt_producer producer_inigo_file_init( mlt_profile profile, char *file )
+mlt_producer producer_inigo_file_init( mlt_profile profile, mlt_service_type type, const char *id, char *file )
{
FILE *input = fopen( file, "r" );
char **args = calloc( sizeof( char * ), 1000 );
}
}
- mlt_producer result = producer_inigo_init( profile, args );
+ mlt_producer result = producer_inigo_init( profile, type, id, args );
if ( result != NULL )
{
return transition;
}
-mlt_producer producer_inigo_init( mlt_profile profile, char **argv )
+mlt_producer producer_inigo_init( mlt_profile profile, mlt_service_type type, const char *id, char **argv )
{
int i;
int track = 0;
mlt_properties_set_int( field_properties, "registered", 0 );
// Parse the arguments
+ if ( argv )
for ( i = 0; argv[ i ] != NULL; i ++ )
{
if ( !strcmp( argv[ i ], "-group" ) )
properties = MLT_PRODUCER_PROPERTIES( producer );
mlt_properties_inherit( properties, group );
}
+ else
+ {
+ fprintf( stderr, "Failed to load \"%s\"\n", argv[ i ] );
+ }
}
else
{
- if ( !strcmp( argv[ i ], "-serialise" ) )
- i += 2;
- else if ( !strcmp( argv[ i ], "-consumer" ) )
- i += 2;
- else if ( !strcmp( argv[ i ], "-profile" ) )
+ int backtrack = 0;
+ if ( !strcmp( argv[ i ], "-serialise" ) ||
+ !strcmp( argv[ i ], "-consumer" ) ||
+ !strcmp( argv[ i ], "-profile" ) )
+ {
i += 2;
+ backtrack = 1;
+ }
while ( argv[ i ] != NULL && strchr( argv[ i ], '=' ) )
+ {
i ++;
-
- i --;
+ backtrack = 1;
+ }
+ if ( backtrack )
+ i --;
}
}