X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=mlt%2Fsrc%2Ftests%2Fdan.c;h=d62abdf446d51437de910edecd3ae89b40e4b47e;hb=5eaaebf5e1be0e5d2d02d70c1150a40ee49774ae;hp=cdfd211839fd7e7247bc8837a04ef1428f692f00;hpb=fc579010c07e3daa94db446a9623d9bb996892d2;p=melted
diff --git a/mlt/src/tests/dan.c b/mlt/src/tests/dan.c
index cdfd211..d62abdf 100644
--- a/mlt/src/tests/dan.c
+++ b/mlt/src/tests/dan.c
@@ -18,15 +18,19 @@ int main( int argc, char **argv )
// Start the consumer...
int vstd = mlt_video_standard_ntsc;
- mlt_consumer consumer = mlt_factory_consumer( "bluefish", &vstd );
- mlt_properties_set_int( mlt_consumer_properties( consumer ), "video_standard", mlt_video_standard_ntsc );
+ //mlt_consumer consumer = mlt_factory_consumer( "bluefish", &vstd );
+ mlt_consumer consumer = mlt_factory_consumer( "westley", "PAL" );
// Create the producer(s)
- mlt_producer dv1 = mlt_factory_producer( "mcmpeg", file1 );
+ mlt_producer dv1 = mlt_factory_producer( "libdv", file1 );
+ mlt_producer_set_in_and_out( dv1, 0, 5 );
+
+ mlt_producer dv2 = mlt_factory_producer( "libdv", file2 );
+ //mlt_producer_set_in_and_out( dv2, 10.0, 30.0 );
#if 0
- // Connect the tractor to the consumer
- mlt_consumer_connect( consumer, mlt_producer_service( dv1 ) );
+ // Connect the consumer to the producer
+ mlt_consumer_connect( consumer, mlt_producer_service( dv2 ) );
// Do stuff until we're told otherwise...
fprintf( stderr, "Press return to continue\n" );
@@ -38,25 +42,42 @@ int main( int argc, char **argv )
//mlt_producer dv1 = producer_pixbuf_init( file1 );
//mlt_producer dv2 = producer_libdv_init( file2 );
//mlt_producer dv2 = mlt_factory_producer( "pixbuf", file2 );
- mlt_producer dv2 = mlt_factory_producer( "pango", "Mutton Lettuce Tomato" );
- mlt_properties_set_int( mlt_producer_properties( dv2 ), "video_standard", mlt_video_standard_ntsc );
- mlt_properties_set_int( mlt_producer_properties( dv2 ), "bgcolor", 0x0000007f );
- mlt_properties_set_int( mlt_producer_properties( dv2 ), "pad", 8 );
+#if 0
+ mlt_producer title = mlt_factory_producer( "pango", NULL ); //"Mutton Lettuce Tomato" );
+ mlt_properties_set_int( mlt_producer_properties( title ), "video_standard", mlt_video_standard_ntsc );
+ mlt_properties_set( mlt_producer_properties( title ), "font", "Sans Bold 36" );
+ mlt_properties_set( mlt_producer_properties( title ), "text", "Mutton Lettuce\nTomato" );
+ mlt_properties_set_int( mlt_producer_properties( title ), "bgcolor", 0x0000007f );
+ mlt_properties_set_int( mlt_producer_properties( title ), "pad", 8 );
+ mlt_properties_set_int( mlt_producer_properties( title ), "align", 1 );
+ mlt_properties_set_int( mlt_producer_properties( title ), "x", 20 );
+ mlt_properties_set_int( mlt_producer_properties( title ), "y", 40 );
+#endif
+
+ mlt_playlist playlist1 = mlt_playlist_init();
+ mlt_playlist_append( playlist1, dv1 );
+ mlt_playlist_blank( playlist1, 1.0 );
+ mlt_playlist playlist2 = mlt_playlist_init();
+ mlt_playlist_blank( playlist2, 3.0 );
+ mlt_playlist_append( playlist2, dv2 );
+
// Register producers(s) with a multitrack object
mlt_multitrack multitrack = mlt_multitrack_init( );
- mlt_multitrack_connect( multitrack, dv1, 0 );
- mlt_multitrack_connect( multitrack, dv2, 1 );
+ mlt_multitrack_connect( multitrack, mlt_playlist_producer( playlist1 ), 0 );
+ mlt_multitrack_connect( multitrack, mlt_playlist_producer( playlist2 ), 1 );
// Create a filter and associate it to track 0
-// mlt_filter filter = mlt_factory_filter( "deinterlace", NULL );
-// mlt_filter_connect( filter, mlt_multitrack_service( multitrack ), 0 );
-// mlt_filter_set_in_and_out( filter, 0, 1000 );
+ //mlt_filter filter = mlt_factory_filter( "deinterlace", NULL );
+ //mlt_filter_connect( filter, mlt_multitrack_service( multitrack ), 0 );
+ //mlt_filter_set_in_and_out( filter, 0, 1000 );
// Define a transition
- mlt_transition transition = mlt_factory_transition( "composite", NULL );
+ mlt_transition transition = mlt_factory_transition( "luma", NULL );
mlt_transition_connect( transition, mlt_multitrack_service( multitrack ), 0, 1 );
- mlt_transition_set_in_and_out( transition, 0, 1000 );
+ mlt_transition_set_in_and_out( transition, 3.0, 5.0 );
+ //mlt_properties_set( mlt_transition_properties( transition ), "filename", "clock.pgm" );
+ mlt_properties_set_double( mlt_transition_properties( transition ), "softness", 0.1 );
// Buy a tractor and connect it to the filter
mlt_tractor tractor = mlt_tractor_init( );
@@ -72,7 +93,7 @@ int main( int argc, char **argv )
// Close everything...
mlt_consumer_close( consumer );
mlt_tractor_close( tractor );
- //mlt_filter_close( filter );
+ mlt_transition_close( transition );
mlt_multitrack_close( multitrack );
mlt_producer_close( dv1 );
mlt_producer_close( dv2 );