From: Dan Dennedy Date: Fri, 31 May 2013 02:53:41 +0000 (-0700) Subject: Reorder the last commit of mlt_properties_get_animation(). X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=993c546b6723726ec74a724bdac5833e58281cf0;p=mlt Reorder the last commit of mlt_properties_get_animation(). --- diff --git a/src/framework/mlt_properties.c b/src/framework/mlt_properties.c index 0dfb4e60..2f807ee2 100644 --- a/src/framework/mlt_properties.c +++ b/src/framework/mlt_properties.c @@ -2303,6 +2303,20 @@ int mlt_properties_anim_set_double( mlt_properties self, const char *name, doubl return error; } +/** Get the animation associated to the name. + * + * \public \memberof mlt_properties_s + * \param self a properties list + * \param name the property to get + * \return The animation object or NULL if the property has no animation + */ + +mlt_animation mlt_properties_get_animation( mlt_properties self, const char *name ) +{ + mlt_property value = mlt_properties_find( self, name ); + return value == NULL ? NULL : mlt_property_get_animation( value ); +} + /** Set a property to a rectangle value. * * \public \memberof mlt_properties_s @@ -2400,17 +2414,3 @@ extern mlt_rect mlt_properties_anim_get_rect( mlt_properties self, const char *n mlt_rect rect = { DBL_MIN, DBL_MIN, DBL_MIN, DBL_MIN, DBL_MIN }; return value == NULL ? rect : mlt_property_anim_get_rect( value, fps, list->locale, position, length ); } - -/** Get the animation associated to the name. - * - * \public \memberof mlt_properties_s - * \param self a properties list - * \param name the property to get - * \return The animation object or NULL if the property has no animation - */ - -mlt_animation mlt_properties_get_animation( mlt_properties self, const char *name ) -{ - mlt_property value = mlt_properties_find( self, name ); - return value == NULL ? NULL : mlt_property_get_animation( value ); -} diff --git a/src/framework/mlt_properties.h b/src/framework/mlt_properties.h index 547c9636..d276a237 100644 --- a/src/framework/mlt_properties.h +++ b/src/framework/mlt_properties.h @@ -98,11 +98,11 @@ extern int mlt_properties_anim_get_int( mlt_properties self, const char *name, i extern int mlt_properties_anim_set_int( mlt_properties self, const char *name, int value, int position, int length, mlt_keyframe_type keyframe_type ); extern double mlt_properties_anim_get_double( mlt_properties self, const char *name, int position, int length ); extern int mlt_properties_anim_set_double( mlt_properties self, const char *name, double value, int position, int length, mlt_keyframe_type keyframe_type ); +extern mlt_animation mlt_properties_get_animation( mlt_properties self, const char *name ); extern int mlt_properties_set_rect( mlt_properties self, const char *name, mlt_rect value ); extern mlt_rect mlt_properties_get_rect( mlt_properties self, const char *name ); extern int mlt_properties_anim_set_rect( mlt_properties self, const char *name, mlt_rect value, int position, int length, mlt_keyframe_type keyframe_type ); extern mlt_rect mlt_properties_anim_get_rect( mlt_properties self, const char *name, int position, int length ); -extern mlt_animation mlt_properties_get_animation( mlt_properties self, const char *name ); #endif diff --git a/src/framework/mlt_property.c b/src/framework/mlt_property.c index 5a2ac5ca..1f847b5a 100644 --- a/src/framework/mlt_property.c +++ b/src/framework/mlt_property.c @@ -1238,6 +1238,11 @@ int mlt_property_anim_set_string( mlt_property self, const char *value, double f return result; } +mlt_animation mlt_property_get_animation( mlt_property self ) +{ + return self->animation; +} + static char* serialise_mlt_rect( mlt_rect *rect, int length ) { char* result = calloc( 1, 100 ); @@ -1386,8 +1391,3 @@ mlt_rect mlt_property_anim_get_rect( mlt_property self, double fps, locale_t loc } return result; } - -mlt_animation mlt_property_get_animation( mlt_property self ) -{ - return self->animation; -} diff --git a/src/framework/mlt_property.h b/src/framework/mlt_property.h index 9bbccc06..b6a0d167 100644 --- a/src/framework/mlt_property.h +++ b/src/framework/mlt_property.h @@ -54,18 +54,19 @@ 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 ); -extern int mlt_property_interpolate( mlt_property self, mlt_property points[], - double progress, double fps, locale_t locale, mlt_keyframe_type interp ); + +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 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 ); -extern mlt_animation mlt_property_get_animation( mlt_property self ); #endif