X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Ffezzik%2Fproducer_hold.c;h=f30aa0c3fcf54ad59ccb87472265c157f18b38da;hb=42eea21bf0c71036397cac39f19d537c9344081c;hp=77afe3faf12bfeb0d3fced4ebe8969770dc016e7;hpb=f00476101550ec7d8e863f6516aa83bc1b524570;p=melted diff --git a/src/modules/fezzik/producer_hold.c b/src/modules/fezzik/producer_hold.c index 77afe3f..f30aa0c 100644 --- a/src/modules/fezzik/producer_hold.c +++ b/src/modules/fezzik/producer_hold.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 "producer_hold.h" - #include #include #include @@ -36,13 +34,13 @@ static void producer_close( mlt_producer this ); and get_image requested. */ -mlt_producer producer_hold_init( char *arg ) +mlt_producer producer_hold_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ) { // Construct a new holding producer mlt_producer this = mlt_producer_new( ); // Construct the requested producer via fezzik - mlt_producer producer = mlt_factory_producer( "fezzik", arg ); + mlt_producer producer = mlt_factory_producer( profile, "fezzik", arg ); // Initialise the frame holding capabilities if ( this != NULL && producer != NULL ) @@ -59,6 +57,7 @@ mlt_producer producer_hold_init( char *arg ) mlt_properties_set_position( properties, "out", 25 ); mlt_properties_set_position( properties, "length", 15000 ); mlt_properties_set( properties, "resource", arg ); + mlt_properties_set( properties, "method", "onefield" ); // Override the get_frame method this->get_frame = producer_get_frame; @@ -142,7 +141,7 @@ static int producer_get_frame( mlt_producer this, mlt_frame_ptr frame, int index mlt_properties properties = MLT_PRODUCER_PROPERTIES( this ); // Construct a new frame - *frame = mlt_frame_init( ); + *frame = mlt_frame_init( MLT_PRODUCER_SERVICE( this ) ); // If we have a frame, then stack the producer itself and the get_image method if ( *frame != NULL ) @@ -182,6 +181,9 @@ static int producer_get_frame( mlt_producer this, mlt_frame_ptr frame, int index // Ensure that the consumer sees what the real frame has mlt_properties_pass( MLT_FRAME_PROPERTIES( *frame ), MLT_FRAME_PROPERTIES( real_frame ), "" ); + + mlt_properties_set( MLT_FRAME_PROPERTIES( real_frame ), "deinterlace_method", + mlt_properties_get( properties, "method" ) ); } // Move to the next position