2 #include <framework/mlt.h>
6 int main( int argc
, char **argv
)
12 mlt_factory_init( "../modules" );
19 // Start the consumer...
20 mlt_consumer sdl_out
= mlt_factory_consumer( "sdl", NULL
);
22 // Create the producer(s)
23 mlt_producer dv1
= mlt_factory_producer( "libdv", file1
);
24 //mlt_producer dv1 = producer_pixbuf_init( file1 );
25 //mlt_producer dv2 = producer_libdv_init( file2 );
26 //mlt_producer dv2 = mlt_factory_producer( "pixbuf", file2 );
27 mlt_producer dv2
= mlt_factory_producer( "pango", "<span font_desc=\"Sans Bold 24\">Mutton Lettuce Tomato</span>" );
29 // Register producers(s) with a multitrack object
30 mlt_multitrack multitrack
= mlt_multitrack_init( );
31 mlt_multitrack_connect( multitrack
, dv1
, 0 );
32 mlt_multitrack_connect( multitrack
, dv2
, 1 );
34 // Create a filter and associate it to track 0
35 mlt_filter filter
= mlt_factory_filter( "deinterlace", NULL
);
36 mlt_filter_connect( filter
, mlt_multitrack_service( multitrack
), 0 );
37 mlt_filter_set_in_and_out( filter
, 0, 1000 );
39 // Define a transition
40 mlt_transition transition
= mlt_factory_transition( "composite", NULL
);
41 mlt_transition_connect( transition
, mlt_filter_service( filter
), 0, 1 );
42 mlt_transition_set_in_and_out( transition
, 0, 1000 );
44 // Buy a tractor and connect it to the filter
45 mlt_tractor tractor
= mlt_tractor_init( );
46 mlt_tractor_connect( tractor
, mlt_transition_service( transition
) );
48 // Connect the tractor to the consumer
49 mlt_consumer_connect( sdl_out
, mlt_tractor_service( tractor
) );
51 // Do stuff until we're told otherwise...
52 fprintf( stderr
, "Press return to continue\n" );
53 fgets( temp
, 132, stdin
);
55 // Close everything...
56 //mlt_consumer_close( sdl_out );
57 //mlt_tractor_close( tractor );
58 //mlt_filter_close( filter );
59 //mlt_multitrack_close( multitrack );
60 //mlt_producer_close( dv1 );
61 //mlt_producer_close( dv2 );