int track = 0;
mlt_consumer consumer = NULL;
mlt_producer producer = NULL;
- mlt_playlist playlist = NULL;
+ mlt_playlist playlist = mlt_playlist_init( );
mlt_properties group = mlt_properties_new( );
mlt_properties properties = group;
mlt_field field = mlt_field_init( );
// Construct the factory
mlt_factory_init( getenv( "MLT_REPOSITORY" ) );
- // Set up containers
- playlist = mlt_playlist_init( );
-
// We need to track the number of registered filters
mlt_properties_set_int( field_properties, "registered", 0 );
producer = NULL;
mlt_playlist_blank( playlist, atof( argv[ ++ i ] ) );
}
+ else if ( !strcmp( argv[ i ], "-track" ) )
+ {
+ if ( producer != NULL )
+ mlt_playlist_append( playlist, producer );
+ producer = NULL;
+ mlt_multitrack_connect( multitrack, mlt_playlist_producer( playlist ), track ++ );
+ playlist = mlt_playlist_init( );
+ }
else if ( !strstr( argv[ i ], "=" ) )
{
if ( producer != NULL )
int track = 0;
mlt_consumer consumer = NULL;
mlt_producer producer = NULL;
- mlt_playlist playlist = NULL;
+ mlt_playlist playlist = mlt_playlist_init( );
mlt_properties group = mlt_properties_new( );
mlt_properties properties = group;
mlt_field field = mlt_field_init( );
// Construct the factory
mlt_factory_init( getenv( "MLT_REPOSITORY" ) );
- // Set up containers
- playlist = mlt_playlist_init( );
-
// We need to track the number of registered filters
mlt_properties_set_int( field_properties, "registered", 0 );
producer = NULL;
mlt_playlist_blank( playlist, atof( argv[ ++ i ] ) );
}
+ else if ( !strcmp( argv[ i ], "-track" ) )
+ {
+ if ( producer != NULL )
+ mlt_playlist_append( playlist, producer );
+ producer = NULL;
+ mlt_multitrack_connect( multitrack, mlt_playlist_producer( playlist ), track ++ );
+ playlist = mlt_playlist_init( );
+ }
else if ( !strstr( argv[ i ], "=" ) )
{
if ( producer != NULL )