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