Fix for deep westleys and filter in/out points
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Wed, 13 Oct 2004 16:01:05 +0000 (16:01 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Wed, 13 Oct 2004 16:01:05 +0000 (16:01 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@475 d19143bc-622f-0410-bfdd-b5b2a6649095

src/framework/mlt_service.c
src/modules/fezzik/producer_fezzik.c
src/modules/valerie/consumer_valerie.c
src/modules/westley/producer_westley.c

index df416f0..b1f5c25 100644 (file)
@@ -319,8 +319,8 @@ void mlt_service_apply_filters( mlt_service this, mlt_frame frame, int index )
                                mlt_position out = mlt_filter_get_out( base->filters[ i ] );
                                if ( ( in == 0 && out == 0 ) || ( position >= in && ( position <= out || out == 0 ) ) )
                                {
-                                       mlt_properties_set_position( frame_properties, "in", 0 );
-                                       mlt_properties_set_position( frame_properties, "out", out == 0 ? this_out - this_in : out - in );
+                                       mlt_properties_set_position( frame_properties, "in", in == 0 ? this_in : in );
+                                       mlt_properties_set_position( frame_properties, "out", out == 0 ? this_out : out );
                                        mlt_filter_process( base->filters[ i ], frame );
                                        mlt_service_apply_filters( mlt_filter_service( base->filters[ i ] ), frame, index + 1 );
                                }
index 22c3510..9a0d9f3 100644 (file)
@@ -167,7 +167,7 @@ mlt_producer producer_fezzik_init( char *arg )
                properties = mlt_producer_properties( producer );
 
        // Attach filters if we have a producer and it isn't already westley'd :-)
-       if ( producer != NULL && mlt_properties_get( properties, "westley" ) == NULL )
+       if ( producer != NULL && mlt_properties_get( properties, "westley" ) == NULL && mlt_properties_get( properties, "_westley" ) == NULL )
                attach_normalisers( producer );
 
        // Now make sure we don't lose our identity
index e473584..781238d 100644 (file)
@@ -42,15 +42,28 @@ mlt_consumer consumer_valerie_init( char *arg )
        // If no malloc'd and consumer init ok
        if ( this != NULL && mlt_consumer_init( this, NULL ) == 0 )
        {
-               // Allow thread to be started/stopped
-               this->start = consumer_start;
-               this->is_stopped = consumer_is_stopped;
+               if ( arg != NULL && strchr( arg, ':' ) )
+               {
+                       char *temp = NULL;
+                       int port = atoi( strchr( arg, ':' ) + 1 );
+                       mlt_properties_set( mlt_consumer_properties( this ), "server", arg );
+                       temp = mlt_properties_get( mlt_consumer_properties( this ), "server" );
+                       *( strchr( temp, ':' ) ) = '\0';
+                       mlt_properties_set_int( mlt_consumer_properties( this ), "port", port );
+               }
+               else
+               {
+                       mlt_properties_set( mlt_consumer_properties( this ), "server", arg == NULL ? "localhost" : arg );
+                       mlt_properties_set_int( mlt_consumer_properties( this ), "port", 5250 );
+               }
 
-               mlt_properties_set( mlt_consumer_properties( this ), "server", arg == NULL ? "localhost" : arg );
-               mlt_properties_set_int( mlt_consumer_properties( this ), "port", 5250 );
                mlt_properties_set_int( mlt_consumer_properties( this ), "unit", 0 );
                mlt_properties_set( mlt_consumer_properties( this ), "command", "append" );
 
+               // Allow thread to be started/stopped
+               this->start = consumer_start;
+               this->is_stopped = consumer_is_stopped;
+
                // Return the consumer produced
                return this;
        }
index dc6baa5..18aa86b 100644 (file)
@@ -1400,6 +1400,7 @@ mlt_producer producer_westley_init( int info, char *data )
                else
                {
                        // Allow the project to be edited
+                       mlt_properties_set( properties, "_westley", "was here" );
                        mlt_properties_set_int( properties, "_mlt_service_hidden", 1 );
                }
        }