producer->get_frame = producer_get_frame;
mlt_properties_set_data( properties, "multitrack", this, 0, NULL, NULL );
mlt_properties_set( properties, "log_id", "multitrack" );
+ mlt_properties_set( properties, "resource", "<multitrack>" );
}
else
{
// Update multitrack properties now - we'll not destroy the in point here
mlt_properties_set_position( properties, "length", length );
- mlt_properties_set_position( properties, "out", length );
+ mlt_properties_set_position( properties, "out", length - 1 );
mlt_properties_set_double( properties, "fps", fps );
}
return result;
}
+/** Get the number of tracks.
+*/
+
+int mlt_multitrack_count( mlt_multitrack this )
+{
+ return this->count;
+}
+
+/** Get an individual track as a producer.
+*/
+
+mlt_producer mlt_multitrack_track( mlt_multitrack this, int track )
+{
+ mlt_producer producer = NULL;
+
+ if ( this->list != NULL && track < this->count )
+ producer = this->list[ track ];
+
+ return producer;
+}
+
+
/** Determine the clip point.
Special case here: a 'producer' has no concept of multiple clips - only the
mlt_producer producer = this->list[ index ];
// Obtain the current position
- uint64_t position = mlt_producer_frame( parent );
+ mlt_position position = mlt_producer_frame( parent );
// Make sure we're at the same point
mlt_producer_seek( producer, position );