3 # Import required modules
6 # Create the mlt system
9 # Establish the mlt profile
10 profile
= Mltpp
::Profile.new
12 # Get and check the argument
14 raise
"Usage: test.rb file" if file
.nil?
17 producer
= Mltpp
::Factory::producer( profile
, file )
18 raise
"Unable to load #{file}" if !producer
.is_valid
21 consumer
= Mltpp
::Consumer.new( profile
, "sdl" )
22 raise
"Unable to open sdl consumer" if !consumer
.is_valid
24 # Turn off the default rescaling
25 consumer
.set( "rescale", "none" )
27 # Set up a 'wait for' event
28 event
= consumer
.setup_wait_for( "consumer-stopped" )
33 # Connect the producer to the consumer
34 consumer
.connect( producer )
36 # Wait until the user stops the consumer
37 consumer
.wait_for( event )