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 );
28 // Register producers(s) with a multitrack object
29 mlt_multitrack multitrack = mlt_multitrack_init( );
30 mlt_multitrack_connect( multitrack, dv1, 0 );
31 mlt_multitrack_connect( multitrack, dv2, 1 );
33 // Create a filter and associate it to track 0
34 mlt_filter filter = mlt_factory_filter( "deinterlace", NULL );
35 mlt_filter_connect( filter, mlt_multitrack_service( multitrack ), 0 );
36 mlt_filter_set_in_and_out( filter, 0, 1000 );
38 // Define a transition
39 mlt_transition transition = mlt_factory_transition( "composite", NULL );
40 mlt_transition_connect( transition, mlt_filter_service( filter ), 0, 1 );
41 mlt_transition_set_in_and_out( transition, 0, 1000 );
43 // Buy a tractor and connect it to the filter
44 mlt_tractor tractor = mlt_tractor_init( );
45 mlt_tractor_connect( tractor, mlt_transition_service( transition ) );
47 // Connect the tractor to the consumer
48 mlt_consumer_connect( sdl_out, mlt_tractor_service( tractor ) );
50 // Do stuff until we're told otherwise...
51 fprintf( stderr, "Press return to continue\n" );
52 fgets( temp, 132, stdin );
54 // Close everything...
55 //mlt_consumer_close( sdl_out );
56 //mlt_tractor_close( tractor );
57 //mlt_filter_close( filter );
58 //mlt_multitrack_close( multitrack );
59 //mlt_producer_close( dv1 );
60 //mlt_producer_close( dv2 );