X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fframework%2Fmlt_property.h;h=c951762ddb44acf1e784d62fea49c68fea598036;hb=3bfb2b31cf05d183aa3ac44febc2824dcd100463;hp=8fb209c464dd423138912f2656743b96a28edf33;hpb=661165812e3410fe2f6f49d7af882b36a0efcf82;p=mlt diff --git a/src/framework/mlt_property.h b/src/framework/mlt_property.h index 8fb209c4..c951762d 100644 --- a/src/framework/mlt_property.h +++ b/src/framework/mlt_property.h @@ -1,21 +1,25 @@ -/* - * mlt_property.h -- property class - * Copyright (C) 2003-2004 Ushodaya Enterprises Limited - * Author: Charles Yates +/** + * \file mlt_property.h + * \brief Property class declaration + * \see mlt_property_s * - * 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. + * Copyright (C) 2003-2013 Ushodaya Enterprises Limited + * \author Charles Yates + * \author Dan Dennedy * - * This program is distributed in the hope that it will be useful, + * 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 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 */ #ifndef _MLT_PROPERTY_H_ @@ -23,60 +27,47 @@ #include "mlt_types.h" -/** Bit pattern for properties. -*/ - -typedef enum -{ - mlt_prop_none = 0, - mlt_prop_int = 1, - mlt_prop_string = 2, - mlt_prop_timecode = 4, - mlt_prop_double = 8, - mlt_prop_data = 16 -} -mlt_property_type; - -/** Property structure. -*/ - -typedef struct mlt_property_s -{ - // Stores a bit pattern of types available for this property - mlt_property_type types; - - // Atomic type handling - int prop_int; - mlt_timecode prop_timecode; - double prop_double; +#if defined(__FreeBSD__) +/* This header has existed since 1994 and defines __FreeBSD_version below. */ +#include +#endif - // String handling - char *prop_string; +#if defined(__GLIBC__) || defined(__DARWIN__) || (__FreeBSD_version >= 900506) +#include +#else +typedef void* locale_t; +#endif - // Generic type handling - void *data; - int length; - mlt_destructor destructor; - mlt_serialiser serialiser; -} -*mlt_property; +extern mlt_property mlt_property_init( ); +extern int mlt_property_set_int( mlt_property self, int value ); +extern int mlt_property_set_double( mlt_property self, double value ); +extern int mlt_property_set_position( mlt_property self, mlt_position value ); +extern int mlt_property_set_int64( mlt_property self, int64_t value ); +extern int mlt_property_set_string( mlt_property self, const char *value ); +extern int mlt_property_set_data( mlt_property self, void *value, int length, mlt_destructor destructor, mlt_serialiser serialiser ); +extern int mlt_property_get_int( mlt_property self, double fps, locale_t ); +extern double mlt_property_get_double( mlt_property self, double fps, locale_t ); +extern mlt_position mlt_property_get_position( mlt_property self, double fps, locale_t ); +extern int64_t mlt_property_get_int64( mlt_property self ); +extern char *mlt_property_get_string( mlt_property self ); +extern char *mlt_property_get_string_l( mlt_property self, locale_t ); +extern void *mlt_property_get_data( mlt_property self, int *length ); +extern void mlt_property_close( mlt_property self ); +extern void mlt_property_pass( mlt_property self, mlt_property that ); +extern char *mlt_property_get_time( mlt_property self, mlt_time_format, double fps, locale_t ); -/** API -*/ +extern int mlt_property_interpolate( mlt_property self, mlt_property points[], double progress, double fps, locale_t locale, mlt_keyframe_type interp ); +extern double mlt_property_anim_get_double( mlt_property self, double fps, locale_t locale, int position, int length ); +extern int mlt_property_anim_get_int( mlt_property self, double fps, locale_t locale, int position, int length ); +extern char* mlt_property_anim_get_string( mlt_property self, double fps, locale_t locale, int position, int length ); +extern int mlt_property_anim_set_double( mlt_property self, double value, double fps, locale_t locale, int position, int length, mlt_keyframe_type keyframe_type ); +extern int mlt_property_anim_set_int( mlt_property self, int value, double fps, locale_t locale, int position, int length, mlt_keyframe_type keyframe_type ); +extern int mlt_property_anim_set_string( mlt_property self, const char *value, double fps, locale_t locale, int position, int length ); +extern mlt_animation mlt_property_get_animation( mlt_property self ); -extern mlt_property mlt_property_init( ); -extern void mlt_property_clear( mlt_property this ); -extern int mlt_property_set_int( mlt_property this, int value ); -extern int mlt_property_set_double( mlt_property this, double value ); -extern int mlt_property_set_timecode( mlt_property this, mlt_timecode value ); -extern int mlt_property_set_string( mlt_property this, char *value ); -extern int mlt_property_set_data( mlt_property this, void *value, int length, mlt_destructor destructor, mlt_serialiser serialiser ); -extern int mlt_property_get_int( mlt_property this ); -extern double mlt_property_get_double( mlt_property this ); -extern mlt_timecode mlt_property_get_timecode( mlt_property this ); -extern char *mlt_property_get_string( mlt_property this ); -extern void *mlt_property_get_data( mlt_property this, int *length ); -extern void mlt_property_close( mlt_property this ); +extern int mlt_property_set_rect( mlt_property self, mlt_rect value ); +extern mlt_rect mlt_property_get_rect( mlt_property self, locale_t locale ); +extern int mlt_property_anim_set_rect( mlt_property self, mlt_rect value, double fps, locale_t locale, int position, int length, mlt_keyframe_type keyframe_type ); +extern mlt_rect mlt_property_anim_get_rect( mlt_property self, double fps, locale_t locale, int position, int length ); #endif -