]> git.sesse.net Git - mlt/commitdiff
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 df416f0db9d25d86bc046c3be3f0b9ed511996dc..b1f5c25dd1c4342d3e848c489cd2f9e2e5a1e221 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 22c3510bb4d7236f74e5b9b013016d56726cc233..9a0d9f3a647c32fd550cbf257642b9747b5a15a5 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 e47358484cb2c94c46b955d4717f3600386de9ae..781238d5dd2444da1e3195afa4693b50982e99c6 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 dc6baa5cdfea5009e164a316163b74b88c95dce9..18aa86bb7212878e4e4c89f7cca0132ddd0d64a0 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 );
                }
        }