* Copyright (C) 2003-2004 Ushodaya Enterprises Limited
* Author: Charles Yates <charles.yates@pandora.be>
*
- * 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"
// 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 ++ )
{
// 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 );
- }
}
}
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.
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 ) );