]> git.sesse.net Git - mlt/commitdiff
fixes for westley deserialise, preview handling and tokenising amendment
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Sun, 31 Oct 2004 15:28:33 +0000 (15:28 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Sun, 31 Oct 2004 15:28:33 +0000 (15:28 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@495 d19143bc-622f-0410-bfdd-b5b2a6649095

src/framework/mlt_tokeniser.c
src/modules/fezzik.dict
src/modules/gtk2/factory.c
src/modules/inigo/producer_inigo.c
src/modules/sdl/consumer_sdl_preview.c
src/modules/westley/producer_westley.c

index 053b36f196f1dfeeab090ecffa30beaa399df7b1..619a4898ae143b3201524d355511a51d435d08e4 100644 (file)
@@ -102,7 +102,7 @@ int mlt_tokeniser_parse_new( mlt_tokeniser tokeniser, char *string, char *delimi
                {
                        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, "" );
index 53da9bddd67214ccb51712b0345444b237168ccf..8e98b38f87987402a95a050384b9dfde930e6390 100644 (file)
@@ -1,4 +1,5 @@
 http://*=avformat
+<?xml*=westley-xml
 *.westley=westley
 *.inigo=inigo_file
 *.asf=avformat
index b7cca9b35079624819f856e04ac805e651a98f81..5fd196244f5e7cbb1f941a05f9a14559f975d736 100644 (file)
 #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" ) )
@@ -37,7 +47,7 @@ void *mlt_create_producer( char *id, void *arg )
 
 void *mlt_create_filter( char *id, void *arg )
 {
-       g_type_init( );
+       initialise( );
        if ( !strcmp( id, "gtkrescale" ) )
                return filter_rescale_init( arg );
        return NULL;
@@ -50,7 +60,7 @@ void *mlt_create_transition( char *id, void *arg )
 
 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;
index 80aee87c5d3a2f07e41c94324fc294b6e0a231ff..5367d4ea0f5be805b5fe7edb256abb2450af76b1 100644 (file)
@@ -359,7 +359,7 @@ mlt_producer producer_inigo_init( char **argv )
                                        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 ] );
                }
@@ -367,7 +367,7 @@ mlt_producer producer_inigo_init( char **argv )
                {
                        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 )
index 4b7e11691fad1396984650e6013dad6b100e2490..5415ed3c8280b5c5322ba56dc7d8e587f224cebd 100644 (file)
@@ -80,6 +80,7 @@ mlt_consumer consumer_sdl_preview_init( char *arg )
                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;
@@ -196,6 +197,9 @@ static void *consumer_thread( void *arg )
        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." );
 
@@ -204,9 +208,6 @@ static void *consumer_thread( void *arg )
        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 );
 
index eb022cdf8ffaab7f426906be6553d7a442af6e4b..40e94c14ce8c07f3341309de0f49359d923aa4ce 100644 (file)
@@ -550,7 +550,7 @@ static void on_end_producer( deserialise_context context, const xmlChar *name )
                                        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
@@ -559,7 +559,7 @@ static void on_end_producer( deserialise_context context, const xmlChar *name )
                                        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 );
                }