struct mlt_repository_s
{
struct mlt_properties_s parent;
- mlt_properties object_list;
};
static char *construct_full_file( char *output, char *prefix, char *file )
static mlt_properties construct_object( char *prefix, char *id )
{
mlt_properties output = mlt_properties_new( );
- mlt_properties_init( output, NULL );
mlt_properties_set( output, "prefix", prefix );
mlt_properties_set( output, "id", id );
return output;
static mlt_properties construct_service( mlt_properties object, char *id )
{
mlt_properties output = mlt_properties_new( );
- mlt_properties_init( output, NULL );
mlt_properties_set_data( output, "object", object, 0, NULL, NULL );
mlt_properties_set( output, "id", id );
return output;
construct_full_file( full_file, prefix, file );
// Open the shared object
- object = dlopen( full_file, RTLD_NOW | RTLD_GLOBAL );
- if ( object == NULL )
+ object = dlopen( full_file, RTLD_NOW );
+ if ( object != NULL )
+ {
+ // Set it on the properties
+ mlt_properties_set_data( object_properties, "dlopen", object, 0, ( mlt_destructor )dlclose, NULL );
+ }
+ else
+ {
fprintf( stderr, "Failed to load plugin: %s\n", dlerror() );
-
- // Set it on the properties
- mlt_properties_set_data( object_properties, "dlopen", object, 0, ( void (*)( void * ) )dlclose, NULL );
+ }
}
// Now check if we have this symbol pointer
// Add the symbol to THIS repository properties.
mlt_properties_set( &this->parent, "_symbol", symbol );
- // Asociate the repository to the global object_list
- this->object_list = object_list;
-
// Construct full file
construct_full_file( full_file, prefix, data );
+ strcat( full_file, ".dat" );
// Open the file
file = fopen( full_file, "r" );