/** Construct the factories.
*/
-int mlt_factory_init( char *prefix )
+int mlt_factory_init( const char *prefix )
{
// Only initialise once
if ( mlt_prefix == NULL )
/** Get a value from the environment.
*/
-char *mlt_environment( char *name )
+char *mlt_environment( const char *name )
{
return mlt_properties_get( global_properties, name );
}
/** Fetch a producer from the repository.
*/
-mlt_producer mlt_factory_producer( char *service, void *input )
+mlt_producer mlt_factory_producer( const char *service, void *input )
{
mlt_producer obj = NULL;
/** Fetch a filter from the repository.
*/
-mlt_filter mlt_factory_filter( char *service, void *input )
+mlt_filter mlt_factory_filter( const char *service, void *input )
{
mlt_filter obj = NULL;
/** Fetch a transition from the repository.
*/
-mlt_transition mlt_factory_transition( char *service, void *input )
+mlt_transition mlt_factory_transition( const char *service, void *input )
{
mlt_transition obj = NULL;
/** Fetch a consumer from the repository
*/
-mlt_consumer mlt_factory_consumer( char *service, void *input )
+mlt_consumer mlt_factory_consumer( const char *service, void *input )
{
mlt_consumer obj = NULL;
#include "mlt_types.h"
-extern int mlt_factory_init( char *prefix );
+extern int mlt_factory_init( const char *prefix );
extern const char *mlt_factory_prefix( );
-extern char *mlt_environment( char *name );
+extern char *mlt_environment( const char *name );
extern mlt_properties mlt_factory_event_object( );
-extern mlt_producer mlt_factory_producer( char *name, void *input );
-extern mlt_filter mlt_factory_filter( char *name, void *input );
-extern mlt_transition mlt_factory_transition( char *name, void *input );
-extern mlt_consumer mlt_factory_consumer( char *name, void *input );
+extern mlt_producer mlt_factory_producer( const char *name, void *input );
+extern mlt_filter mlt_factory_filter( const char *name, void *input );
+extern mlt_transition mlt_factory_transition( const char *name, void *input );
+extern mlt_consumer mlt_factory_consumer( const char *name, void *input );
extern void mlt_factory_register_for_clean_up( void *ptr, mlt_destructor destructor );
extern void mlt_factory_close( );
struct mlt_properties_s parent;
};
-static char *construct_full_file( char *output, char *prefix, char *file )
+static char *construct_full_file( char *output, const char *prefix, const char *file )
{
strcpy( output, prefix );
if ( prefix[ strlen( prefix ) - 1 ] != '/' )
return input;
}
-static mlt_properties construct_object( char *prefix, char *id )
+static mlt_properties construct_object( const char *prefix, const char *id )
{
mlt_properties output = mlt_properties_new( );
mlt_properties_set( output, "prefix", prefix );
return output;
}
-static mlt_properties construct_service( mlt_properties object, char *id )
+static mlt_properties construct_service( mlt_properties object, const char *id )
{
mlt_properties output = mlt_properties_new( );
mlt_properties_set_data( output, "object", object, 0, NULL, NULL );
return output;
}
-static void *construct_instance( mlt_properties service_properties, char *symbol, void *input )
+static void *construct_instance( mlt_properties service_properties, const char *symbol, void *input )
{
// Extract the service
char *service = mlt_properties_get( service_properties, "id" );
void *object = mlt_properties_get_data( object_properties, "dlopen", NULL );
// Get the dlsym'd symbol
- void *( *symbol_ptr )( char *, void * ) = mlt_properties_get_data( object_properties, symbol, NULL );
+ void *( *symbol_ptr )( const char *, void * ) = mlt_properties_get_data( object_properties, symbol, NULL );
// Check that we have object and open if we don't
if ( object == NULL )
return symbol_ptr != NULL ? symbol_ptr( service, input ) : NULL;
}
-mlt_repository mlt_repository_init( mlt_properties object_list, char *prefix, char *data, char *symbol )
+mlt_repository mlt_repository_init( mlt_properties object_list, const char *prefix, const char *data, const char *symbol )
{
char full_file[ 512 ];
FILE *file;
return this;
}
-void *mlt_repository_fetch( mlt_repository this, char *service, void *input )
+void *mlt_repository_fetch( mlt_repository this, const char *service, void *input )
{
// Get the service properties
mlt_properties service_properties = mlt_properties_get_data( &this->parent, service, NULL );
/** Public functions.
*/
-extern mlt_repository mlt_repository_init( mlt_properties object_list, char *prefix, char *file, char *symbol );
-extern void *mlt_repository_fetch( mlt_repository self, char *service, void *input );
+extern mlt_repository mlt_repository_init( mlt_properties object_list, const char *prefix, const char *file, const char *symbol );
+extern void *mlt_repository_fetch( mlt_repository self, const char *service, void *input );
extern void mlt_repository_close( mlt_repository self );
#endif