{
strncat( token, start, end - start );
index += end - start;
- if ( token[ 0 ] != '\"' || ( token[ 0 ] == '\"' && token[ strlen( token ) - 1 ] == '\"' ) )
+ if ( strchr( token, '\"' ) == NULL || token[ strlen( token ) - 1 ] == '\"' )
{
mlt_tokeniser_append( tokeniser, token );
strcpy( token, "" );
http://*=avformat
+<?xml*=westley-xml
*.westley=westley
*.inigo=inigo_file
*.asf=avformat
#include "producer_pango.h"
#include "filter_rescale.h"
+static void initialise( )
+{
+ static int init = 0;
+ if ( init == 0 )
+ {
+ init = 1;
+ g_type_init( );
+ }
+}
+
void *mlt_create_producer( char *id, void *arg )
{
- g_type_init( );
+ initialise( );
if ( !strcmp( id, "pixbuf" ) )
return producer_pixbuf_init( arg );
else if ( !strcmp( id, "pango" ) )
void *mlt_create_filter( char *id, void *arg )
{
- g_type_init( );
+ initialise( );
if ( !strcmp( id, "gtkrescale" ) )
return filter_rescale_init( arg );
return NULL;
void *mlt_create_consumer( char *id, void *arg )
{
- g_type_init( );
+ initialise( );
if ( !strcmp( id, "gtk2_preview" ) )
return consumer_gtk2_preview_init( arg );
return NULL;
mlt_properties_set_int( properties, "hide", 2 );
}
}
- else if ( strchr( argv[ i ], '=' ) )
+ else if ( strchr( argv[ i ], '=' ) && strstr( argv[ i ], "<?xml" ) != argv[ i ] )
{
mlt_properties_parse( properties, argv[ i ] );
}
{
if ( producer != NULL && !mlt_producer_is_cut( producer ) )
mlt_playlist_append( playlist, producer );
- if ( title == NULL )
+ if ( title == NULL && strstr( argv[ i ], "<?xml" ) != argv[ i ] )
title = argv[ i ];
producer = create_producer( field, argv[ i ] );
if ( producer != NULL )
this->play = mlt_factory_consumer( "sdl", arg );
this->still = mlt_factory_consumer( "sdl_still", arg );
mlt_properties_set( mlt_consumer_properties( parent ), "real_time", "0" );
+ mlt_properties_set( mlt_consumer_properties( parent ), "rescale", "nearest" );
parent->close = consumer_close;
parent->start = consumer_start;
parent->stop = consumer_stop;
mlt_properties_set( play, "height", mlt_properties_get( properties, "height" ) );
mlt_properties_set( still, "height", mlt_properties_get( properties, "height" ) );
+ mlt_properties_set_int( play, "progressive", 1 );
+ mlt_properties_set_int( still, "progressive", 1 );
+
mlt_properties_pass( play, mlt_consumer_properties( consumer ), "play." );
mlt_properties_pass( still, mlt_consumer_properties( consumer ), "still." );
mlt_properties_set_data( play, "app_unlock", mlt_properties_get_data( properties, "app_unlock", NULL ), 0, NULL, NULL );
mlt_properties_set_data( still, "app_unlock", mlt_properties_get_data( properties, "app_unlock", NULL ), 0, NULL, NULL );
- mlt_properties_set_int( play, "progressive", 1 );
- mlt_properties_set_int( still, "progressive", 1 );
-
mlt_properties_set_int( play, "put_mode", 1 );
mlt_properties_set_int( still, "put_mode", 1 );
else
{
// Otherwise, set in and out on producer directly
- mlt_producer_set_in_and_out( MLT_PRODUCER( service ), in, out );
+ mlt_producer_set_in_and_out( MLT_PRODUCER( producer ), in, out );
}
}
else
mlt_producer_set_in_and_out( MLT_PRODUCER( producer ), in, out );
}
}
-
+
// Push the producer onto the stack
context_push_service( context, producer, mlt_producer_type );
}