X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=mlt%2B%2B%2Fswig%2Fruby%2Fplay.rb;fp=mlt%2B%2B%2Fswig%2Fruby%2Fplay.rb;h=793a618dd6482afc3d2a0209dcc3c803aca6b593;hb=6a622d4b2d78aa761d94b77c40c2b9b3fe2168ed;hp=0c548643bd613d30bb1611b97b4a4b12489aa9b2;hpb=1d262eab5f8850bf2603a405e09ad213341f4ab7;p=melted 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