X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_multitrack.c;h=bf9c073835e5c1c9aa63589ad74d56dc4f2eb6dd;hb=798c42620d0e5ca75150884270e7539d378649f3;hp=c05c132b2feea665844cc9eeada902c63af60b26;hpb=f00476101550ec7d8e863f6516aa83bc1b524570;p=melted diff --git a/src/framework/mlt_multitrack.c b/src/framework/mlt_multitrack.c index c05c132..bf9c073 100644 --- a/src/framework/mlt_multitrack.c +++ b/src/framework/mlt_multitrack.c @@ -3,23 +3,21 @@ * Copyright (C) 2003-2004 Ushodaya Enterprises Limited * Author: Charles Yates * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "config.h" - #include "mlt_multitrack.h" #include "mlt_playlist.h" #include "mlt_frame.h" @@ -102,9 +100,6 @@ void mlt_multitrack_refresh( mlt_multitrack this ) // We need to ensure that the multitrack reports the longest track as its length mlt_position length = 0; - // We need to ensure that fps are the same on all services - double fps = 0; - // Obtain stats on all connected services for ( i = 0; i < this->count; i ++ ) { @@ -122,21 +117,6 @@ void mlt_multitrack_refresh( mlt_multitrack this ) // Determine the longest 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 ) - { - // This is the first producer, so it controls the fps - fps = mlt_producer_get_fps( producer ); - } - else if ( fps != mlt_producer_get_fps( producer ) ) - { - // Generate a warning for now - the following attempt to fix may fail - fprintf( stderr, "Warning: fps mismatch on track %d\n", i ); - - // It should be safe to impose fps on an image producer, but not necessarily safe for video - mlt_properties_set_double( MLT_PRODUCER_PROPERTIES( producer ), "fps", fps ); - } } } @@ -145,7 +125,6 @@ void mlt_multitrack_refresh( mlt_multitrack this ) mlt_properties_set_position( properties, "length", length ); mlt_events_unblock( properties, properties ); mlt_properties_set_position( properties, "out", length - 1 ); - mlt_properties_set_double( properties, "fps", fps ); } /** Listener for producers on the playlist. @@ -405,7 +384,7 @@ static int producer_get_frame( mlt_producer parent, mlt_frame_ptr frame, int ind else { // Generate a test frame - *frame = mlt_frame_init( ); + *frame = mlt_frame_init( MLT_PRODUCER_SERVICE( parent ) ); // Update position on the frame we're creating mlt_frame_set_position( *frame, mlt_producer_position( parent ) );