X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_geometry.c;h=67d98ee9f5759227fdfe05d906127a1af013d810;hb=40b169c095486ba1b868486eb98a47c41f36ce8c;hp=8dc36113b566cde868e668e7600f6cd69f78abbe;hpb=34c08944960aa79de3d038809d66637701b7567f;p=melted diff --git a/src/framework/mlt_geometry.c b/src/framework/mlt_geometry.c index 8dc3611..67d98ee 100644 --- a/src/framework/mlt_geometry.c +++ b/src/framework/mlt_geometry.c @@ -1,26 +1,27 @@ /* - * mlt_geometry.h -- provides the geometry API + * mlt_geometry.c -- provides the geometry API * Copyright (C) 2004-2005 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 "mlt_geometry.h" #include "mlt_tokeniser.h" #include "mlt_factory.h" +#include "mlt_profile.h" #include #include @@ -54,12 +55,8 @@ mlt_geometry mlt_geometry_init( ) if ( this->local != NULL ) { geometry self = this->local; - char *normalisation = mlt_environment( "MLT_NORMALISATION" ); - self->nw = 720; - if ( normalisation == NULL || strcmp( normalisation, "NTSC" ) ) - self->nh = 576; - else - self->nh = 480; + self->nw = mlt_profile_get()->width; + self->nh = mlt_profile_get()->height; } else { @@ -98,9 +95,9 @@ static void mlt_geometry_virtual_refresh( mlt_geometry this ) geometry_item prev = current->prev; geometry_item next = current->next; - float prev_value = 0; - float next_value = 0; - float value = 0; + double prev_value = 0; + double next_value = 0; + double value = 0; while( prev != NULL && !prev->data.f[ i ] ) prev = prev->prev; while( next != NULL && !next->data.f[ i ] ) next = next->next; @@ -281,7 +278,7 @@ void mlt_geometry_set_length( mlt_geometry this, int length ) // Get the local/private structure geometry self = this->local; - // return the length + // set the length self->length = length; }