X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fframework%2Fmlt_animation.h;h=a102596f14484c52b4d3464e112d0d47d21bf06a;hb=f26c43f62082424eeb9dc5a1ebed0686ce28d40d;hp=313e193b779882d7a1cc3f472a53ea757513eecb;hpb=fee43878bb3fa17da3403b3a29a9a0775c1cb9de;p=mlt diff --git a/src/framework/mlt_animation.h b/src/framework/mlt_animation.h index 313e193b..a102596f 100644 --- a/src/framework/mlt_animation.h +++ b/src/framework/mlt_animation.h @@ -1,8 +1,11 @@ -/* - * mlt_animation.h -- provides the property animation API +/** + * \file mlt_animation.h + * \brief Property Animation class declaration + * \see mlt_animation_s + * * Copyright (C) 2004-2013 Ushodaya Enterprises Limited - * Author: Charles Yates - * Author: Dan Dennedy + * \author Charles Yates + * \author Dan Dennedy * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -25,45 +28,31 @@ #include "mlt_types.h" #include "mlt_property.h" +/** \brief An animation item that represents a keyframe-property combination. */ + struct mlt_animation_item_s { - - int is_key; /**< = whether this is a key frame or an interpolated item */ - int frame; /**< The actual frame this corresponds to */ - mlt_property property; + int is_key; /**< a boolean of whether this is a key frame or an interpolated item */ + int frame; /**< the frame number for this instance of the property */ + mlt_property property; /**< the property for this point in time */ + mlt_keyframe_type keyframe_type; /**< the method of interpolation for this key frame */ }; -typedef struct mlt_animation_item_s *mlt_animation_item; - -struct mlt_animation_s; -typedef struct mlt_animation_s *mlt_animation; +typedef struct mlt_animation_item_s *mlt_animation_item; /**< pointer to an animation item */ -/* Create a new animation object. */ extern mlt_animation mlt_animation_new( ); -/* Parse the geometry specification for a given duration and range */ extern int mlt_animation_parse(mlt_animation self, const char *data, int length, double fps, locale_t locale ); -/* Conditionally refresh the animation if it's modified */ extern int mlt_animation_refresh( mlt_animation self, const char *data, int length ); -/* Get and set the length */ extern int mlt_animation_get_length( mlt_animation self ); extern void mlt_animation_set_length( mlt_animation self, int length ); -/* Parse an item - doesn't affect the animation itself but uses current information for evaluation */ -/* (item->frame should be specified if not included in the data itself) */ extern int mlt_animation_parse_item( mlt_animation self, mlt_animation_item item, const char *data ); -/* Fetch an animation item for an absolute position */ extern int mlt_animation_get_item( mlt_animation self, mlt_animation_item item, int position ); -/* Specify an animation item at an absolute position */ extern int mlt_animation_insert( mlt_animation self, mlt_animation_item item ); -/* Remove the key at the specified position */ extern int mlt_animation_remove( mlt_animation self, int position ); -/* Typically, re-interpolate after a series of insertions or removals. */ extern void mlt_animation_interpolate( mlt_animation self ); -/* Get the key at the position or the next following */ extern int mlt_animation_next_key( mlt_animation self, mlt_animation_item item, int position ); extern int mlt_animation_prev_key( mlt_animation self, mlt_animation_item item, int position ); -/* Serialize the current animation. */ extern char *mlt_animation_serialize_cut( mlt_animation self, int in, int out ); extern char *mlt_animation_serialize( mlt_animation self ); -/* Close and destrory the animation. */ extern void mlt_animation_close( mlt_animation self ); #endif