MLT  7.28.0
mlt_animation.h
Go to the documentation of this file.
1 
23 #ifndef MLT_ANIMATION_H
24 #define MLT_ANIMATION_H
25 
26 #include "mlt_property.h"
27 #include "mlt_types.h"
28 
43 {
44  int is_key;
45  int frame;
48 };
53  mlt_animation self, const char *data, int length, double fps, mlt_locale_t locale);
54 extern int mlt_animation_refresh(mlt_animation self, const char *data, int length);
56 extern void mlt_animation_set_length(mlt_animation self, int length);
57 extern int mlt_animation_parse_item(mlt_animation self, mlt_animation_item item, const char *data);
58 extern int mlt_animation_get_item(mlt_animation self, mlt_animation_item item, int position);
60 extern int mlt_animation_remove(mlt_animation self, int position);
62 extern int mlt_animation_next_key(mlt_animation self, mlt_animation_item item, int position);
63 extern int mlt_animation_prev_key(mlt_animation self, mlt_animation_item item, int position);
64 extern char *mlt_animation_serialize_cut_tf(mlt_animation self, int in, int out, mlt_time_format);
65 extern char *mlt_animation_serialize_cut(mlt_animation self, int in, int out);
69 extern int mlt_animation_key_get(mlt_animation self, mlt_animation_item item, int index);
72 extern int mlt_animation_key_set_frame(mlt_animation self, int index, int frame);
73 extern void mlt_animation_shift_frames(mlt_animation self, int shift);
74 extern const char *mlt_animation_get_string(mlt_animation self);
75 
76 #endif
struct mlt_animation_item_s * mlt_animation_item
pointer to an animation item
Definition: mlt_animation.h:49
Property class declaration.
char * mlt_locale_t
Definition: mlt_property.h:45
Provides forward definitions of all public types.
mlt_time_format
The time string formats.
Definition: mlt_types.h:134
mlt_keyframe_type
Interpolation methods for animation keyframes.
Definition: mlt_types.h:143
Animation class.
Definition: mlt_animation.h:43
int is_key
a boolean of whether this is a key frame or an interpolated item
Definition: mlt_animation.h:44
int frame
the frame number for this instance of the property
Definition: mlt_animation.h:45
mlt_keyframe_type keyframe_type
the method of interpolation for this key frame
Definition: mlt_animation.h:47
mlt_property property
the property for this point in time
Definition: mlt_animation.h:46
Property Animation class.
Definition: mlt_animation.c:51
const char * mlt_animation_get_string(mlt_animation self)
Get the cached serialization string.
Definition: mlt_animation.c:1004
char * mlt_animation_serialize_tf(mlt_animation self, mlt_time_format time_format)
Serialize the animation (with time format).
Definition: mlt_animation.c:818
mlt_animation mlt_animation_new()
Create a new animation object.
Definition: mlt_animation.c:145
int mlt_animation_parse_item(mlt_animation self, mlt_animation_item item, const char *value)
Parse a string representing an animation keyframe=value.
Definition: mlt_animation.c:396
int mlt_animation_prev_key(mlt_animation self, mlt_animation_item item, int position)
Get the keyfame at the position or the next preceding.
Definition: mlt_animation.c:639
int mlt_animation_parse(mlt_animation self, const char *data, int length, double fps, mlt_locale_t locale)
Parse a string representing an animation.
Definition: mlt_animation.c:253
int mlt_animation_key_set_frame(mlt_animation self, int index, int frame)
Change the frame number for the N-th keyframe.
Definition: mlt_animation.c:953
char * mlt_animation_serialize_cut_tf(mlt_animation self, int in, int out, mlt_time_format time_format)
Serialize a cut of the animation (with time format).
Definition: mlt_animation.c:674
void mlt_animation_set_length(mlt_animation self, int length)
Set the length of the animation.
Definition: mlt_animation.c:371
void mlt_animation_close(mlt_animation self)
Close the animation and deallocate all of its resources.
Definition: mlt_animation.c:903
void mlt_animation_shift_frames(mlt_animation self, int shift)
Shift the frame value for all nodes.
Definition: mlt_animation.c:984
int mlt_animation_insert(mlt_animation self, mlt_animation_item item)
Insert an animation item.
Definition: mlt_animation.c:518
int mlt_animation_key_get(mlt_animation self, mlt_animation_item item, int index)
Get an animation item for the N-th keyframe.
Definition: mlt_animation.c:870
int mlt_animation_get_length(mlt_animation self)
Get the length of the animation.
Definition: mlt_animation.c:344
int mlt_animation_key_count(mlt_animation self)
Get the number of keyframes.
Definition: mlt_animation.c:850
char * mlt_animation_serialize(mlt_animation self)
Serialize the animation.
Definition: mlt_animation.c:838
int mlt_animation_key_set_type(mlt_animation self, int index, mlt_keyframe_type type)
Change the interpolation for the N-th keyframe.
Definition: mlt_animation.c:920
int mlt_animation_remove(mlt_animation self, int position)
Remove the keyframe at the specified position.
Definition: mlt_animation.c:581
int mlt_animation_refresh(mlt_animation self, const char *data, int length)
Conditionally refresh the animation if it is modified.
Definition: mlt_animation.c:325
int mlt_animation_get_item(mlt_animation self, mlt_animation_item item, int position)
Load an animation item for an absolute position.
Definition: mlt_animation.c:453
void mlt_animation_interpolate(mlt_animation self)
Re-interpolate non-keyframe nodes after a series of insertions or removals.
Definition: mlt_animation.c:157
char * mlt_animation_serialize_cut(mlt_animation self, int in, int out)
Serialize a cut of the animation.
Definition: mlt_animation.c:804
int mlt_animation_next_key(mlt_animation self, mlt_animation_item item, int position)
Get the keyfame at the position or the next following.
Definition: mlt_animation.c:609
Property class.
Definition: mlt_property.c:62