2 #include <framework/mlt.h>
6 int main( int argc
, char **argv
)
12 mlt_factory_init( "../modules" );
19 // Start the consumer...
20 int vstd
= mlt_video_standard_ntsc
;
21 mlt_consumer consumer
= mlt_factory_consumer( "bluefish", &vstd
);
22 mlt_properties_set_int( mlt_consumer_properties( consumer
), "video_standard", mlt_video_standard_ntsc
);
24 // Create the producer(s)
25 mlt_producer dv1
= mlt_factory_producer( "mcmpeg", file1
);
28 // Connect the tractor to the consumer
29 mlt_consumer_connect( consumer
, mlt_producer_service( dv1
) );
31 // Do stuff until we're told otherwise...
32 fprintf( stderr
, "Press return to continue\n" );
33 fgets( temp
, 132, stdin
);
34 mlt_consumer_close( consumer
);
38 //mlt_producer dv1 = producer_pixbuf_init( file1 );
39 //mlt_producer dv2 = producer_libdv_init( file2 );
40 //mlt_producer dv2 = mlt_factory_producer( "pixbuf", file2 );
41 mlt_producer dv2
= mlt_factory_producer( "pango", "<span font_desc=\"Sans Bold 36\">Mutton <span font_desc=\"Luxi Serif Bold Oblique 36\">Lettuce</span> Tomato</span>" );
42 mlt_properties_set_int( mlt_producer_properties( dv2
), "video_standard", mlt_video_standard_ntsc
);
43 mlt_properties_set_int( mlt_producer_properties( dv2
), "bgcolor", 0x0000007f );
44 mlt_properties_set_int( mlt_producer_properties( dv2
), "pad", 8 );
46 // Register producers(s) with a multitrack object
47 mlt_multitrack multitrack
= mlt_multitrack_init( );
48 mlt_multitrack_connect( multitrack
, dv1
, 0 );
49 mlt_multitrack_connect( multitrack
, dv2
, 1 );
51 // Create a filter and associate it to track 0
52 // mlt_filter filter = mlt_factory_filter( "deinterlace", NULL );
53 // mlt_filter_connect( filter, mlt_multitrack_service( multitrack ), 0 );
54 // mlt_filter_set_in_and_out( filter, 0, 1000 );
56 // Define a transition
57 mlt_transition transition
= mlt_factory_transition( "composite", NULL
);
58 mlt_transition_connect( transition
, mlt_multitrack_service( multitrack
), 0, 1 );
59 mlt_transition_set_in_and_out( transition
, 0, 1000 );
61 // Buy a tractor and connect it to the filter
62 mlt_tractor tractor
= mlt_tractor_init( );
63 mlt_tractor_connect( tractor
, mlt_transition_service( transition
) );
65 // Connect the tractor to the consumer
66 mlt_consumer_connect( consumer
, mlt_tractor_service( tractor
) );
68 // Do stuff until we're told otherwise...
69 fprintf( stderr
, "Press return to continue\n" );
70 fgets( temp
, 132, stdin
);
72 // Close everything...
73 mlt_consumer_close( consumer
);
74 mlt_tractor_close( tractor
);
75 //mlt_filter_close( filter );
76 mlt_multitrack_close( multitrack
);
77 mlt_producer_close( dv1
);
78 mlt_producer_close( dv2
);