]> git.sesse.net Git - mlt/blobdiff - src/swig/ruby/thumbs.rb
Complete reorganization and renaming to usable state.
[mlt] / src / swig / ruby / thumbs.rb
index 9cb6799545255fa09cec3d1be35a7ffcfacda211..7e83a593b16cce43c6c32cb0d885b0990d3aa543 100755 (executable)
@@ -1,13 +1,13 @@
 #!/usr/bin/env ruby
 
 # Required modules
-require 'mltpp'
+require 'mlt'
 
 # Create the mlt system
-Mltpp::Factory::init
+mlt::Factory::init
 
 # Establish the mlt profile
-profile = Mltpp::Profile.new( "quarter_pal" )
+profile = mlt::Profile.new( "quarter_pal" )
 
 # Get and check the argument
 file = ARGV.shift
@@ -17,11 +17,11 @@ size = "176x144" if size.nil?
 raise "Usage: thumbs.rb file name [ size ]" if file.nil? || name.nil?
 
 # Create the producer
-producer = Mltpp::Producer.new( profile, file )
+producer = mlt::Producer.new( profile, file )
 raise "Unable to load #{file}" if !producer.is_valid
 
 # Construct the playlist
-playlist = Mltpp::Playlist.new( )
+playlist = mlt::Playlist.new( )
 
 # Get the out point
 out = producer.get_int( "out" );
@@ -30,7 +30,7 @@ out = producer.get_int( "out" );
 [ 0, 0.25, 0.5, 0.75, 1 ].each { |x| playlist.append( producer, Integer(x*out), Integer(x*out) ) }
 
 # Create the thumb nail generator
-generator = Mltpp::Consumer.new( profile, "avformat", "#{name}%d.jpg" )
+generator = mlt::Consumer.new( profile, "avformat", "#{name}%d.jpg" )
 generator.set( "real_time", "0" )
 generator.set( "progressive", "1" )
 generator.set( "s", size )