From: Dan Dennedy Date: Thu, 30 May 2013 05:03:16 +0000 (-0700) Subject: Reorder some property anim parameters for consistency. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=74890bee371a67eb4ce974a74c0c5a7e18b44167;p=mlt Reorder some property anim parameters for consistency. --- diff --git a/src/framework/mlt_properties.c b/src/framework/mlt_properties.c index 705ccdf6..e66c5d6d 100644 --- a/src/framework/mlt_properties.c +++ b/src/framework/mlt_properties.c @@ -2198,7 +2198,7 @@ int mlt_properties_anim_get_int( mlt_properties self, const char *name, int posi */ int mlt_properties_anim_set_int( mlt_properties self, const char *name, int value, - mlt_keyframe_type keyframe_type, int position, int length ) + int position, int length, mlt_keyframe_type keyframe_type ) { int error = 1; @@ -2213,7 +2213,7 @@ int mlt_properties_anim_set_int( mlt_properties self, const char *name, int valu mlt_profile profile = mlt_properties_get_data( self, "_profile", NULL ); double fps = mlt_profile_fps( profile ); property_list *list = self->local; - error = mlt_property_anim_set_int( property, value, fps, list->locale, keyframe_type, position, length ); + error = mlt_property_anim_set_int( property, value, fps, list->locale, position, length, keyframe_type ); mlt_properties_do_mirror( self, name ); } @@ -2249,7 +2249,7 @@ double mlt_properties_anim_get_double( mlt_properties self, const char *name, in */ int mlt_properties_anim_set_double( mlt_properties self, const char *name, double value, - mlt_keyframe_type keyframe_type, int position, int length ) + int position, int length, mlt_keyframe_type keyframe_type ) { int error = 1; @@ -2264,7 +2264,7 @@ int mlt_properties_anim_set_double( mlt_properties self, const char *name, doubl mlt_profile profile = mlt_properties_get_data( self, "_profile", NULL ); double fps = mlt_profile_fps( profile ); property_list *list = self->local; - error = mlt_property_anim_set_double( property, value, fps, list->locale, keyframe_type, position, length ); + error = mlt_property_anim_set_double( property, value, fps, list->locale, position, length, keyframe_type ); mlt_properties_do_mirror( self, name ); } @@ -2328,7 +2328,8 @@ extern mlt_rect mlt_properties_get_rect( mlt_properties self, const char* name ) * \return true if error */ -extern int mlt_properties_anim_set_rect( mlt_properties self, const char *name, mlt_rect value, mlt_keyframe_type keyframe_type, int position, int length ) +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 ) { int error = 1; @@ -2343,7 +2344,7 @@ extern int mlt_properties_anim_set_rect( mlt_properties self, const char *name, mlt_profile profile = mlt_properties_get_data( self, "_profile", NULL ); double fps = mlt_profile_fps( profile ); property_list *list = self->local; - error = mlt_property_anim_set_rect( property, value, fps, list->locale, keyframe_type, position, length ); + error = mlt_property_anim_set_rect( property, value, fps, list->locale, position, length, keyframe_type ); mlt_properties_do_mirror( self, name ); } diff --git a/src/framework/mlt_properties.h b/src/framework/mlt_properties.h index ec790687..acd1dd4a 100644 --- a/src/framework/mlt_properties.h +++ b/src/framework/mlt_properties.h @@ -94,13 +94,13 @@ extern mlt_color mlt_properties_get_color( mlt_properties, const char* name ); extern char* mlt_properties_anim_get( mlt_properties self, const char *name, int position, int length ); extern int mlt_properties_anim_set( mlt_properties self, const char *name, const char *value, int position, int length ); extern int mlt_properties_anim_get_int( mlt_properties self, const char *name, int position, int length ); -extern int mlt_properties_anim_set_int( mlt_properties self, const char *name, int value, mlt_keyframe_type keyframe_type, int position, int length ); +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, mlt_keyframe_type keyframe_type, 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 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, mlt_keyframe_type keyframe_type, int position, int length ); +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 ); #endif diff --git a/src/framework/mlt_property.c b/src/framework/mlt_property.c index 0edd0161..a1657611 100644 --- a/src/framework/mlt_property.c +++ b/src/framework/mlt_property.c @@ -1175,7 +1175,7 @@ char* mlt_property_anim_get_string( mlt_property self, double fps, locale_t loca */ int mlt_property_anim_set_double( mlt_property self, double value, double fps, locale_t locale, - mlt_keyframe_type keyframe_type, int position, int length ) + int position, int length, mlt_keyframe_type keyframe_type ) { int result; struct mlt_animation_item_s item; @@ -1202,7 +1202,7 @@ int mlt_property_anim_set_double( mlt_property self, double value, double fps, l */ int mlt_property_anim_set_int( mlt_property self, int value, double fps, locale_t locale, - mlt_keyframe_type keyframe_type, int position, int length ) + int position, int length, mlt_keyframe_type keyframe_type ) { int result; struct mlt_animation_item_s item; @@ -1347,7 +1347,7 @@ mlt_rect mlt_property_get_rect( mlt_property self, locale_t locale ) */ int mlt_property_anim_set_rect( mlt_property self, mlt_rect value, double fps, locale_t locale, - mlt_keyframe_type keyframe_type, int position, int length ) + int position, int length, mlt_keyframe_type keyframe_type ) { int result; struct mlt_animation_item_s item; diff --git a/src/framework/mlt_property.h b/src/framework/mlt_property.h index 1b4285db..1300c457 100644 --- a/src/framework/mlt_property.h +++ b/src/framework/mlt_property.h @@ -59,16 +59,12 @@ extern int mlt_property_interpolate( mlt_property self, mlt_property points[], 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, - mlt_keyframe_type keyframe_type, int position, int length ); -extern int mlt_property_anim_set_int( mlt_property self, int value, double fps, locale_t locale, - mlt_keyframe_type keyframe_type, int position, int length ); -extern int mlt_property_anim_set_string( mlt_property self, const char *value, 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 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, - mlt_keyframe_type keyframe_type, int position, int length ); +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 diff --git a/src/mlt++/MltProperties.cpp b/src/mlt++/MltProperties.cpp index b037025d..657b92c0 100644 --- a/src/mlt++/MltProperties.cpp +++ b/src/mlt++/MltProperties.cpp @@ -359,7 +359,7 @@ int Properties::anim_get_int( const char *name, int position, int length ) int Properties::anim_set( const char *name, int value, int position, int length, mlt_keyframe_type keyframe_type ) { - return mlt_properties_anim_set_int( get_properties(), name, value, keyframe_type, position, length ); + return mlt_properties_anim_set_int( get_properties(), name, value, position, length, keyframe_type ); } double Properties::anim_get_double(const char *name, int position, int length) @@ -367,9 +367,9 @@ double Properties::anim_get_double(const char *name, int position, int length) return mlt_properties_anim_get_double( get_properties(), name, position, length ); } -int Properties::anim_set(const char *name, double value, int position, int length, mlt_keyframe_type keyframe_type) +int Properties::anim_set( const char *name, double value, int position, int length, mlt_keyframe_type keyframe_type ) { - return mlt_properties_anim_set_double( get_properties(), name, value, keyframe_type, position, length ); + return mlt_properties_anim_set_double( get_properties(), name, value, position, length, keyframe_type ); } int Properties::set( const char *name, mlt_rect value ) @@ -388,9 +388,9 @@ mlt_rect Properties::get_rect( const char *name ) return mlt_properties_get_rect( get_properties(), name ); } -int Properties::anim_set(const char *name, mlt_rect value, int position, int length, mlt_keyframe_type keyframe_type) +int Properties::anim_set( const char *name, mlt_rect value, int position, int length, mlt_keyframe_type keyframe_type ) { - return mlt_properties_anim_set_rect( get_properties(), name, value, keyframe_type, position, length ); + return mlt_properties_anim_set_rect( get_properties(), name, value, position, length, keyframe_type ); } mlt_rect Properties::anim_get_rect(const char *name, int position, int length) diff --git a/src/tests/test_properties/test_properties.cpp b/src/tests/test_properties/test_properties.cpp index fb95480c..a2f488c5 100644 --- a/src/tests/test_properties/test_properties.cpp +++ b/src/tests/test_properties/test_properties.cpp @@ -594,7 +594,7 @@ private Q_SLOTS: int len = 100; mlt_property p = mlt_property_init(); mlt_property_set_string(p, "10=100; 20=200"); - mlt_property_anim_set_double(p, 1.5, fps, locale, mlt_keyframe_linear, 30, len); + mlt_property_anim_set_double(p, 1.5, fps, locale, 30, len, mlt_keyframe_linear); QCOMPARE(mlt_property_get_double(p, fps, locale), 10.0); QCOMPARE(mlt_property_anim_get_double(p, fps, locale, 0, len), 100.0); QCOMPARE(mlt_property_anim_get_double(p, fps, locale, 15, len), 150.0); @@ -610,7 +610,7 @@ private Q_SLOTS: int len = 0; mlt_property p = mlt_property_init(); mlt_property_set_string(p, "10=100; 20=200"); - mlt_property_anim_set_int(p, 300, fps, locale, mlt_keyframe_linear, 30, len); + mlt_property_anim_set_int(p, 300, fps, locale, 30, len, mlt_keyframe_linear); QCOMPARE(mlt_property_get_int(p, fps, locale), 10); QCOMPARE(mlt_property_anim_get_int(p, fps, locale, 0, len), 100); QCOMPARE(mlt_property_anim_get_int(p, fps, locale, 15, len), 150);