X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_multitrack.c;h=6c24400f243993175a9c42b76ae8c66e3d9fd9c8;hb=fd99b3c0f3cf93b743953d9178ca82d19c0abf20;hp=ef7a1bed65732feaa505924ba47978dc32fc73fb;hpb=e119b618924284bb2bcc7c2199ab06066ed76c8e;p=melted diff --git a/src/framework/mlt_multitrack.c b/src/framework/mlt_multitrack.c index ef7a1be..6c24400 100644 --- a/src/framework/mlt_multitrack.c +++ b/src/framework/mlt_multitrack.c @@ -127,7 +127,8 @@ void mlt_multitrack_refresh( mlt_multitrack this ) mlt_properties_set( mlt_producer_properties( producer ), "eof", "continue" ); // Determine the longest length - length = mlt_producer_get_playtime( producer ) > length ? mlt_producer_get_playtime( producer ) : length; + if ( !mlt_properties_get_int( mlt_producer_properties( producer ), "hide" ) ) + length = mlt_producer_get_playtime( producer ) > length ? mlt_producer_get_playtime( producer ) : length; // Handle fps if ( fps == 0 ) @@ -212,7 +213,7 @@ mlt_producer mlt_multitrack_track( mlt_multitrack this, int track ) static int position_compare( const void *p1, const void *p2 ) { - return *( int64_t * )p1 - *( int64_t * )p2; + return *( mlt_position * )p1 - *( mlt_position * )p2; } static int add_unique( mlt_position *array, int size, mlt_position position ) @@ -251,7 +252,7 @@ mlt_position mlt_multitrack_clip( mlt_multitrack this, mlt_whence whence, int in mlt_position position = 0; int i = 0; int j = 0; - int64_t *map = malloc( 1000 * sizeof( mlt_position ) ); + mlt_position *map = malloc( 1000 * sizeof( mlt_position ) ); int count = 0; for ( i = 0; i < this->count; i ++ ) @@ -259,7 +260,7 @@ mlt_position mlt_multitrack_clip( mlt_multitrack this, mlt_whence whence, int in // Get the producer for this track mlt_producer producer = this->list[ i ]; - // If it's assigned... + // If it's assigned and not a hidden track if ( producer != NULL ) { // Get the properties of this producer @@ -284,7 +285,7 @@ mlt_position mlt_multitrack_clip( mlt_multitrack this, mlt_whence whence, int in } // Now sort the map - qsort( map, count, sizeof( int64_t ), position_compare ); + qsort( map, count, sizeof( mlt_position ), position_compare ); // Now locate the requested index switch( whence ) @@ -371,9 +372,10 @@ static int producer_get_frame( mlt_producer parent, mlt_frame_ptr frame, int ind // Indicate speed of this producer mlt_properties producer_properties = mlt_producer_properties( parent ); - double speed = mlt_properties_get_double( producer_properties, "speed" ); + double speed = mlt_properties_get_double( producer_properties, "_speed" ); mlt_properties properties = mlt_frame_properties( *frame ); - mlt_properties_set_double( properties, "speed", speed ); + mlt_properties_set_double( properties, "_speed", speed ); + mlt_properties_set_int( properties, "hide", mlt_properties_get_int( mlt_producer_properties( producer ), "hide" ) ); } else { @@ -394,7 +396,7 @@ static int producer_get_frame( mlt_producer parent, mlt_frame_ptr frame, int ind } // Refresh our stats - mlt_multitrack_refresh( this ); + //mlt_multitrack_refresh( this ); } return 0;