From: lilo_booter Date: Tue, 17 Aug 2004 15:22:07 +0000 (+0000) Subject: Fixes for mods to api X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=6a622d4b2d78aa761d94b77c40c2b9b3fe2168ed;p=melted Fixes for mods to api git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt++@375 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/mlt++/swig/java/Play.java b/mlt++/swig/java/Play.java index 3bf0e47..3f6b4c8 100644 --- a/mlt++/swig/java/Play.java +++ b/mlt++/swig/java/Play.java @@ -32,7 +32,7 @@ public class Play { // Wait until the user stops the consumer Object o = new Object(); - while (c.is_stopped() == 0) { + while ( !c.is_stopped() ) { synchronized (o) { try { o.wait(1000); diff --git a/mlt++/swig/ruby/play.rb b/mlt++/swig/ruby/play.rb index 0c54864..793a618 100755 --- a/mlt++/swig/ruby/play.rb +++ b/mlt++/swig/ruby/play.rb @@ -12,11 +12,11 @@ raise "Usage: test.rb file" if file.nil? # Create the producer producer = Mltpp::Factory::producer( file ) -raise "Unable to load #{file}" if producer.is_valid == 0 +raise "Unable to load #{file}" if !producer.is_valid # Create the consumer -consumer = Mltpp::Factory::consumer( "sdl" ) -raise "Unable to open sdl consumer" if consumer.is_valid == 0 +consumer = Mltpp::Consumer.new( "sdl" ) +raise "Unable to open sdl consumer" if !consumer.is_valid # Turn off the default rescaling consumer.set( "rescale", "none" ) @@ -28,7 +28,7 @@ consumer.start consumer.connect( producer ) # Wait until the user stops the consumer -while consumer.is_stopped == 0 +while !consumer.is_stopped sleep( 1 ) end diff --git a/mlt++/swig/ruby/thumbs.rb b/mlt++/swig/ruby/thumbs.rb index 22970dd..a110cf8 100755 --- a/mlt++/swig/ruby/thumbs.rb +++ b/mlt++/swig/ruby/thumbs.rb @@ -15,7 +15,7 @@ raise "Usage: thumbs.rb file name [ size ]" if file.nil? || name.nil? # Create the producer producer = Mltpp::Factory::producer( file ) -raise "Unable to load #{file}" if producer.is_valid == 0 +raise "Unable to load #{file}" if !producer.is_valid # Construct the playlist playlist = Mltpp::PlaylistInstance.new( ) @@ -37,7 +37,7 @@ generator.connect( playlist ); generator.start # Wait until we're done -while generator.is_stopped == 0 +while !generator.is_stopped sleep 1 end