2 * \file mlt_animation.h
3 * \brief Property Animation class declaration
6 * Copyright (C) 2004-2013 Ushodaya Enterprises Limited
7 * \author Charles Yates <charles.yates@pandora.be>
8 * \author Dan Dennedy <dan@dennedy.org>
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #ifndef MLT_ANIMATION_H
26 #define MLT_ANIMATION_H
28 #include "mlt_types.h"
29 #include "mlt_property.h"
31 /** \brief An animation item that represents a keyframe-property combination. */
33 struct mlt_animation_item_s
35 int is_key; /**< a boolean of whether this is a key frame or an interpolated item */
36 int frame; /**< the frame number for this instance of the property */
37 mlt_property property; /**< the property for this point in time */
38 mlt_keyframe_type keyframe_type; /**< the method of interpolation for this key frame */
40 typedef struct mlt_animation_item_s *mlt_animation_item; /**< pointer to an animation item */
42 extern mlt_animation mlt_animation_new( );
43 extern int mlt_animation_parse(mlt_animation self, const char *data, int length, double fps, locale_t locale );
44 extern int mlt_animation_refresh( mlt_animation self, const char *data, int length );
45 extern int mlt_animation_get_length( mlt_animation self );
46 extern void mlt_animation_set_length( mlt_animation self, int length );
47 extern int mlt_animation_parse_item( mlt_animation self, mlt_animation_item item, const char *data );
48 extern int mlt_animation_get_item( mlt_animation self, mlt_animation_item item, int position );
49 extern int mlt_animation_insert( mlt_animation self, mlt_animation_item item );
50 extern int mlt_animation_remove( mlt_animation self, int position );
51 extern void mlt_animation_interpolate( mlt_animation self );
52 extern int mlt_animation_next_key( mlt_animation self, mlt_animation_item item, int position );
53 extern int mlt_animation_prev_key( mlt_animation self, mlt_animation_item item, int position );
54 extern char *mlt_animation_serialize_cut( mlt_animation self, int in, int out );
55 extern char *mlt_animation_serialize( mlt_animation self );
56 extern void mlt_animation_close( mlt_animation self );